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 import logging | 5 import logging |
6 import os | 6 import os |
7 import sys | 7 import sys |
8 | 8 |
9 from base_test_runner import BaseTestRunner | 9 from base_test_runner import BaseTestRunner |
10 import debug_info | 10 import debug_info |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 """Returns True if the test suite requires mock test server.""" | 69 """Returns True if the test suite requires mock test server.""" |
70 return False | 70 return False |
71 # TODO(yfriedman): Disabled because of flakiness. | 71 # TODO(yfriedman): Disabled because of flakiness. |
72 # (self.test_package.test_suite_basename == 'unit_tests' or | 72 # (self.test_package.test_suite_basename == 'unit_tests' or |
73 # self.test_package.test_suite_basename == 'net_unittests' or | 73 # self.test_package.test_suite_basename == 'net_unittests' or |
74 # False) | 74 # False) |
75 | 75 |
76 def _GetFilterFileName(self): | 76 def _GetFilterFileName(self): |
77 """Returns the filename of gtest filter.""" | 77 """Returns the filename of gtest filter.""" |
78 return os.path.join(sys.path[0], 'gtest_filter', | 78 return os.path.join(sys.path[0], 'gtest_filter', |
79 self.test_package.GetDisabledTestsBaseFileName() + '_disabled') | 79 self.test_package.test_suite_basename + '_disabled') |
80 | 80 |
81 def _GetAdditionalEmulatorFilterName(self): | 81 def _GetAdditionalEmulatorFilterName(self): |
82 """Returns the filename of additional gtest filter for emulator.""" | 82 """Returns the filename of additional gtest filter for emulator.""" |
83 return os.path.join(sys.path[0], 'gtest_filter', | 83 return os.path.join(sys.path[0], 'gtest_filter', |
84 self.test_package.GetDisabledTestsBaseFileName() + | 84 self.test_package.test_suite_basename + |
85 '_emulator_additional_disabled') | 85 '_emulator_additional_disabled') |
86 | 86 |
87 def GetDisabledTests(self): | 87 def GetDisabledTests(self): |
88 """Returns a list of disabled tests. | 88 """Returns a list of disabled tests. |
89 | 89 |
90 Returns: | 90 Returns: |
91 A list of disabled tests obtained from gtest_filter/test_suite_disabled. | 91 A list of disabled tests obtained from gtest_filter/test_suite_disabled. |
92 """ | 92 """ |
93 disabled_tests = run_tests_helper.GetExpectations(self._GetFilterFileName()) | 93 disabled_tests = run_tests_helper.GetExpectations(self._GetFilterFileName()) |
94 if self._running_on_emulator: | 94 if self._running_on_emulator: |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 def TearDown(self): | 304 def TearDown(self): |
305 """Cleans up the test enviroment for the test suite.""" | 305 """Cleans up the test enviroment for the test suite.""" |
306 self.test_package.tool.CleanUpEnvironment() | 306 self.test_package.tool.CleanUpEnvironment() |
307 if self.test_package.cleanup_test_files: | 307 if self.test_package.cleanup_test_files: |
308 self.adb.RemovePushedFiles() | 308 self.adb.RemovePushedFiles() |
309 if self.dump_debug_info: | 309 if self.dump_debug_info: |
310 self.dump_debug_info.StopRecordingLog() | 310 self.dump_debug_info.StopRecordingLog() |
311 if self.test_package.performance_test: | 311 if self.test_package.performance_test: |
312 self.adb.TearDownPerformanceTest() | 312 self.adb.TearDownPerformanceTest() |
313 super(SingleTestRunner, self).TearDown() | 313 super(SingleTestRunner, self).TearDown() |
OLD | NEW |