コード例 #1
0
    def _run_test(self, test_input, shard_name):
        self._batch_count += 1

        stop_when_done = False
        if self._batch_size > 0 and self._batch_count >= self._batch_size:
            self._batch_count = 0
            stop_when_done = True

        self._update_test_input(test_input)
        start = time.time()

        # TODO(qyearsley): Re-add logging if it doesn't create too much load (crbug.com/673207).
        self._caller.post('started_test', test_input)
        result = single_test_runner.run_single_test(
            self._port, self._options, self._results_directory, self._name,
            self._primary_driver, self._secondary_driver, test_input,
            stop_when_done)

        result.shard_name = shard_name
        result.worker_name = self._name
        result.total_run_time = time.time() - start
        result.test_number = self._num_tests
        self._num_tests += 1
        self._caller.post('finished_test', result)
        self._clean_up_after_test(test_input, result)
        return result.device_failed
コード例 #2
0
ファイル: layout_test_runner.py プロジェクト: mirror/chromium
    def _run_test(self, test_input, shard_name):
        self._batch_count += 1

        stop_when_done = False
        if self._batch_size > 0 and self._batch_count >= self._batch_size:
            self._batch_count = 0
            stop_when_done = True

        self._update_test_input(test_input)
        start = time.time()

        _log.debug("%s %s started", self._name, test_input.test_name)
        self._caller.post('started_test', test_input)
        result = single_test_runner.run_single_test(
            self._port, self._options, self._results_directory, self._name,
            self._primary_driver, self._secondary_driver, test_input,
            stop_when_done)

        result.shard_name = shard_name
        result.worker_name = self._name
        result.total_run_time = time.time() - start
        result.test_number = self._num_tests
        self._num_tests += 1
        self._caller.post('finished_test', result)
        self._clean_up_after_test(test_input, result)
        return result.device_failed
コード例 #3
0
ファイル: layout_test_runner.py プロジェクト: DrovioHQ/Qt
    def _run_test(self, test_input, shard_name):
        self._batch_count += 1

        stop_when_done = False
        if self._batch_size > 0 and self._batch_count >= self._batch_size:
            self._batch_count = 0
            stop_when_done = True

        self._update_test_input(test_input)
        test_timeout_sec = self._timeout(test_input)
        start = time.time()
        device_failed = False

        _log.debug("%s %s started" % (self._name, test_input.test_name))
        self._caller.post('started_test', test_input, test_timeout_sec)
        result = single_test_runner.run_single_test(
            self._port, self._options, self._results_directory, self._name,
            self._primary_driver, self._secondary_driver, test_input,
            stop_when_done)

        result.shard_name = shard_name
        result.worker_name = self._name
        result.total_run_time = time.time() - start
        result.test_number = self._num_tests
        self._num_tests += 1
        self._caller.post('finished_test', result)
        self._clean_up_after_test(test_input, result)
        return result.device_failed
コード例 #4
0
    def _run_test(self, test_input, shard_name):
        self._batch_count += 1

        stop_when_done = False
        if self._batch_size > 0 and self._batch_count >= self._batch_size:
            self._batch_count = 0
            stop_when_done = True

        self._update_test_input(test_input)
        test_timeout_sec = self._timeout(test_input)
        start = time.time()
        self._caller.post('started_test', test_input, test_timeout_sec)

        if self._driver and self._driver.has_crashed():
            self._kill_driver()
        if not self._driver:
            self._driver = self._port.create_driver(self._worker_number)
        result = single_test_runner.run_single_test(self._port, self._options, self._results_directory,
            self._name, self._driver, test_input, stop_when_done)

        result.shard_name = shard_name
        result.worker_name = self._name
        result.total_run_time = time.time() - start
        result.test_number = self._num_tests
        self._num_tests += 1

        self._caller.post('finished_test', result)

        self._clean_up_after_test(test_input, result)
コード例 #5
0
ファイル: layout_test_runner.py プロジェクト: eocanha/webkit
 def _run_single_test(self, driver, test_input, stop_when_done):
     return single_test_runner.run_single_test(
         self._port,
         self._port._options,
         self._results_directory,
         TaskPool.Process.name,
         driver,
         test_input,
         stop_when_done,
     )
コード例 #6
0
    def _run_test(self, test_input, shard_name):
        self._batch_count += 1

        stop_when_done = False
        if self._batch_size > 0 and self._batch_count >= self._batch_size:
            self._batch_count = 0
            stop_when_done = True

        self._update_test_input(test_input)
        test_timeout_sec = self._timeout(test_input)
        start = time.time()
        device_failed = False

        if self._driver and self._driver.has_crashed():
            self._kill_driver()
        if not self._driver:
            self._driver = self._port.create_driver(self._worker_number)

        if not self._driver:
            # FIXME: Is this the best way to handle a device crashing in the middle of the test, or should we create
            # a new failure type?
            device_failed = True
            return device_failed

        self._caller.post('started_test', test_input, test_timeout_sec)
        result = single_test_runner.run_single_test(self._port, self._options,
                                                    self._results_directory,
                                                    self._name, self._driver,
                                                    test_input, stop_when_done)

        result.shard_name = shard_name
        result.worker_name = self._name
        result.total_run_time = time.time() - start
        result.test_number = self._num_tests
        self._num_tests += 1
        self._caller.post('finished_test', result)
        self._clean_up_after_test(test_input, result)
        return result.device_failed
コード例 #7
0
    def _run_test(self, test_input, shard_name):
        self._batch_count += 1

        stop_when_done = False
        if self._batch_size > 0 and self._batch_count >= self._batch_size:
            self._batch_count = 0
            stop_when_done = True

        self._update_test_input(test_input)
        test_timeout_sec = self._timeout(test_input)
        start = time.time()
        device_offline = False

        if self._driver and self._driver.has_crashed():
            self._kill_driver()
        if not self._driver:
            self._driver = self._port.create_driver(self._worker_number)

        if not self._driver:
            # FIXME: Is this the best way to handle a device crashing in the middle of the test, or should we create
            # a new failure type?
            device_offline = True
            return

        self._caller.post('started_test', test_input, test_timeout_sec)
        result = single_test_runner.run_single_test(self._port, self._options, self._results_directory,
            self._name, self._driver, test_input, stop_when_done)

        result.shard_name = shard_name
        result.worker_name = self._name
        result.total_run_time = time.time() - start
        result.test_number = self._num_tests
        self._num_tests += 1
        self._caller.post('finished_test', result)
        self._clean_up_after_test(test_input, result)

        return result.device_offline
コード例 #8
0
 def _run_single_test(self, driver, test_input, stop_when_done):
     return single_test_runner.run_single_test(self._port, self._options,
         test_input, driver, self._name, stop_when_done)
コード例 #9
0
 def _run_single_test(self, driver, test_input, stop_when_done):
     return single_test_runner.run_single_test(self._port, self._options, self._results_directory,
         self._name, driver, test_input, stop_when_done)
コード例 #10
0
 def run_single_test(self, driver, test_input):
     return single_test_runner.run_single_test(self._port, self._options,
         test_input, driver, self._name)
コード例 #11
0
 def _run_single_test(self, driver, test_input):
     return single_test_runner.run_single_test(self._port, self._options,
                                               test_input, driver,
                                               self._name)
コード例 #12
0
 def _run_single_test(self, driver, test_input, stop_when_done):
     return single_test_runner.run_single_test(self._port, self._options,
                                               test_input, driver,
                                               self._name, stop_when_done)