Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1620)

Unified Diff: tests/gclient_smoketest.py

Issue 2238004: Add --deps support for revert, status and runhooks. Fix gclient status. (Closed)
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_smoketest.py
diff --git a/tests/gclient_smoketest.py b/tests/gclient_smoketest.py
index b0b74a5eaa9f2d2768c47a6e03b43fa1e16bfd8d..2895a5ff62c301167208082b6099caaf840ee13c 100755
--- a/tests/gclient_smoketest.py
+++ b/tests/gclient_smoketest.py
@@ -274,7 +274,7 @@ class GClientSmokeSVN(GClientSmokeBase):
self.gclient(['config', self.svn_base + 'trunk/src/'])
# Tested in testSync.
self.gclient(['sync', '--deps', 'mac'])
- write(join(self.root_dir, 'src', 'third_party', 'foo', 'hi'), 'Hey!')
+ write(join(self.root_dir, 'src', 'other', 'hi'), 'Hey!')
results = self.gclient(['status'])
out = results[0].splitlines(False)
@@ -319,6 +319,55 @@ class GClientSmokeSVN(GClientSmokeBase):
self.checkString('', results[1])
self.assertEquals(0, results[2])
+ def testRevertAndStatusDepsOs(self):
+ self.gclient(['config', self.svn_base + 'trunk/src/'])
+ # Tested in testSync.
+ self.gclient(['sync', '--deps', 'mac', '--revision', 'src@1'])
+ write(join(self.root_dir, 'src', 'other', 'hi'), 'Hey!')
+
+ results = self.gclient(['status', '--deps', 'mac'])
+ out = results[0].splitlines(False)
+ self.assertEquals(out[0], '')
+ self.assertTrue(out[1].startswith('________ running \'svn status\' in \''))
+ self.assertEquals(out[2], '? other')
+ self.assertEquals(out[3], '? third_party/fpp')
+ self.assertEquals(out[4], '? third_party/prout')
+ self.assertEquals(out[5], '')
+ self.assertTrue(out[6].startswith('________ running \'svn status\' in \''))
+ self.assertEquals(out[7], '? hi')
+ self.assertEquals(8, len(out))
+ self.assertEquals('', results[1])
+ self.assertEquals(0, results[2])
+
+ # Revert implies --force implies running hooks without looking at pattern
+ # matching.
+ results = self.gclient(['revert', '--deps', 'mac'])
+ out = results[0].splitlines(False)
+ self.assertEquals(24, len(out))
+ self.checkString('', results[1])
+ self.assertEquals(0, results[2])
+ tree = mangle_svn_tree(
+ (join('trunk', 'src'), 'src', FAKE.svn_revs[1]),
+ (join('trunk', 'third_party', 'foo'), join('src', 'third_party', 'fpp'),
+ FAKE.svn_revs[2]),
+ (join('trunk', 'other'), join('src', 'other'), FAKE.svn_revs[2]),
+ (join('trunk', 'third_party', 'prout'),
+ join('src', 'third_party', 'prout'),
+ FAKE.svn_revs[2]),
+ )
+ self.assertTree(tree)
+
+ results = self.gclient(['status', '--deps', 'mac'])
+ out = results[0].splitlines(False)
+ self.assertEquals(out[0], '')
+ self.assertTrue(out[1].startswith('________ running \'svn status\' in \''))
+ self.assertEquals(out[2], '? other')
+ self.assertEquals(out[3], '? third_party/fpp')
+ self.assertEquals(out[4], '? third_party/prout')
+ self.assertEquals(5, len(out))
+ self.checkString('', results[1])
+ self.assertEquals(0, results[2])
+
def testRunHooks(self):
self.gclient(['config', self.svn_base + 'trunk/src/'])
self.gclient(['sync', '--deps', 'mac'])
« no previous file with comments | « gclient.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698