OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import logging | 5 import logging |
6 import os | 6 import os |
7 import re | 7 import re |
8 import shutil | 8 import shutil |
9 import sys | 9 import sys |
10 | 10 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 class GtestTestInstance(test_instance.TestInstance): | 86 class GtestTestInstance(test_instance.TestInstance): |
87 | 87 |
88 def __init__(self, args, isolate_delegate, error_func): | 88 def __init__(self, args, isolate_delegate, error_func): |
89 super(GtestTestInstance, self).__init__() | 89 super(GtestTestInstance, self).__init__() |
90 # TODO(jbudorick): Support multiple test suites. | 90 # TODO(jbudorick): Support multiple test suites. |
91 if len(args.suite_name) > 1: | 91 if len(args.suite_name) > 1: |
92 raise ValueError('Platform mode currently supports only 1 gtest suite') | 92 raise ValueError('Platform mode currently supports only 1 gtest suite') |
93 self._suite = args.suite_name[0] | 93 self._suite = args.suite_name[0] |
94 | 94 |
95 if self._suite == 'content_browsertests': | 95 if (self._suite == 'content_browsertests' or |
96 error_func('content_browsertests are not currently supported ' | 96 self._suite == 'components_browsertests'): |
97 'in platform mode.') | 97 error_func('%s are not currently supported ' |
| 98 'in platform mode.' % self._suite) |
98 self._apk_path = os.path.join( | 99 self._apk_path = os.path.join( |
99 constants.GetOutDirectory(), 'apks', '%s.apk' % self._suite) | 100 constants.GetOutDirectory(), 'apks', '%s.apk' % self._suite) |
100 else: | 101 else: |
101 self._apk_path = os.path.join( | 102 self._apk_path = os.path.join( |
102 constants.GetOutDirectory(), '%s_apk' % self._suite, | 103 constants.GetOutDirectory(), '%s_apk' % self._suite, |
103 '%s-debug.apk' % self._suite) | 104 '%s-debug.apk' % self._suite) |
104 self._exe_path = os.path.join(constants.GetOutDirectory(), | 105 self._exe_path = os.path.join(constants.GetOutDirectory(), |
105 self._suite) | 106 self._suite) |
106 if not os.path.exists(self._apk_path): | 107 if not os.path.exists(self._apk_path): |
107 self._apk_path = None | 108 self._apk_path = None |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 return self._apk_path | 233 return self._apk_path |
233 | 234 |
234 @property | 235 @property |
235 def exe(self): | 236 def exe(self): |
236 return self._exe_path | 237 return self._exe_path |
237 | 238 |
238 @property | 239 @property |
239 def suite(self): | 240 def suite(self): |
240 return self._suite | 241 return self._suite |
241 | 242 |
OLD | NEW |