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 multiprocessing | 8 import multiprocessing |
9 import os | 9 import os |
10 import shutil | 10 import shutil |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 302 |
303 if args: | 303 if args: |
304 return sys.exit('Unused args %s' % args) | 304 return sys.exit('Unused args %s' % args) |
305 | 305 |
306 unknown_tests = set(options.test_filter) - VALID_TESTS | 306 unknown_tests = set(options.test_filter) - VALID_TESTS |
307 if unknown_tests: | 307 if unknown_tests: |
308 return sys.exit('Unknown tests %s' % list(unknown_tests)) | 308 return sys.exit('Unknown tests %s' % list(unknown_tests)) |
309 | 309 |
310 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 310 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
311 | 311 |
312 # Add adb binary and chromium-source platform-tools to tip of PATH variable. | |
313 android_paths = [os.path.join(constants.ANDROID_SDK_ROOT, 'platform-tools')] | |
314 | |
315 # Bots checkout chrome in /b/build/slave/<name>/build/src | |
316 build_internal_android = os.path.abspath(os.path.join( | |
317 CHROME_SRC, '..', '..', '..', '..', '..', 'build_internal', 'scripts', | |
318 'slave', 'android')) | |
319 if os.path.exists(build_internal_android): | |
320 android_paths.insert(0, build_internal_android) | |
321 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) | |
322 | |
323 MainTestWrapper(options) | 312 MainTestWrapper(options) |
324 | 313 |
325 | 314 |
326 if __name__ == '__main__': | 315 if __name__ == '__main__': |
327 sys.exit(main(sys.argv)) | 316 sys.exit(main(sys.argv)) |
OLD | NEW |