| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 self._pid = 0 | 189 self._pid = 0 |
| 190 | 190 |
| 191 | 191 |
| 192 class TestSharder(BaseTestSharder): | 192 class TestSharder(BaseTestSharder): |
| 193 """Responsible for sharding the tests on the connected devices.""" | 193 """Responsible for sharding the tests on the connected devices.""" |
| 194 | 194 |
| 195 def __init__(self, attached_devices, test_suite, gtest_filter, | 195 def __init__(self, attached_devices, test_suite, gtest_filter, |
| 196 test_arguments, timeout, rebaseline, performance_test, | 196 test_arguments, timeout, rebaseline, performance_test, |
| 197 cleanup_test_files, tool, log_dump_name, fast_and_loose, | 197 cleanup_test_files, tool, log_dump_name, fast_and_loose, |
| 198 build_type): | 198 build_type): |
| 199 BaseTestSharder.__init__(self, attached_devices) | 199 BaseTestSharder.__init__(self, attached_devices, build_type) |
| 200 self.test_suite = test_suite | 200 self.test_suite = test_suite |
| 201 self.test_suite_basename = os.path.basename(test_suite) | 201 self.test_suite_basename = os.path.basename(test_suite) |
| 202 self.gtest_filter = gtest_filter or '' | 202 self.gtest_filter = gtest_filter or '' |
| 203 self.test_arguments = test_arguments | 203 self.test_arguments = test_arguments |
| 204 self.timeout = timeout | 204 self.timeout = timeout |
| 205 self.rebaseline = rebaseline | 205 self.rebaseline = rebaseline |
| 206 self.performance_test = performance_test | 206 self.performance_test = performance_test |
| 207 self.cleanup_test_files = cleanup_test_files | 207 self.cleanup_test_files = cleanup_test_files |
| 208 self.tool = tool | 208 self.tool = tool |
| 209 self.log_dump_name = log_dump_name | 209 self.log_dump_name = log_dump_name |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 # the batch (this happens because the exit status is a sum of all failures | 459 # the batch (this happens because the exit status is a sum of all failures |
| 460 # from all suites, but the buildbot associates the exit status only with the | 460 # from all suites, but the buildbot associates the exit status only with the |
| 461 # most recent step). | 461 # most recent step). |
| 462 if options.exit_code: | 462 if options.exit_code: |
| 463 return failed_tests_count | 463 return failed_tests_count |
| 464 return 0 | 464 return 0 |
| 465 | 465 |
| 466 | 466 |
| 467 if __name__ == '__main__': | 467 if __name__ == '__main__': |
| 468 sys.exit(main(sys.argv)) | 468 sys.exit(main(sys.argv)) |
| OLD | NEW |