Exemplo n.º 1
0
 def _mark_interrupted_tests_as_skipped(self, test_run_results):
     for test_input in self._test_inputs:
         if test_input.test_name not in test_run_results.results_by_name:
             result = test_results.TestResult(test_input.test_name, [test_failures.FailureEarlyExit()])
             # FIXME: We probably need to loop here if there are multiple iterations.
             # FIXME: Also, these results are really neither expected nor unexpected. We probably
             # need a third type of result.
             test_run_results.add(result, expected=False, test_is_slow=self._test_is_slow(test_input.test_name))
Exemplo n.º 2
0
def run_single_test(port, options, results_directory, worker_name, driver,
                    test_input):
    runner = SingleTestRunner(port, options, results_directory, worker_name,
                              driver, test_input)
    try:
        test_result = runner.run()
        if not options.no_expectations:
            test_result.create_artifacts()
        return test_result
    except DeviceFailure as error:
        _log.error('device failed: %s', error)
        return TestResult(test_input.test_name,
                          device_failed=True,
                          failures=[test_failures.FailureEarlyExit()])
Exemplo n.º 3
0
 def test_results_multiple(self):
     driver_output = DriverOutput(None, None, None, None)
     failure_crash = [
         test_failures.FailureCrash(driver_output, None),
         test_failures.TestFailure(driver_output, None)
     ]
     failure_timeout = [
         test_failures.FailureTimeout(driver_output, None),
         test_failures.TestFailure(driver_output, None)
     ]
     failure_early_exit = [
         test_failures.FailureEarlyExit(driver_output, None),
         test_failures.TestFailure(driver_output, None)
     ]
     # Should not raise an exception for CRASH and FAIL.
     TestResult('foo', failures=failure_crash)
     # Should not raise an exception for TIMEOUT and FAIL.
     TestResult('foo', failures=failure_timeout)
     with self.assertRaises(AssertionError):
         TestResult('foo', failures=failure_early_exit)