예제 #1
0
    def _run_test(self, test_input, shard_name, batch_size):
        # If the batch size has been exceeded, kill the driver.
        if batch_size > 0 and self._batch_count >= batch_size:
            self._kill_driver()
            self._batch_count = 0

        self._batch_count += 1

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

        # TODO(crbug.com/673207): Re-add logging if it doesn't make the logs too large.
        self._caller.post('started_test', test_input)
        result = single_test_runner.run_single_test(
            self._port, self._options, self._results_directory, self._name,
            self._driver, test_input)

        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
    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