OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Runs all the native unit tests. | 7 """Runs all the native unit tests. |
8 | 8 |
9 1. Copy over test binary to /data/local on device. | 9 1. Copy over test binary to /data/local on device. |
10 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) | 10 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 self._pid = 0 | 187 self._pid = 0 |
188 | 188 |
189 | 189 |
190 class TestSharder(BaseTestSharder): | 190 class TestSharder(BaseTestSharder): |
191 """Responsible for sharding the tests on the connected devices.""" | 191 """Responsible for sharding the tests on the connected devices.""" |
192 | 192 |
193 def __init__(self, attached_devices, test_suite, gtest_filter, | 193 def __init__(self, attached_devices, test_suite, gtest_filter, |
194 test_arguments, timeout, rebaseline, performance_test, | 194 test_arguments, timeout, rebaseline, performance_test, |
195 cleanup_test_files, tool, log_dump_name, fast_and_loose, | 195 cleanup_test_files, tool, log_dump_name, fast_and_loose, |
196 build_type): | 196 build_type): |
197 BaseTestSharder.__init__(self, attached_devices) | 197 BaseTestSharder.__init__(self, attached_devices, build_type) |
198 self.test_suite = test_suite | 198 self.test_suite = test_suite |
199 self.test_suite_basename = os.path.basename(test_suite) | 199 self.test_suite_basename = os.path.basename(test_suite) |
200 self.gtest_filter = gtest_filter or '' | 200 self.gtest_filter = gtest_filter or '' |
201 self.test_arguments = test_arguments | 201 self.test_arguments = test_arguments |
202 self.timeout = timeout | 202 self.timeout = timeout |
203 self.rebaseline = rebaseline | 203 self.rebaseline = rebaseline |
204 self.performance_test = performance_test | 204 self.performance_test = performance_test |
205 self.cleanup_test_files = cleanup_test_files | 205 self.cleanup_test_files = cleanup_test_files |
206 self.tool = tool | 206 self.tool = tool |
207 self.log_dump_name = log_dump_name | 207 self.log_dump_name = log_dump_name |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 # the batch (this happens because the exit status is a sum of all failures | 442 # the batch (this happens because the exit status is a sum of all failures |
443 # from all suites, but the buildbot associates the exit status only with the | 443 # from all suites, but the buildbot associates the exit status only with the |
444 # most recent step). | 444 # most recent step). |
445 if options.exit_code: | 445 if options.exit_code: |
446 return failed_tests_count | 446 return failed_tests_count |
447 return 0 | 447 return 0 |
448 | 448 |
449 | 449 |
450 if __name__ == '__main__': | 450 if __name__ == '__main__': |
451 sys.exit(main(sys.argv)) | 451 sys.exit(main(sys.argv)) |
OLD | NEW |