예제 #1
0
    def __init__(self, device, test_suite, gtest_filter, test_arguments,
                 timeout, cleanup_test_files, tool_name, shard_index,
                 dump_debug_info, build_type, in_webkit_checkout):
        BaseTestRunner.__init__(self, device, tool_name, shard_index,
                                build_type)
        self._running_on_emulator = self.device.startswith('emulator')
        self._gtest_filter = gtest_filter
        self._test_arguments = test_arguments
        self.test_results = TestResults()
        if dump_debug_info:
            self.dump_debug_info = debug_info.GTestDebugInfo(
                self.adb, device, os.path.basename(test_suite), gtest_filter)
        else:
            self.dump_debug_info = None
        self.in_webkit_checkout = in_webkit_checkout

        logging.warning('Test suite: ' + test_suite)
        if os.path.splitext(test_suite)[1] == '.apk':
            self.test_package = TestPackageApk(self.adb, device, test_suite,
                                               timeout, cleanup_test_files,
                                               self.tool, self.dump_debug_info)
        else:
            # Put a copy into the android out/target directory, to allow stack trace
            # generation.
            symbols_dir = os.path.join(constants.CHROME_DIR, 'out', build_type,
                                       'lib.target')
            self.test_package = TestPackageExecutable(
                self.adb, device, test_suite, timeout, cleanup_test_files,
                self.tool, self.dump_debug_info, symbols_dir)
예제 #2
0
  def __init__(self, device, test_suite, gtest_filter, test_arguments, timeout,
               rebaseline, performance_test, cleanup_test_files, tool,
               shard_index, dump_debug_info=False,
               fast_and_loose=False):
    BaseTestRunner.__init__(self, device, shard_index)
    self._running_on_emulator = self.device.startswith('emulator')
    self._gtest_filter = gtest_filter
    self._test_arguments = test_arguments
    self.test_results = TestResults()
    if dump_debug_info:
      self.dump_debug_info = debug_info.GTestDebugInfo(self.adb, device,
           os.path.basename(test_suite), gtest_filter)
    else:
      self.dump_debug_info = None
    self.fast_and_loose = fast_and_loose

    if os.path.splitext(test_suite)[1] == '.apk':
      self.test_package = TestPackageApk(
          self.adb, device,
          test_suite, timeout, rebaseline, performance_test, cleanup_test_files,
          tool, self.dump_debug_info)
    else:
      self.test_package = TestPackageExecutable(
          self.adb, device,
          test_suite, timeout, rebaseline, performance_test, cleanup_test_files,
          tool, self.dump_debug_info)
    def __init__(self, device, test_suite, gtest_filter, test_arguments,
                 timeout, rebaseline, performance_test, cleanup_test_files,
                 tool_name, shard_index, dump_debug_info, fast_and_loose,
                 build_type):
        BaseTestRunner.__init__(self, device, tool_name, shard_index,
                                build_type)
        self._running_on_emulator = self.device.startswith('emulator')
        self._gtest_filter = gtest_filter
        self._test_arguments = test_arguments
        self.test_results = TestResults()
        if dump_debug_info:
            self.dump_debug_info = debug_info.GTestDebugInfo(
                self.adb, device, os.path.basename(test_suite), gtest_filter)
        else:
            self.dump_debug_info = None
        self.fast_and_loose = fast_and_loose

        logging.warning('Test suite: ' + test_suite)
        if os.path.splitext(test_suite)[1] == '.apk':
            self.test_package = TestPackageApk(self.adb, device, test_suite,
                                               timeout, rebaseline,
                                               performance_test,
                                               cleanup_test_files, self.tool,
                                               self.dump_debug_info)
        else:
            self.test_package = TestPackageExecutable(
                self.adb, device, test_suite, timeout, rebaseline,
                performance_test, cleanup_test_files, self.tool,
                self.dump_debug_info)
        self._performance_test_setup = None
        if performance_test:
            self._performance_test_setup = perf_tests_helper.PerfTestSetup(
                self.adb)