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 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 '--build-number', options.build_properties.get('buildnumber', ''), | 229 '--build-number', options.build_properties.get('buildnumber', ''), |
230 '--master-name', options.build_properties.get('mastername', ''), | 230 '--master-name', options.build_properties.get('mastername', ''), |
231 '--build-name', options.build_properties.get('buildername', ''), | 231 '--build-name', options.build_properties.get('buildername', ''), |
232 '--platform=chromium-android'] | 232 '--platform=chromium-android'] |
233 | 233 |
234 for flag in 'test_results_server', 'driver_name', 'additional_drt_flag': | 234 for flag in 'test_results_server', 'driver_name', 'additional_drt_flag': |
235 if flag in options.factory_properties: | 235 if flag in options.factory_properties: |
236 cmd_args.extend(['--%s' % flag.replace('_', '-'), | 236 cmd_args.extend(['--%s' % flag.replace('_', '-'), |
237 options.factory_properties.get(flag)]) | 237 options.factory_properties.get(flag)]) |
238 | 238 |
| 239 for f in options.factory_properties.get('additional_expectations', []): |
| 240 cmd_args.extend( |
| 241 ['--additional-expectations=%s' % os.path.join(CHROME_SRC, *f)]) |
| 242 |
| 243 # TODO(dpranke): Remove this block after |
| 244 # https://codereview.chromium.org/12927002/ lands. |
239 for f in options.factory_properties.get('additional_expectations_files', []): | 245 for f in options.factory_properties.get('additional_expectations_files', []): |
240 cmd_args.extend( | 246 cmd_args.extend( |
241 ['--additional-expectations=%s' % os.path.join(CHROME_SRC, *f)]) | 247 ['--additional-expectations=%s' % os.path.join(CHROME_SRC, *f)]) |
242 | 248 |
243 RunCmd(['webkit/tools/layout_tests/run_webkit_tests.py'] + cmd_args) | 249 RunCmd(['webkit/tools/layout_tests/run_webkit_tests.py'] + cmd_args) |
244 | 250 |
245 | 251 |
246 def MainTestWrapper(options): | 252 def MainTestWrapper(options): |
247 # Restart adb to work around bugs, sleep to wait for usb discovery. | 253 # Restart adb to work around bugs, sleep to wait for usb discovery. |
248 RunCmd(['adb', 'kill-server']) | 254 RunCmd(['adb', 'kill-server']) |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 'slave', 'android')) | 359 'slave', 'android')) |
354 if os.path.exists(build_internal_android): | 360 if os.path.exists(build_internal_android): |
355 android_paths.insert(0, build_internal_android) | 361 android_paths.insert(0, build_internal_android) |
356 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) | 362 os.environ['PATH'] = os.pathsep.join(android_paths + [os.environ['PATH']]) |
357 | 363 |
358 MainTestWrapper(options) | 364 MainTestWrapper(options) |
359 | 365 |
360 | 366 |
361 if __name__ == '__main__': | 367 if __name__ == '__main__': |
362 sys.exit(main(sys.argv)) | 368 sys.exit(main(sys.argv)) |
OLD | NEW |