| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 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 import collections | 6 import collections |
| 7 import glob | 7 import glob |
| 8 import json | 8 import json |
| 9 import multiprocessing | 9 import multiprocessing |
| 10 import optparse | 10 import optparse |
| 11 import os | 11 import os |
| 12 import pipes | 12 import pipes |
| 13 import shutil | 13 import shutil |
| 14 import subprocess | 14 import subprocess |
| 15 import sys | 15 import sys |
| 16 | 16 |
| 17 sys.path.append(os.path.join(os.path.dirname(__file__), '..')) | 17 sys.path.append(os.path.join(os.path.dirname(__file__), '..')) |
| 18 from pylib import android_commands | 18 from pylib import android_commands |
| 19 from pylib import buildbot_report | 19 from pylib import buildbot_report |
| 20 from pylib import constants | 20 from pylib import constants |
| 21 from pylib.gtest import gtest_config | 21 from pylib.gtest import gtest_config |
| 22 | 22 |
| 23 sys.path.append(os.path.join( | 23 sys.path.append(os.path.join( |
| 24 constants.CHROME_DIR, 'third_party', 'android_testrunner')) | 24 constants.DIR_SOURCE_ROOT, 'third_party', 'android_testrunner')) |
| 25 import errors | 25 import errors |
| 26 | 26 |
| 27 | 27 |
| 28 TESTING = 'BUILDBOT_TESTING' in os.environ | 28 TESTING = 'BUILDBOT_TESTING' in os.environ |
| 29 | 29 |
| 30 CHROME_SRC = constants.CHROME_DIR | 30 CHROME_SRC = constants.DIR_SOURCE_ROOT |
| 31 | 31 |
| 32 # Describes an instrumation test suite: | 32 # Describes an instrumation test suite: |
| 33 # test: Name of test we're running. | 33 # test: Name of test we're running. |
| 34 # apk: apk to be installed. | 34 # apk: apk to be installed. |
| 35 # apk_package: package for the apk to be installed. | 35 # apk_package: package for the apk to be installed. |
| 36 # test_apk: apk to run tests on. | 36 # test_apk: apk to run tests on. |
| 37 # test_data: data folder in format destination:source. | 37 # test_data: data folder in format destination:source. |
| 38 I_TEST = collections.namedtuple('InstrumentationTest', [ | 38 I_TEST = collections.namedtuple('InstrumentationTest', [ |
| 39 'name', 'apk', 'apk_package', 'test_apk', 'test_data', 'host_driven_root']) | 39 'name', 'apk', 'apk_package', 'test_apk', 'test_data', 'host_driven_root']) |
| 40 | 40 |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 'slave', 'android')) | 380 'slave', 'android')) |
| 381 if os.path.exists(build_internal_android): | 381 if os.path.exists(build_internal_android): |
| 382 android_paths.insert(0, build_internal_android) | 382 android_paths.insert(0, build_internal_android) |
| 383 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) | 383 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) |
| 384 | 384 |
| 385 MainTestWrapper(options) | 385 MainTestWrapper(options) |
| 386 | 386 |
| 387 | 387 |
| 388 if __name__ == '__main__': | 388 if __name__ == '__main__': |
| 389 sys.exit(main(sys.argv)) | 389 sys.exit(main(sys.argv)) |
| OLD | NEW |