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

Side by Side Diff: tests/gclient_smoketest.py

Issue 795723003: Fix test failures on Ubuntu/Trusty. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Smoke tests for gclient.py. 6 """Smoke tests for gclient.py.
7 7
8 Shell out 'gclient' and run basic conformance tests. 8 Shell out 'gclient' and run basic conformance tests.
9 9
10 This test assumes GClientSmokeBase.URL_BASE is valid. 10 This test assumes GClientSmokeBase.URL_BASE is valid.
(...skipping 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 self.gclient(['sync']) 1568 self.gclient(['sync'])
1569 1569
1570 # TODO(maruel): This is incorrect. 1570 # TODO(maruel): This is incorrect.
1571 out = self.parseGclient(['status', '--deps', 'mac', '--jobs', '1'], []) 1571 out = self.parseGclient(['status', '--deps', 'mac', '--jobs', '1'], [])
1572 1572
1573 # Revert implies --force implies running hooks without looking at pattern 1573 # Revert implies --force implies running hooks without looking at pattern
1574 # matching. 1574 # matching.
1575 results = self.gclient(['revert', '--deps', 'mac', '--jobs', '1']) 1575 results = self.gclient(['revert', '--deps', 'mac', '--jobs', '1'])
1576 out = self.splitBlock(results[0]) 1576 out = self.splitBlock(results[0])
1577 self.assertEquals(2, len(out)) 1577 self.assertEquals(2, len(out))
1578 self.checkString(2, len(out[0])) 1578 self.assertEquals(3, len(out[0]))
Sam Clegg 2014/12/10 21:25:38 I'm really not sure why the number of elements cha
M-A Ruel 2014/12/11 01:22:46 Bah, this could be just removed, it's not going to
Sam Clegg 2014/12/11 01:28:45 Should I remove this test then? I could find a pr
M-A Ruel 2014/12/11 01:57:00 No need.
Sam Clegg 2014/12/11 02:24:25 I looked into it and added comment. Can remove th
1579 self.checkString(2, len(out[1])) 1579 self.assertEquals(2, len(out[1]))
1580 self.checkString('foo', out[1][1]) 1580 self.checkString('foo', out[1][1])
1581 self.checkString('', results[1]) 1581 self.checkString('', results[1])
1582 self.assertEquals(0, results[2]) 1582 self.assertEquals(0, results[2])
1583 tree = self.mangle_svn_tree( 1583 tree = self.mangle_svn_tree(
1584 ('trunk/webkit@2', ''), 1584 ('trunk/webkit@2', ''),
1585 ('trunk/third_party/foo@1', 'foo/bar')) 1585 ('trunk/third_party/foo@1', 'foo/bar'))
1586 self.assertTree(tree) 1586 self.assertTree(tree)
1587 1587
1588 # TODO(maruel): This is incorrect. 1588 # TODO(maruel): This is incorrect.
1589 out = self.parseGclient(['status', '--deps', 'mac'], []) 1589 out = self.parseGclient(['status', '--deps', 'mac'], [])
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 1638
1639 if '-c' in sys.argv: 1639 if '-c' in sys.argv:
1640 COVERAGE = True 1640 COVERAGE = True
1641 sys.argv.remove('-c') 1641 sys.argv.remove('-c')
1642 if os.path.exists('.coverage'): 1642 if os.path.exists('.coverage'):
1643 os.remove('.coverage') 1643 os.remove('.coverage')
1644 os.environ['COVERAGE_FILE'] = os.path.join( 1644 os.environ['COVERAGE_FILE'] = os.path.join(
1645 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 1645 os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
1646 '.coverage') 1646 '.coverage')
1647 unittest.main() 1647 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698