|
|
Created:
6 years ago by Raphael Kubo da Costa (rakuco) Modified:
6 years ago CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, iannucci+depot_tools_chromium.org Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master Target Ref:
refs/heads/master Project:
tools Visibility:
Public. |
Descriptionpresubmit_unittest: Fix pylint errors.
The recent pylint 1.3.1 and 1.4.0 upgrades have caused some new errors
to be reported for presubmit_unittest:
* presubmit_support.InputApi.AffectedFiles() expectes a parameter called
|include_deletes|, not |include_deleted|.
* The mock AffectedFiles() implementation in
CannedChecksUnittest.testCannedCheckChangeHasNoTabs() had its
signature updated to match the one in presubmit_support.InputApi,
otherwise pylint would (erroneously) consider that this mock
implementation was used in all other AffectedFiles() invocations in
CannedChecksUnittest and complain that some parameters were missing.
It makes more sense to do this than disable the check and miss real
problems in the future.
R=maruel@chromium.org, iannucci@chromium.org, pgervais@chromium.org
BUG=443232
Committed: 293468
Patch Set 1 #
Messages
Total messages: 15 (4 generated)
eh, lgtm
The CQ bit was checked by maruel@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/802403003/1
The CQ bit was unchecked by commit-bot@chromium.org
Presubmit check for 802403003-1 failed and returned exit status 1. Running presubmit commit checks ... Checking out rietveld... Running save-description-on-failure.sh Running push-basic.sh Running upstream.sh Running submit-from-new-dir.sh Running abandon.sh Running submodule-merge-test.sh Running upload-local-tracking-branch.sh Running hooks.sh Running post-dcommit-hook-test.sh Running upload-stale.sh Running patch.sh Running basic.sh ** Presubmit ERRORS ** Pylint (113 files) (123.29s) failed ************* Module android W: 12, 0: Method 'expected_root' is abstract in class 'Recipe' but is not overridden (abstract-method) ************* Module blink W: 13, 0: Method 'expected_root' is abstract in class 'Recipe' but is not overridden (abstract-method) ************* Module ios W: 12, 0: Method 'expected_root' is abstract in class 'Recipe' but is not overridden (abstract-method) tests/gclient_test.py (0.56s) failed ........ foo (ERROR) ---------------------------------------- [0:00:00] Started. ---------------------------------------- . foo (ERROR) ---------------------------------------- [0:00:00] Started. ---------------------------------------- .....F......... ====================================================================== FAIL: testRecursedepsOverride (__main__.GclientTest) Verifies gclient respects the |recursedeps| var syntax. ---------------------------------------------------------------------- Traceback (most recent call last): File "tests/gclient_test.py", line 721, in testRecursedepsOverride self._get_processed()) AssertionError: Lists differ: ['svn://example.com/foo', 'svn... != ['svn://example.com/foo', 'svn... First differing element 1: svn://example.com/bar svn://example.com/tar ['svn://example.com/foo', + 'svn://example.com/tar', 'svn://example.com/bar', - 'svn://example.com/tar', 'svn://example.com/foo/bar', 'svn://example.com/foo/bar/baz', 'svn://example.com/foo/bar/baz/fizz'] ---------------------------------------------------------------------- Ran 24 tests in 0.213s FAILED (failures=1) tests/git_common_test.py (6.16s) failed ...F..................u....... ====================================================================== FAIL: testGetBranchesInfo (__main__.GitMutableFunctionsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "tests/git_common_test.py", line 418, in testGetBranchesInfo self.assertEquals(expected, actual) AssertionError: {'': None, 'happybranch': ('2f7805f', 'master', 1, None), 'parent_gone': ('2c1a1 [truncated]... != {'': None, 'happybranch': BranchesInfo(hash='2f7805f', upstream='master', ahead= [truncated]... {'': None, - 'child': ('2f7805f', 'happybranch', None, None), - 'happybranch': ('2f7805f', 'master', 1, None), - 'master': ('2c1a114', '', None, None), - 'parent_gone': ('2c1a114', 'to_delete', 1, None), + 'child': BranchesInfo(hash='2f7805f', upstream='happybranch', ahead=None, behind=None), + 'happybranch': BranchesInfo(hash='2f7805f', upstream='master', ahead=1, behind=None), + 'master': BranchesInfo(hash='2c1a114', upstream='', ahead=None, behind=None), + 'parent_gone': BranchesInfo(hash='2c1a114', upstream='to_delete', ahead=29148448, behind=170), 'to_delete': None} ---------------------------------------------------------------------- Ran 30 tests in 5.897s FAILED (failures=1, unexpected successes=1) Name Stmts Miss Cover Missing ------------------------------------------ git_common 373 0 100% Presubmit checks took 174.0s to calculate.
The CQ bit was checked by raphael.kubo.da.costa@intel.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/802403003/1
The CQ bit was unchecked by commit-bot@chromium.org
Presubmit check for 802403003-1 failed and returned exit status 1. Running presubmit commit checks ... Checking out rietveld... Running save-description-on-failure.sh Running push-basic.sh Running upstream.sh Running submit-from-new-dir.sh Running abandon.sh Running submodule-merge-test.sh Running upload-local-tracking-branch.sh Running hooks.sh Running post-dcommit-hook-test.sh Running upload-stale.sh Running patch.sh Running basic.sh ** Presubmit ERRORS ** Pylint (113 files) (126.88s) failed ************* Module android W: 12, 0: Method 'expected_root' is abstract in class 'Recipe' but is not overridden (abstract-method) ************* Module blink W: 13, 0: Method 'expected_root' is abstract in class 'Recipe' but is not overridden (abstract-method) ************* Module ios W: 12, 0: Method 'expected_root' is abstract in class 'Recipe' but is not overridden (abstract-method) tests/gclient_test.py (0.58s) failed ........ foo (ERROR) ---------------------------------------- [0:00:00] Started. ---------------------------------------- . foo (ERROR) ---------------------------------------- [0:00:00] Started. ---------------------------------------- .....F......... ====================================================================== FAIL: testRecursedepsOverride (__main__.GclientTest) Verifies gclient respects the |recursedeps| var syntax. ---------------------------------------------------------------------- Traceback (most recent call last): File "tests/gclient_test.py", line 721, in testRecursedepsOverride self._get_processed()) AssertionError: Lists differ: ['svn://example.com/foo', 'svn... != ['svn://example.com/foo', 'svn... First differing element 1: svn://example.com/bar svn://example.com/tar ['svn://example.com/foo', + 'svn://example.com/tar', 'svn://example.com/bar', - 'svn://example.com/tar', 'svn://example.com/foo/bar', 'svn://example.com/foo/bar/baz', 'svn://example.com/foo/bar/baz/fizz'] ---------------------------------------------------------------------- Ran 24 tests in 0.240s FAILED (failures=1) tests/git_common_test.py (5.99s) failed ...F..................u....... ====================================================================== FAIL: testGetBranchesInfo (__main__.GitMutableFunctionsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "tests/git_common_test.py", line 418, in testGetBranchesInfo self.assertEquals(expected, actual) AssertionError: {'': None, 'happybranch': ('30d6fd5', 'master', 1, None), 'parent_gone': ('a9dec [truncated]... != {'': None, 'happybranch': BranchesInfo(hash='30d6fd5', upstream='master', ahead= [truncated]... {'': None, - 'child': ('30d6fd5', 'happybranch', None, None), - 'happybranch': ('30d6fd5', 'master', 1, None), - 'master': ('a9dec13', '', None, None), - 'parent_gone': ('a9dec13', 'to_delete', 1, None), + 'child': BranchesInfo(hash='30d6fd5', upstream='happybranch', ahead=None, behind=None), + 'happybranch': BranchesInfo(hash='30d6fd5', upstream='master', ahead=1, behind=None), + 'master': BranchesInfo(hash='a9dec13', upstream='', ahead=None, behind=None), + 'parent_gone': BranchesInfo(hash='a9dec13', upstream='to_delete', ahead=18666784, behind=170), 'to_delete': None} ---------------------------------------------------------------------- Ran 30 tests in 5.767s FAILED (failures=1, unexpected successes=1) Name Stmts Miss Cover Missing ------------------------------------------ git_common 373 0 100% Presubmit checks took 165.9s to calculate.
On 2014/12/19 16:45:06, I haz the power (commit-bot) wrote: > Presubmit check for 802403003-1 failed and returned exit status 1. > > Running presubmit commit checks ... > Checking out rietveld... > Running save-description-on-failure.sh > Running push-basic.sh > Running upstream.sh > Running submit-from-new-dir.sh > Running abandon.sh > Running submodule-merge-test.sh > Running upload-local-tracking-branch.sh > Running hooks.sh > Running post-dcommit-hook-test.sh > Running upload-stale.sh > Running patch.sh > Running basic.sh > > ** Presubmit ERRORS ** > Pylint (113 files) (126.88s) failed > ************* Module android > W: 12, 0: Method 'expected_root' is abstract in class 'Recipe' but is not > overridden (abstract-method) > ************* Module blink > W: 13, 0: Method 'expected_root' is abstract in class 'Recipe' but is not > overridden (abstract-method) > ************* Module ios > W: 12, 0: Method 'expected_root' is abstract in class 'Recipe' but is not > overridden (abstract-method) > > > tests/gclient_test.py (0.58s) failed > ........ > foo (ERROR) > ---------------------------------------- > [0:00:00] Started. > ---------------------------------------- > . > foo (ERROR) > ---------------------------------------- > [0:00:00] Started. > ---------------------------------------- > .....F......... > ====================================================================== > FAIL: testRecursedepsOverride (__main__.GclientTest) > Verifies gclient respects the |recursedeps| var syntax. > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "tests/gclient_test.py", line 721, in testRecursedepsOverride > self._get_processed()) > AssertionError: Lists differ: ['svn://example.com/foo', 'svn... != > ['svn://example.com/foo', 'svn... > > First differing element 1: > svn://example.com/bar > svn://example.com/tar > > ['svn://example.com/foo', > + 'svn://example.com/tar', > 'svn://example.com/bar', > - 'svn://example.com/tar', > 'svn://example.com/foo/bar', > 'svn://example.com/foo/bar/baz', > 'svn://example.com/foo/bar/baz/fizz'] > > ---------------------------------------------------------------------- > Ran 24 tests in 0.240s > > FAILED (failures=1) > > > tests/git_common_test.py (5.99s) failed > ...F..................u....... > ====================================================================== > FAIL: testGetBranchesInfo (__main__.GitMutableFunctionsTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "tests/git_common_test.py", line 418, in testGetBranchesInfo > self.assertEquals(expected, actual) > AssertionError: {'': None, 'happybranch': ('30d6fd5', 'master', 1, None), > 'parent_gone': ('a9dec [truncated]... != {'': None, 'happybranch': > BranchesInfo(hash='30d6fd5', upstream='master', ahead= [truncated]... > {'': None, > - 'child': ('30d6fd5', 'happybranch', None, None), > - 'happybranch': ('30d6fd5', 'master', 1, None), > - 'master': ('a9dec13', '', None, None), > - 'parent_gone': ('a9dec13', 'to_delete', 1, None), > + 'child': BranchesInfo(hash='30d6fd5', upstream='happybranch', ahead=None, > behind=None), > + 'happybranch': BranchesInfo(hash='30d6fd5', upstream='master', ahead=1, > behind=None), > + 'master': BranchesInfo(hash='a9dec13', upstream='', ahead=None, behind=None), > + 'parent_gone': BranchesInfo(hash='a9dec13', upstream='to_delete', > ahead=18666784, behind=170), > 'to_delete': None} > > ---------------------------------------------------------------------- > Ran 30 tests in 5.767s > > FAILED (failures=1, unexpected successes=1) > Name Stmts Miss Cover Missing > ------------------------------------------ > git_common 373 0 100% > > > Presubmit checks took 165.9s to calculate. It seems we have a bug in the test suite. The solution is to fix the expectation in tests/git_commit_test.py:418 and replace ('30d6fd5', 'master', 1, None) by BranchesInfo(hash='30d6fd5', upstream='master', ahead= [truncated]... This can be done in another CL if you want. Also feel free to ask someone else to do it.
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as r293468.
Message was sent while issue was closed.
On 2014/12/19 16:48:31, pgervais wrote: > It seems we have a bug in the test suite. The solution is to fix the expectation > in tests/git_commit_test.py:418 and replace > ('30d6fd5', 'master', 1, None) > by > BranchesInfo(hash='30d6fd5', upstream='master', ahead= [truncated]... > > This can be done in another CL if you want. Also feel free to ask someone else > to do it. I then get an actual failure: ====================================================================== FAIL: testGetBranchesInfo (__main__.GitMutableFunctionsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "tests/git_common_test.py", line 423, in testGetBranchesInfo self.assertEquals(expected, actual) AssertionError: {'': None, 'happybranch': BranchesInfo(hash='d8e473a', upstream='master', ahead= [truncated]... != {'': None, 'happybranch': BranchesInfo(hash='d8e473a', upstream='master', ahead= [truncated]... {'': None, 'child': BranchesInfo(hash='d8e473a', upstream='happybranch', ahead=None, behind=None), 'happybranch': BranchesInfo(hash='d8e473a', upstream='master', ahead=1, behind=None), 'master': BranchesInfo(hash='1f12c7b', upstream='', ahead=None, behind=None), - 'parent_gone': BranchesInfo(hash='1f12c7b', upstream='to_delete', ahead=1, behind=None), ? ^ ^^^^ + 'parent_gone': BranchesInfo(hash='1f12c7b', upstream='to_delete', ahead=27926032, behind=170), ? ^^^^^^^^ ^^^ 'to_delete': None}
Message was sent while issue was closed.
On 2014/12/19 17:21:10, Raphael Kubo da Costa (rakuco) wrote: > On 2014/12/19 16:48:31, pgervais wrote: > > It seems we have a bug in the test suite. The solution is to fix the > expectation > > in tests/git_commit_test.py:418 and replace > > ('30d6fd5', 'master', 1, None) > > by > > BranchesInfo(hash='30d6fd5', upstream='master', ahead= [truncated]... > > > > This can be done in another CL if you want. Also feel free to ask someone else > > to do it. > > I then get an actual failure: > ====================================================================== > FAIL: testGetBranchesInfo (__main__.GitMutableFunctionsTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "tests/git_common_test.py", line 423, in testGetBranchesInfo > self.assertEquals(expected, actual) > AssertionError: {'': None, 'happybranch': BranchesInfo(hash='d8e473a', > upstream='master', ahead= [truncated]... != {'': None, 'happybranch': > BranchesInfo(hash='d8e473a', upstream='master', ahead= [truncated]... > {'': None, > 'child': BranchesInfo(hash='d8e473a', upstream='happybranch', ahead=None, > behind=None), > 'happybranch': BranchesInfo(hash='d8e473a', upstream='master', ahead=1, > behind=None), > 'master': BranchesInfo(hash='1f12c7b', upstream='', ahead=None, behind=None), > - 'parent_gone': BranchesInfo(hash='1f12c7b', upstream='to_delete', ahead=1, > behind=None), > ? ^ > ^^^^ > > + 'parent_gone': BranchesInfo(hash='1f12c7b', upstream='to_delete', > ahead=27926032, behind=170), > ? > ^^^^^^^^ ^^^ > > 'to_delete': None} I would say 'just tweak the expected value until test test passes' but I'm not sure it's the best thing to do here. In particular, there could be an actual error. iannucci@ is probably the person to talk to here.
Message was sent while issue was closed.
On 2014/12/19 17:47:04, pgervais wrote: > On 2014/12/19 17:21:10, Raphael Kubo da Costa (rakuco) wrote: > > On 2014/12/19 16:48:31, pgervais wrote: > > > It seems we have a bug in the test suite. The solution is to fix the > > expectation > > > in tests/git_commit_test.py:418 and replace > > > ('30d6fd5', 'master', 1, None) > > > by > > > BranchesInfo(hash='30d6fd5', upstream='master', ahead= [truncated]... > > > > > > This can be done in another CL if you want. Also feel free to ask someone > else > > > to do it. > > > > I then get an actual failure: > > ====================================================================== > > FAIL: testGetBranchesInfo (__main__.GitMutableFunctionsTest) > > ---------------------------------------------------------------------- > > Traceback (most recent call last): > > File "tests/git_common_test.py", line 423, in testGetBranchesInfo > > self.assertEquals(expected, actual) > > AssertionError: {'': None, 'happybranch': BranchesInfo(hash='d8e473a', > > upstream='master', ahead= [truncated]... != {'': None, 'happybranch': > > BranchesInfo(hash='d8e473a', upstream='master', ahead= [truncated]... > > {'': None, > > 'child': BranchesInfo(hash='d8e473a', upstream='happybranch', ahead=None, > > behind=None), > > 'happybranch': BranchesInfo(hash='d8e473a', upstream='master', ahead=1, > > behind=None), > > 'master': BranchesInfo(hash='1f12c7b', upstream='', ahead=None, > behind=None), > > - 'parent_gone': BranchesInfo(hash='1f12c7b', upstream='to_delete', ahead=1, > > behind=None), > > ? ^ > > > ^^^^ > > > > + 'parent_gone': BranchesInfo(hash='1f12c7b', upstream='to_delete', > > ahead=27926032, behind=170), > > ? > > ^^^^^^^^ ^^^ > > > > 'to_delete': None} > > I would say 'just tweak the expected value until test test passes' but I'm not > sure it's the best thing to do here. In particular, there could be an actual > error. iannucci@ is probably the person to talk to here. Closing the loop after offline discussions and further investigation. The failure here is apparently caused by a bug in git 2.1.3 which is running on the bots. This is why we get the obviously wrong value: ahead=27926032, behind=170. The test passes with git 2.2.0 (and hopefully with 2.2.1). It also seems that it passes with 1.9, but it has not been checked. So the easiest fix is to upgrade to git 2.2.0, we'll take care of that for the bots. |