Chromium Code Reviews| Index: build/android/pylib/gtest/test_runner.py |
| diff --git a/build/android/pylib/gtest/test_runner.py b/build/android/pylib/gtest/test_runner.py |
| index c1343a45d9bb0c5ce70b5e24c47256ddb2f098ed..ad8d9324a17ccc57d34a2db3c37bb481e8de7f95 100644 |
| --- a/build/android/pylib/gtest/test_runner.py |
| +++ b/build/android/pylib/gtest/test_runner.py |
| @@ -16,28 +16,6 @@ import test_package_apk |
| import test_package_executable |
| -# We're moving to using isolate files instead of harcoding |
| -# dependencies here. Look at the TODO in dispatch.py. |
| -def _GetDataFilesForTestSuite(test_suite_basename): |
| - """Returns a list of data files/dirs needed by the test suite. |
| - |
| - Args: |
| - test_suite_basename: The test suite basename (e.g. base_unittests). |
| - |
| - Returns: |
| - A list of test file and directory paths. |
| - """ |
| - # Ideally, we'd just push all test data. However, it has >100MB, and a lot |
| - # of the files are not relevant (some are used for browser_tests, others for |
| - # features not supported, etc..). |
| - if test_suite_basename == 'modules_unittests': |
| - return [ |
| - 'resources', |
| - 'data', |
| - ] |
| - return [] |
| - |
| - |
| def _TestSuiteRequiresMockTestServer(test_suite_basename): |
| """Returns True if the test suite requires mock test server.""" |
| tests_require_net_test_server = ['unit_tests', 'net_unittests', |
| @@ -63,19 +41,17 @@ class TestRunner(base_test_runner.BaseTestRunner): |
| test_apk_package_name: Apk package name for tests running in APKs. |
| test_activity_name: Test activity to invoke for APK tests. |
| command_line_file: Filename to use to pass arguments to tests. |
| - deps_dir: The path to the dependency dir on the host to push to the device. |
| """ |
| def __init__(self, device, test_suite, test_arguments, timeout, |
| cleanup_test_files, tool_name, build_type, |
| in_webkit_checkout, push_deps, test_apk_package_name=None, |
| - test_activity_name=None, command_line_file=None, deps_dir=None): |
| + test_activity_name=None, command_line_file=None): |
| super(TestRunner, self).__init__(device, tool_name, build_type, push_deps) |
| self._running_on_emulator = self.device.startswith('emulator') |
| self._test_arguments = test_arguments |
| self.in_webkit_checkout = in_webkit_checkout |
| self._cleanup_test_files = cleanup_test_files |
| - self._deps_dir = deps_dir |
| logging.warning('Test suite: ' + test_suite) |
| if os.path.splitext(test_suite)[1] == '.apk': |
| @@ -115,23 +91,16 @@ class TestRunner(base_test_runner.BaseTestRunner): |
| self.PushWebKitUnitTestsData() |
| return |
| - if not self._deps_dir: |
| - logging.info('Did not find an isolate file for the test suite.') |
|
craigdh
2013/07/15 20:54:54
It might still be good to log something if the iso
frankf
2013/07/15 22:06:06
Done.
|
| - for p in _GetDataFilesForTestSuite(self.test_package.test_suite_basename): |
| + if os.path.exists(constants.ISOLATE_DEPS_DIR): |
| + device_dir = self.adb.GetExternalStorage() |
| + # TODO(frankf): linux_dumper_unittest_helper needs to be in the same dir |
| + # as breakpad_unittests exe. Find a better way to do this. |
| + if self.test_package.test_suite_basename == 'breakpad_unittests': |
| + device_dir = constants.TEST_EXECUTABLE_DIR |
| + for p in os.listdir(constants.ISOLATE_DEPS_DIR): |
| self.adb.PushIfNeeded( |
| - os.path.join(constants.DIR_SOURCE_ROOT, p), |
| - os.path.join(self.adb.GetExternalStorage(), p)) |
| - return |
| - |
| - device_dir = self.adb.GetExternalStorage() |
| - # TODO(frankf): linux_dumper_unittest_helper needs to be in the same dir |
| - # as breakpad_unittests exe. Find a better way to do this. |
| - if self.test_package.test_suite_basename == 'breakpad_unittests': |
| - device_dir = constants.TEST_EXECUTABLE_DIR |
| - for p in os.listdir(self._deps_dir): |
| - self.adb.PushIfNeeded( |
| - os.path.join(self._deps_dir, p), |
| - os.path.join(device_dir, p)) |
| + os.path.join(constants.ISOLATE_DEPS_DIR, p), |
| + os.path.join(device_dir, p)) |
| def PushWebKitUnitTestsData(self): |
| """Pushes the webkit_unit_tests data files to the device. |