| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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. |
| 11 """ | 11 """ |
| 12 | 12 |
| 13 import logging | 13 import logging |
| 14 import os | 14 import os |
| 15 import re | 15 import re |
| 16 import subprocess | 16 import subprocess |
| 17 import sys | 17 import sys |
| 18 import unittest | 18 import unittest |
| 19 | 19 |
| 20 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | 20 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| 21 sys.path.insert(0, ROOT_DIR) | 21 sys.path.insert(0, ROOT_DIR) |
| 22 | 22 |
| 23 from fake_repos import join, write, FakeReposTestBase | 23 from testing_support.fake_repos import join, write, FakeReposTestBase |
| 24 | 24 |
| 25 import subprocess2 | 25 import subprocess2 |
| 26 | 26 |
| 27 GCLIENT_PATH = os.path.join(ROOT_DIR, 'gclient') | 27 GCLIENT_PATH = os.path.join(ROOT_DIR, 'gclient') |
| 28 COVERAGE = False | 28 COVERAGE = False |
| 29 | 29 |
| 30 | 30 |
| 31 class GClientSmokeBase(FakeReposTestBase): | 31 class GClientSmokeBase(FakeReposTestBase): |
| 32 def setUp(self): | 32 def setUp(self): |
| 33 super(GClientSmokeBase, self).setUp() | 33 super(GClientSmokeBase, self).setUp() |
| (...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 | 1281 |
| 1282 if '-c' in sys.argv: | 1282 if '-c' in sys.argv: |
| 1283 COVERAGE = True | 1283 COVERAGE = True |
| 1284 sys.argv.remove('-c') | 1284 sys.argv.remove('-c') |
| 1285 if os.path.exists('.coverage'): | 1285 if os.path.exists('.coverage'): |
| 1286 os.remove('.coverage') | 1286 os.remove('.coverage') |
| 1287 os.environ['COVERAGE_FILE'] = os.path.join( | 1287 os.environ['COVERAGE_FILE'] = os.path.join( |
| 1288 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), | 1288 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), |
| 1289 '.coverage') | 1289 '.coverage') |
| 1290 unittest.main() | 1290 unittest.main() |
| OLD | NEW |