| 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 shutil | 7 import shutil |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 from pylib import constants | 10 from pylib import constants |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 # crbug.com/258690 | 35 # crbug.com/258690 |
| 36 'webkit/data/bmp_decoder', | 36 'webkit/data/bmp_decoder', |
| 37 'webkit/data/ico_decoder', | 37 'webkit/data/ico_decoder', |
| 38 ] | 38 ] |
| 39 | 39 |
| 40 | 40 |
| 41 class GtestTestInstance(test_instance.TestInstance): | 41 class GtestTestInstance(test_instance.TestInstance): |
| 42 | 42 |
| 43 def __init__(self, options, isolate_delegate): | 43 def __init__(self, options, isolate_delegate): |
| 44 super(GtestTestInstance, self).__init__() | 44 super(GtestTestInstance, self).__init__() |
| 45 # TODO(jbudorick): Support multiple test suites. |
| 46 if len(options.suite_name) > 1: |
| 47 raise ValueError('Platform mode currently supports only 1 gtest suite') |
| 45 self._apk_path = os.path.join( | 48 self._apk_path = os.path.join( |
| 46 constants.GetOutDirectory(), '%s_apk' % options.suite_name, | 49 constants.GetOutDirectory(), '%s_apk' % options.suite_name[0], |
| 47 '%s-debug.apk' % options.suite_name) | 50 '%s-debug.apk' % options.suite_name[0]) |
| 48 self._data_deps = [] | 51 self._data_deps = [] |
| 49 self._gtest_filter = options.test_filter | 52 self._gtest_filter = options.test_filter |
| 50 if options.isolate_file_path: | 53 if options.isolate_file_path: |
| 51 self._isolate_abs_path = os.path.abspath(options.isolate_file_path) | 54 self._isolate_abs_path = os.path.abspath(options.isolate_file_path) |
| 52 self._isolate_delegate = isolate_delegate | 55 self._isolate_delegate = isolate_delegate |
| 53 self._isolated_abs_path = os.path.join( | 56 self._isolated_abs_path = os.path.join( |
| 54 constants.GetOutDirectory(), '%s.isolated' % options.suite_name) | 57 constants.GetOutDirectory(), '%s.isolated' % options.suite_name) |
| 55 else: | 58 else: |
| 56 logging.warning('No isolate file provided. No data deps will be pushed.'); | 59 logging.warning('No isolate file provided. No data deps will be pushed.'); |
| 57 self._isolate_delegate = None | 60 self._isolate_delegate = None |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 self._isolate_delegate.Clear() | 131 self._isolate_delegate.Clear() |
| 129 | 132 |
| 130 @property | 133 @property |
| 131 def apk(self): | 134 def apk(self): |
| 132 return self._apk_path | 135 return self._apk_path |
| 133 | 136 |
| 134 @property | 137 @property |
| 135 def suite(self): | 138 def suite(self): |
| 136 return self._suite | 139 return self._suite |
| 137 | 140 |
| OLD | NEW |