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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 external_storage + '/test_data') | 104 external_storage + '/test_data') |
105 if self.test_suite_basename in ('content_unittests', | 105 if self.test_suite_basename in ('content_unittests', |
106 'components_unittests'): | 106 'components_unittests'): |
107 self.adb.PushIfNeeded( | 107 self.adb.PushIfNeeded( |
108 self.test_suite_dirname + '/content_resources.pak', | 108 self.test_suite_dirname + '/content_resources.pak', |
109 external_storage + '/paks/content_resources.pak') | 109 external_storage + '/paks/content_resources.pak') |
110 if self.test_suite_basename == 'breakpad_unittests': | 110 if self.test_suite_basename == 'breakpad_unittests': |
111 self.adb.PushIfNeeded( | 111 self.adb.PushIfNeeded( |
112 self.test_suite_dirname + '/linux_dumper_unittest_helper', | 112 self.test_suite_dirname + '/linux_dumper_unittest_helper', |
113 constants.TEST_EXECUTABLE_DIR + '/linux_dumper_unittest_helper') | 113 constants.TEST_EXECUTABLE_DIR + '/linux_dumper_unittest_helper') |
| 114 if self.test_suite_basename == 'content_browsertests': |
| 115 self.adb.PushIfNeeded( |
| 116 self.test_suite_dirname + |
| 117 '/../content_shell/assets/content_shell.pak', |
| 118 external_storage + '/paks/content_shell.pak') |
114 | 119 |
115 def _WatchTestOutput(self, p): | 120 def _WatchTestOutput(self, p): |
116 """Watches the test output. | 121 """Watches the test output. |
117 Args: | 122 Args: |
118 p: the process generating output as created by pexpect.spawn. | 123 p: the process generating output as created by pexpect.spawn. |
119 """ | 124 """ |
120 ok_tests = [] | 125 ok_tests = [] |
121 failed_tests = [] | 126 failed_tests = [] |
122 crashed_tests = [] | 127 crashed_tests = [] |
123 timed_out_tests = [] | 128 timed_out_tests = [] |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 179 |
175 ret_code = self._GetGTestReturnCode() | 180 ret_code = self._GetGTestReturnCode() |
176 if ret_code: | 181 if ret_code: |
177 logging.critical( | 182 logging.critical( |
178 'gtest exit code: %d\npexpect.before: %s\npexpect.after: %s', | 183 'gtest exit code: %d\npexpect.before: %s\npexpect.after: %s', |
179 ret_code, p.before, p.after) | 184 ret_code, p.before, p.after) |
180 | 185 |
181 # Create TestResults and return | 186 # Create TestResults and return |
182 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, | 187 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, |
183 crashed=crashed_tests, timed_out=timed_out_tests) | 188 crashed=crashed_tests, timed_out=timed_out_tests) |
OLD | NEW |