|
|
Chromium Code Reviews|
Created:
6 years, 10 months ago by iannucci Modified:
6 years, 10 months ago CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, M-A Ruel, iannucci+depot_tools_chromium.org, ilevy-cc_chromium.org Visibility:
Public. |
DescriptionMake gclient reset use GetUsableRev.
One line for the fix, 30 lines for the test :)
R=kbr@chromium.org, mmoss@chromium.org, stip@chromium.org, szager@chromium.org
BUG=345073
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=252138
Patch Set 1 #
Total comments: 1
Patch Set 2 : Move test to its own suite #
Messages
Total messages: 14 (0 generated)
It's a race to see which owner can review first... This is a pretty urgent change to fix the chromium.gpu waterfall.
Thank you for fixing this. LGTM, though I'm looking only at the high-level structure and not at the details.
https://codereview.chromium.org/165443004/diff/1/gclient_scm.py File gclient_scm.py (right): https://codereview.chromium.org/165443004/diff/1/gclient_scm.py#newcode701 gclient_scm.py:701: scm.GIT.Capture(['fetch', self.remote], cwd=self.checkout_path) Note this doesn't work with cache_dir. I'll do that as a followup CL though since the gpu bots don't use it.
lgtm
lgtm, look into git cache operation in a separate commit
The CQ bit was checked by iannucci@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/iannucci@chromium.org/165443004/1
The CQ bit was unchecked by commit-bot@chromium.org
Presubmit check for 165443004-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 **
tests/gclient_smoketest.py (41.25s) failed
....................FFFFF..................
======================================================================
FAIL: testRunHooks (__main__.GClientSmokeGIT)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/gclient_smoketest.py", line 1101, in testRunHooks
self.assertTree(tree)
File
"/b/commit-queue/workdir/tools/depot_tools/testing_support/fake_repos.py", line
810, in assertTree
self.assertEquals(diff, [])
AssertionError: {'src/DEPS': ("\ndeps = {\n 'src/repo2':
'git://127.0.0.1:20003/git/repo_2@ea30bc7',\n #'src/repo2/repo_renamed':
'/repo_3',\n 'src/repo2/repo_renamed': From('src/repo2', 'foo/bar'),\n}\n# I
think this is wrong to have the hooks run from the base of the gclient\n#
checkout. It's maybe a bit too late to change that behavior.\nhooks = [\n {\n
'pattern': '.',\n 'action': ['python', '-c',\n
'open(\\'src/git_hooked1\\', \\'w\\').write(\\'git_hooked1\\')'],\n },\n {\n
# Should not be run.\n 'pattern': 'nonexistent',\n 'action': ['python',
'-c',\n 'open(\\'src/git_hooked2\\',
\\'w\\').write(\\'git_hooked2\\')'],\n },\n]\n", "vars = {'r2hash':
'ea30bc7'}\n\ndeps = {\n 'src/repo2': 'git://127.0.0.1:20003/git/repo_2@' +
Var('r2hash'),\n #'src/repo2/repo_renamed': '/repo_3',\n
'src/repo2/repo_renamed': From('src/repo2', 'foo/bar'),\n}\n# I think this is
wrong to have the hooks run from the base of the gclient\n# checkout. It's maybe
a bit too late to change that behavior.\nhooks = [\n {\n 'pattern': '.',\n
'action': ['python', '-c',\n 'open(\\'src/git_hooked1\\',
\\'w\\').write(\\'git_hooked1\\')'],\n },\n {\n # Should not be run.\n
'pattern': 'nonexistent',\n 'action': ['python', '-c',\n
'open(\\'src/git_hooked2\\', \\'w\\').write(\\'git_hooked2\\')'],\n },\n]\n"),
'src/origin': ('git/repo_1@2\n', 'git/repo_1@3\n')} != []
======================================================================
FAIL: testSync (__main__.GClientSmokeGIT)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/gclient_smoketest.py", line 862, in testSync
self.assertTree(tree)
File
"/b/commit-queue/workdir/tools/depot_tools/testing_support/fake_repos.py", line
810, in assertTree
self.assertEquals(diff, [])
AssertionError: {'src/DEPS': ("\ndeps = {\n 'src/repo2':
'git://127.0.0.1:20003/git/repo_2@ea30bc7',\n #'src/repo2/repo_renamed':
'/repo_3',\n 'src/repo2/repo_renamed': From('src/repo2', 'foo/bar'),\n}\n# I
think this is wrong to have the hooks run from the base of the gclient\n#
checkout. It's maybe a bit too late to change that behavior.\nhooks = [\n {\n
'pattern': '.',\n 'action': ['python', '-c',\n
'open(\\'src/git_hooked1\\', \\'w\\').write(\\'git_hooked1\\')'],\n },\n {\n
# Should not be run.\n 'pattern': 'nonexistent',\n 'action': ['python',
'-c',\n 'open(\\'src/git_hooked2\\',
\\'w\\').write(\\'git_hooked2\\')'],\n },\n]\n", "vars = {'r2hash':
'ea30bc7'}\n\ndeps = {\n 'src/repo2': 'git://127.0.0.1:20003/git/repo_2@' +
Var('r2hash'),\n #'src/repo2/repo_renamed': '/repo_3',\n
'src/repo2/repo_renamed': From('src/repo2', 'foo/bar'),\n}\n# I think this is
wrong to have the hooks run from the base of the gclient\n# checkout. It's maybe
a bit too late to change that behavior.\nhooks = [\n {\n 'pattern': '.',\n
'action': ['python', '-c',\n 'open(\\'src/git_hooked1\\',
\\'w\\').write(\\'git_hooked1\\')'],\n },\n {\n # Should not be run.\n
'pattern': 'nonexistent',\n 'action': ['python', '-c',\n
'open(\\'src/git_hooked2\\', \\'w\\').write(\\'git_hooked2\\')'],\n },\n]\n"),
'src/origin': ('git/repo_1@2\n', 'git/repo_1@3\n')} != []
======================================================================
FAIL: testSyncIgnoredSolutionName (__main__.GClientSmokeGIT)
TODO(maruel): This will become an error soon.
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/gclient_smoketest.py", line 918, in testSyncIgnoredSolutionName
self.assertTree(tree)
File
"/b/commit-queue/workdir/tools/depot_tools/testing_support/fake_repos.py", line
810, in assertTree
self.assertEquals(diff, [])
AssertionError: {'src/DEPS': ("\ndeps = {\n 'src/repo2':
'git://127.0.0.1:20003/git/repo_2@ea30bc7',\n #'src/repo2/repo_renamed':
'/repo_3',\n 'src/repo2/repo_renamed': From('src/repo2', 'foo/bar'),\n}\n# I
think this is wrong to have the hooks run from the base of the gclient\n#
checkout. It's maybe a bit too late to change that behavior.\nhooks = [\n {\n
'pattern': '.',\n 'action': ['python', '-c',\n
'open(\\'src/git_hooked1\\', \\'w\\').write(\\'git_hooked1\\')'],\n },\n {\n
# Should not be run.\n 'pattern': 'nonexistent',\n 'action': ['python',
'-c',\n 'open(\\'src/git_hooked2\\',
\\'w\\').write(\\'git_hooked2\\')'],\n },\n]\n", "vars = {'r2hash':
'ea30bc7'}\n\ndeps = {\n 'src/repo2': 'git://127.0.0.1:20003/git/repo_2@' +
Var('r2hash'),\n #'src/repo2/repo_renamed': '/repo_3',\n
'src/repo2/repo_renamed': From('src/repo2', 'foo/bar'),\n}\n# I think this is
wrong to have the hooks run from the base of the gclient\n# checkout. It's maybe
a bit too late to change that behavior.\nhooks = [\n {\n 'pattern': '.',\n
'action': ['python', '-c',\n 'open(\\'src/git_hooked1\\',
\\'w\\').write(\\'git_hooked1\\')'],\n },\n {\n # Should not be run.\n
'pattern': 'nonexistent',\n 'action': ['python', '-c',\n
'open(\\'src/git_hooked2\\', \\'w\\').write(\\'git_hooked2\\')'],\n },\n]\n"),
'src/origin': ('git/repo_1@2\n', 'git/repo_1@3\n')} != []
======================================================================
FAIL: testSyncJobs (__main__.GClientSmokeGIT)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/gclient_smoketest.py", line 958, in testSyncJobs
self.assertTree(tree)
File
"/b/commit-queue/workdir/tools/depot_tools/testing_support/fake_repos.py", line
810, in assertTree
self.assertEquals(diff, [])
AssertionError: {'src/DEPS': ("\ndeps = {\n 'src/repo2':
'git://127.0.0.1:20003/git/repo_2@ea30bc7',\n #'src/repo2/repo_renamed':
'/repo_3',\n 'src/repo2/repo_renamed': From('src/repo2', 'foo/bar'),\n}\n# I
think this is wrong to have the hooks run from the base of the gclient\n#
checkout. It's maybe a bit too late to change that behavior.\nhooks = [\n {\n
'pattern': '.',\n 'action': ['python', '-c',\n
'open(\\'src/git_hooked1\\', \\'w\\').write(\\'git_hooked1\\')'],\n },\n {\n
# Should not be run.\n 'pattern': 'nonexistent',\n 'action': ['python',
'-c',\n 'open(\\'src/git_hooked2\\',
\\'w\\').write(\\'git_hooked2\\')'],\n },\n]\n", "vars = {'r2hash':
'ea30bc7'}\n\ndeps = {\n 'src/repo2': 'git://127.0.0.1:20003/git/repo_2@' +
Var('r2hash'),\n #'src/repo2/repo_renamed': '/repo_3',\n
'src/repo2/repo_renamed': From('src/repo2', 'foo/bar'),\n}\n# I think this is
wrong to have the hooks run from the base of the gclient\n# checkout. It's maybe
a bit too late to change that behavior.\nhooks = [\n {\n 'pattern': '.',\n
'action': ['python', '-c',\n 'open(\\'src/git_hooked1\\',
\\'w\\').write(\\'git_hooked1\\')'],\n },\n {\n # Should not be run.\n
'pattern': 'nonexistent',\n 'action': ['python', '-c',\n
'open(\\'src/git_hooked2\\', \\'w\\').write(\\'git_hooked2\\')'],\n },\n]\n"),
'src/origin': ('git/repo_1@2\n', 'git/repo_1@3\n')} != []
======================================================================
FAIL: testSyncNoSolutionName (__main__.GClientSmokeGIT)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/gclient_smoketest.py", line 936, in testSyncNoSolutionName
self.assertTree(tree)
File
"/b/commit-queue/workdir/tools/depot_tools/testing_support/fake_repos.py", line
810, in assertTree
self.assertEquals(diff, [])
AssertionError: {'src/repo2/origin': ('git/repo_2@2\n', 'git/repo_2@3\n')} != []
----------------------------------------------------------------------
Ran 43 tests in 41.007s
FAILED (failures=5)
Presubmit checks took 126.4s to calculate.
Was the presubmit check useful? If not, run "git cl presubmit -v"
to figure out which PRESUBMIT.py was run, then run git blame
on the file to figure out who to ask for help.
[85257 refs]
Uploaded new patch to fix... basically, despite the use of setUp(), the FAKE_REPOS object actually persists across tests (surprise!!!). Simplest solution was to move to a new test suite class. *shakes head*
The CQ bit was checked by iannucci@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/iannucci@chromium.org/165443004/130001
Message was sent while issue was closed.
Change committed as 252138 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
