Exemplo n.º 1
0
    def _handle_error(self, driver_output, reference_filename=None):
        """Returns test failures if some unusual errors happen in driver's run.

        Args:
          driver_output: The output from the driver.
          reference_filename: The full path to the reference file which produced the driver_output.
              This arg is optional and should be used only in reftests until we have a better way to know
              which html file is used for producing the driver_output.
        """
        failures = []
        fs = self._port._filesystem
        if driver_output.timeout:
            failures.append(test_failures.FailureTimeout(reference_filename))

        if reference_filename:
            testname = self._port.relative_test_filename(reference_filename)
        else:
            testname = self._testname

        if driver_output.crash:
            failures.append(test_failures.FailureCrash(reference_filename))
            _log.debug("%s Stacktrace for %s:\n%s" %
                       (self._worker_name, testname, driver_output.error))
        elif driver_output.error:
            _log.debug("%s %s output stderr lines:\n%s" %
                       (self._worker_name, testname, driver_output.error))
        return failures
def get_result(filename, result_type=test_expectations.PASS, run_time=0):
    failures = []
    if result_type == test_expectations.TIMEOUT:
        failures = [test_failures.FailureTimeout()]
    elif result_type == test_expectations.CRASH:
        failures = [test_failures.FailureCrash()]
    return dump_render_tree_thread.TestResult(filename, failures, run_time,
                                              total_time_for_all_diffs=0,
                                              time_for_diffs=0)
Exemplo n.º 3
0
 def get_result(self, test, result_type=test_expectations.PASS, run_time=0):
     failures = []
     if result_type == test_expectations.TIMEOUT:
         failures = [test_failures.FailureTimeout()]
     elif result_type == test_expectations.CRASH:
         failures = [test_failures.FailureCrash()]
     path = self._port._filesystem.join(self._port.layout_tests_dir(), test)
     return test_results.TestResult(path,
                                    failures=failures,
                                    test_run_time=run_time)
Exemplo n.º 4
0
 def _failures_from_row(cls, row, table_title):
     if table_title == cls.fail_key:
         return cls._failures_from_fail_row(row)
     if table_title == cls.crash_key:
         return [test_failures.FailureCrash()]
     if table_title == cls.webprocess_crash_key:
         return [test_failures.FailureCrash()]
     if table_title == cls.timeout_key:
         return [test_failures.FailureTimeout()]
     if table_title == cls.missing_key:
         return [test_failures.FailureMissingResult(), test_failures.FailureMissingImageHash(), test_failures.FailureMissingImage()]
     return None
Exemplo n.º 5
0
 def get_result(self, test, result_type=test_expectations.PASS, run_time=0):
     failures = []
     if result_type == test_expectations.TIMEOUT:
         failures = [test_failures.FailureTimeout()]
     elif result_type == test_expectations.CRASH:
         failures = [test_failures.FailureCrash()]
     path = os.path.join(self._port.layout_tests_dir(), test)
     return dump_render_tree_thread.TestResult(path,
                                               failures,
                                               run_time,
                                               total_time_for_all_diffs=0,
                                               time_for_diffs=0)