OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import logging | 5 import logging |
6 import os | 6 import os |
7 | 7 |
8 from pylib import android_commands | 8 from pylib import android_commands |
9 from pylib import cmd_helper | 9 from pylib import cmd_helper |
10 from pylib import constants | 10 from pylib import constants |
(...skipping 18 matching lines...) Expand all Loading... |
29 # to dispatch any tests. | 29 # to dispatch any tests. |
30 if not ports.ResetTestServerPortAllocation(): | 30 if not ports.ResetTestServerPortAllocation(): |
31 raise Exception('Failed to reset test server port.') | 31 raise Exception('Failed to reset test server port.') |
32 | 32 |
33 test_suite_dir = os.path.join(cmd_helper.OutDirectory.get(), | 33 test_suite_dir = os.path.join(cmd_helper.OutDirectory.get(), |
34 options.build_type) | 34 options.build_type) |
35 options.test_suite = os.path.join(test_suite_dir, | 35 options.test_suite = os.path.join(test_suite_dir, |
36 'apks', | 36 'apks', |
37 constants.BROWSERTEST_SUITE_NAME + '.apk') | 37 constants.BROWSERTEST_SUITE_NAME + '.apk') |
38 | 38 |
39 options.test_arguments = '--single_process %s' % options.test_arguments | |
40 | |
41 # Constructs a new TestRunner with the current options. | 39 # Constructs a new TestRunner with the current options. |
42 def RunnerFactory(device, shard_index): | 40 def RunnerFactory(device, shard_index): |
43 return test_runner.TestRunner( | 41 return test_runner.TestRunner( |
44 device, | 42 device, |
45 options.test_suite, | 43 options.test_suite, |
46 options.test_arguments, | 44 options.test_arguments, |
47 options.timeout, | 45 options.timeout, |
48 options.cleanup_test_files, | 46 options.cleanup_test_files, |
49 options.tool, | 47 options.tool, |
50 options.build_type, | 48 options.build_type, |
(...skipping 11 matching lines...) Expand all Loading... |
62 | 60 |
63 # Run tests. | 61 # Run tests. |
64 test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices, | 62 test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices, |
65 all_tests, options.build_type) | 63 all_tests, options.build_type) |
66 test_results.LogFull( | 64 test_results.LogFull( |
67 test_type='Unit test', | 65 test_type='Unit test', |
68 test_package=constants.BROWSERTEST_SUITE_NAME, | 66 test_package=constants.BROWSERTEST_SUITE_NAME, |
69 build_type=options.build_type, | 67 build_type=options.build_type, |
70 flakiness_server=options.flakiness_dashboard_server) | 68 flakiness_server=options.flakiness_dashboard_server) |
71 test_results.PrintAnnotation() | 69 test_results.PrintAnnotation() |
OLD | NEW |