OLD | NEW |
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 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 ('svn', 'trunk/third_party/foo@1', 'src/third_party/foo'), | 1389 ('svn', 'trunk/third_party/foo@1', 'src/third_party/foo'), |
1390 ] | 1390 ] |
1391 expected = [(scm, bases[scm] + url, os.path.join(self.root_dir, path)) | 1391 expected = [(scm, bases[scm] + url, os.path.join(self.root_dir, path)) |
1392 for (scm, url, path) in expected_source] | 1392 for (scm, url, path) in expected_source] |
1393 | 1393 |
1394 self.assertEquals(sorted(entries), sorted(expected)) | 1394 self.assertEquals(sorted(entries), sorted(expected)) |
1395 | 1395 |
1396 # TODO(borenet): Enable this at the same time that the guard is removed in | 1396 # TODO(borenet): Enable this at the same time that the guard is removed in |
1397 # gclient. | 1397 # gclient. |
1398 if (os.environ.get('CHROME_HEADLESS') and | 1398 if (os.environ.get('CHROME_HEADLESS') and |
1399 socket.gethostname() in ('vm859-m1', 'BUILD1-M1', | 1399 socket.gethostname() in ('vm859-m1', 'build1-m1', 'vm630-m1')): |
1400 'vm630-m1.golo.chromium.org')): | |
1401 def testDeleteConflictingCheckout(self): | 1400 def testDeleteConflictingCheckout(self): |
1402 if not self.enabled: | 1401 if not self.enabled: |
1403 return | 1402 return |
1404 | 1403 |
1405 # Create an initial svn checkout. | 1404 # Create an initial svn checkout. |
1406 self.gclient(['config', '--spec', | 1405 self.gclient(['config', '--spec', |
1407 'solutions=[' | 1406 'solutions=[' |
1408 '{"name": "src",' | 1407 '{"name": "src",' |
1409 ' "url": "' + self.svn_base + 'trunk/src"},' | 1408 ' "url": "' + self.svn_base + 'trunk/src"},' |
1410 ']' | 1409 ']' |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1570 | 1569 |
1571 if '-c' in sys.argv: | 1570 if '-c' in sys.argv: |
1572 COVERAGE = True | 1571 COVERAGE = True |
1573 sys.argv.remove('-c') | 1572 sys.argv.remove('-c') |
1574 if os.path.exists('.coverage'): | 1573 if os.path.exists('.coverage'): |
1575 os.remove('.coverage') | 1574 os.remove('.coverage') |
1576 os.environ['COVERAGE_FILE'] = os.path.join( | 1575 os.environ['COVERAGE_FILE'] = os.path.join( |
1577 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), | 1576 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), |
1578 '.coverage') | 1577 '.coverage') |
1579 unittest.main() | 1578 unittest.main() |
OLD | NEW |