| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 | 5 |
| 6 import logging | 6 import logging |
| 7 import re | 7 import re |
| 8 import os | 8 import os |
| 9 | 9 |
| 10 from pylib import constants | 10 from pylib import constants |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 external_storage + '/paks/en-US.pak') | 97 external_storage + '/paks/en-US.pak') |
| 98 if self.test_suite_basename == 'unit_tests': | 98 if self.test_suite_basename == 'unit_tests': |
| 99 self.adb.PushIfNeeded( | 99 self.adb.PushIfNeeded( |
| 100 self.test_suite_dirname + '/resources.pak', | 100 self.test_suite_dirname + '/resources.pak', |
| 101 external_storage + '/paks/resources.pak') | 101 external_storage + '/paks/resources.pak') |
| 102 self.adb.PushIfNeeded( | 102 self.adb.PushIfNeeded( |
| 103 self.test_suite_dirname + '/chrome_100_percent.pak', | 103 self.test_suite_dirname + '/chrome_100_percent.pak', |
| 104 external_storage + '/paks/chrome_100_percent.pak') | 104 external_storage + '/paks/chrome_100_percent.pak') |
| 105 self.adb.PushIfNeeded(self.test_suite_dirname + '/test_data', | 105 self.adb.PushIfNeeded(self.test_suite_dirname + '/test_data', |
| 106 external_storage + '/test_data') | 106 external_storage + '/test_data') |
| 107 if self.test_suite_basename == 'content_unittests': | 107 if self.test_suite_basename in ('content_unittests', |
| 108 'components_unittests'): |
| 108 self.adb.PushIfNeeded( | 109 self.adb.PushIfNeeded( |
| 109 self.test_suite_dirname + '/content_resources.pak', | 110 self.test_suite_dirname + '/content_resources.pak', |
| 110 external_storage + '/paks/content_resources.pak') | 111 external_storage + '/paks/content_resources.pak') |
| 111 if self.test_suite_basename == 'breakpad_unittests': | 112 if self.test_suite_basename == 'breakpad_unittests': |
| 112 self.adb.PushIfNeeded( | 113 self.adb.PushIfNeeded( |
| 113 self.test_suite_dirname + '/linux_dumper_unittest_helper', | 114 self.test_suite_dirname + '/linux_dumper_unittest_helper', |
| 114 constants.TEST_EXECUTABLE_DIR + '/linux_dumper_unittest_helper') | 115 constants.TEST_EXECUTABLE_DIR + '/linux_dumper_unittest_helper') |
| 115 | 116 |
| 116 def _WatchTestOutput(self, p): | 117 def _WatchTestOutput(self, p): |
| 117 """Watches the test output. | 118 """Watches the test output. |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 173 |
| 173 ret_code = self._GetGTestReturnCode() | 174 ret_code = self._GetGTestReturnCode() |
| 174 if ret_code: | 175 if ret_code: |
| 175 logging.critical( | 176 logging.critical( |
| 176 'gtest exit code: %d\npexpect.before: %s\npexpect.after: %s', | 177 'gtest exit code: %d\npexpect.before: %s\npexpect.after: %s', |
| 177 ret_code, p.before, p.after) | 178 ret_code, p.before, p.after) |
| 178 | 179 |
| 179 # Create TestResults and return | 180 # Create TestResults and return |
| 180 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, | 181 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, |
| 181 crashed=crashed_tests, timed_out=timed_out_tests) | 182 crashed=crashed_tests, timed_out=timed_out_tests) |
| OLD | NEW |