def _run_compare_test(self):
     driver_output = self._driver.run_test(self._driver_input())
     expected_driver_output = self._expected_driver_output()
     test_result = self._compare_output(driver_output, expected_driver_output)
     test_result_writer.write_test_result(self._port, self._filename,
                                          driver_output, expected_driver_output, test_result.failures)
     return test_result
    def _process_output(self, driver_output):
        """Receives the output from a DumpRenderTree process, subjects it to a
        number of tests, and returns a list of failure types the test produced.
        Args:
          driver_output: a DriverOutput object containing the output from the driver

        Returns: a TestResult object
        """
        fs = self._port._filesystem
        failures = self._handle_error(driver_output)
        expected_driver_output = self._expected_driver_output()

        # Check the output and save the results.
        start_time = time.time()
        time_for_diffs = {}
        for test_type in self._test_types:
            start_diff_time = time.time()
            new_failures = test_type.compare_output(
                self._port, self._filename, self._options, driver_output,
                expected_driver_output)
            # Don't add any more failures if we already have a crash, so we don't
            # double-report those tests. We do double-report for timeouts since
            # we still want to see the text and image output.
            if not driver_output.crash:
                failures.extend(new_failures)
            test_result_writer.write_test_result(
                self._port, self._options.results_directory, self._filename,
                driver_output, expected_driver_output, new_failures)
            time_for_diffs[test_type.__class__.__name__] = (
                time.time() - start_diff_time)

        total_time_for_all_diffs = time.time() - start_diff_time
        return TestResult(self._filename, failures, driver_output.test_time,
                          total_time_for_all_diffs, time_for_diffs)
    def _run_reftest(self):
        driver_output1 = self._driver.run_test(self._driver_input())
        reference_test_name = self._port.relative_test_filename(self._reference_filename)
        driver_output2 = self._driver.run_test(DriverInput(reference_test_name, self._timeout, driver_output1.image_hash))
        test_result = self._compare_output_with_reference(driver_output1, driver_output2)

        test_result_writer.write_test_result(self._port, self._test_name, driver_output1, driver_output2, test_result.failures)
        return test_result
 def _run_rebaseline(self):
     driver_output = self._driver.run_test(self._driver_input())
     failures = self._handle_error(driver_output)
     test_result_writer.write_test_result(self._port, self._test_name, driver_output, None, failures)
     # FIXME: It the test crashed or timed out, it might be bettter to avoid
     # to write new baselines.
     self._overwrite_baselines(driver_output)
     return TestResult(self._test_name, failures, driver_output.test_time, driver_output.has_stderr())
 def _run_compare_test(self):
     driver_output = self._driver.run_test(self._driver_input())
     expected_driver_output = self._expected_driver_output()
     test_result = self._compare_output(driver_output, expected_driver_output)
     if self._options.new_test_results:
         self._add_missing_baselines(test_result, driver_output)
     test_result_writer.write_test_result(self._port, self._test_name, driver_output, expected_driver_output, test_result.failures)
     return test_result
    def _run_reftest(self):
        driver_output1 = self._driver.run_test(self._driver_input())
        reference_test_name = self._port.relative_test_filename(self._reference_filename)
        driver_output2 = self._driver.run_test(DriverInput(reference_test_name, self._timeout, driver_output1.image_hash))
        test_result = self._compare_output_with_reference(driver_output1, driver_output2)

        test_result_writer.write_test_result(self._port, self._test_name, driver_output1, driver_output2, test_result.failures)
        return test_result
 def _run_rebaseline(self):
     driver_output = self._driver.run_test(self._driver_input())
     failures = self._handle_error(driver_output)
     test_result_writer.write_test_result(self._port, self._test_name, driver_output, None, failures)
     # FIXME: It the test crashed or timed out, it might be bettter to avoid
     # to write new baselines.
     self._overwrite_baselines(driver_output)
     return TestResult(self._test_name, failures, driver_output.test_time, driver_output.has_stderr())
 def _run_compare_test(self):
     driver_output = self._driver.run_test(self._driver_input())
     expected_driver_output = self._expected_driver_output()
     test_result = self._compare_output(driver_output, expected_driver_output)
     if self._options.new_test_results:
         self._add_missing_baselines(test_result, driver_output)
     test_result_writer.write_test_result(self._port, self._test_name, driver_output, expected_driver_output, test_result.failures)
     return test_result
    def _run_reftest(self):
        driver_output1 = self._driver.run_test(self._driver_input())
        driver_output2 = self._driver.run_test(
            base.DriverInput(self._reference_filename, self._timeout, driver_output1.image_hash))
        test_result = self._compare_output_with_reference(driver_output1, driver_output2)

        test_result_writer.write_test_result(self._port, self._options.results_directory, self._filename,
                                             driver_output1, driver_output2, test_result.failures)
        return test_result
Example #10
0
 def _run_compare_test(self):
     driver_output = self._driver.run_test(self._driver_input())
     expected_driver_output = self._expected_driver_output()
     test_result = self._compare_output(driver_output,
                                        expected_driver_output)
     test_result_writer.write_test_result(self._port, self._filename,
                                          driver_output,
                                          expected_driver_output,
                                          test_result.failures)
     return test_result
Example #11
0
    def _run_reftest(self):
        driver_output1 = self._driver.run_test(self._driver_input())
        driver_output2 = self._driver.run_test(
            base.DriverInput(self._reference_filename, self._timeout,
                             driver_output1.image_hash))
        test_result = self._compare_output_with_reference(
            driver_output1, driver_output2)

        test_result_writer.write_test_result(self._port,
                                             self._options.results_directory,
                                             self._filename, driver_output1,
                                             driver_output2,
                                             test_result.failures)
        return test_result