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 os | 7 import os |
8 import re | 8 import re |
9 | 9 |
10 from pylib import constants | 10 from pylib import constants |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 continue | 82 continue |
83 if 'YOU HAVE' in test: | 83 if 'YOU HAVE' in test: |
84 break | 84 break |
85 test_name = test[2:] | 85 test_name = test[2:] |
86 if not any([test_name.startswith(x) for x in disabled_prefixes]): | 86 if not any([test_name.startswith(x) for x in disabled_prefixes]): |
87 ret += [current + test_name] | 87 ret += [current + test_name] |
88 return ret | 88 return ret |
89 | 89 |
90 def PushDataAndPakFiles(self): | 90 def PushDataAndPakFiles(self): |
91 external_storage = self.adb.GetExternalStorage() | 91 external_storage = self.adb.GetExternalStorage() |
92 if (self.test_suite_basename == 'ui_unittests' or | 92 if (self.test_suite_basename == 'ui_unittests'): |
93 self.test_suite_basename == 'unit_tests'): | |
94 self.adb.PushIfNeeded( | 93 self.adb.PushIfNeeded( |
95 self.test_suite_dirname + '/chrome.pak', | 94 self.test_suite_dirname + '/chrome.pak', |
96 external_storage + '/paks/chrome.pak') | 95 external_storage + '/paks/chrome.pak') |
97 self.adb.PushIfNeeded( | 96 self.adb.PushIfNeeded( |
98 self.test_suite_dirname + '/locales/en-US.pak', | 97 self.test_suite_dirname + '/locales/en-US.pak', |
99 external_storage + '/paks/en-US.pak') | 98 external_storage + '/paks/en-US.pak') |
100 if self.test_suite_basename == 'unit_tests': | |
101 self.adb.PushIfNeeded( | |
102 self.test_suite_dirname + '/resources.pak', | |
103 external_storage + '/paks/resources.pak') | |
104 self.adb.PushIfNeeded( | |
105 self.test_suite_dirname + '/chrome_100_percent.pak', | |
106 external_storage + '/paks/chrome_100_percent.pak') | |
107 self.adb.PushIfNeeded(self.test_suite_dirname + '/test_data', | |
108 external_storage + '/test_data') | |
109 if self.test_suite_basename in ('content_unittests', | 99 if self.test_suite_basename in ('content_unittests', |
110 'components_unittests'): | 100 'components_unittests'): |
111 self.adb.PushIfNeeded( | 101 self.adb.PushIfNeeded( |
112 self.test_suite_dirname + '/content_resources.pak', | 102 self.test_suite_dirname + '/content_resources.pak', |
113 external_storage + '/paks/content_resources.pak') | 103 external_storage + '/paks/content_resources.pak') |
114 if self.test_suite_basename == 'breakpad_unittests': | 104 if self.test_suite_basename == 'breakpad_unittests': |
115 self.adb.PushIfNeeded( | 105 self.adb.PushIfNeeded( |
116 self.test_suite_dirname + '/linux_dumper_unittest_helper', | 106 self.test_suite_dirname + '/linux_dumper_unittest_helper', |
117 constants.TEST_EXECUTABLE_DIR + '/linux_dumper_unittest_helper') | 107 constants.TEST_EXECUTABLE_DIR + '/linux_dumper_unittest_helper') |
118 if self.test_suite_basename == 'content_browsertests': | 108 if self.test_suite_basename == 'content_browsertests': |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 finally: | 182 finally: |
193 p.close() | 183 p.close() |
194 | 184 |
195 ret_code = self._GetGTestReturnCode() | 185 ret_code = self._GetGTestReturnCode() |
196 if ret_code: | 186 if ret_code: |
197 logging.critical( | 187 logging.critical( |
198 'gtest exit code: %d\npexpect.before: %s\npexpect.after: %s', | 188 'gtest exit code: %d\npexpect.before: %s\npexpect.after: %s', |
199 ret_code, p.before, p.after) | 189 ret_code, p.before, p.after) |
200 | 190 |
201 return results | 191 return results |
OLD | NEW |