+2011-02-03 Hayato Ito <hayato@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [NRWT] Introduces Input/Output class used by base.Driver into port/base.py and
+ move _run_single_test() and _process_output() functions from
+ dump_render_tree_thread.py to a single_test_runner.py as an individual module.
+
+ This is clean up and acts as a preparation for elimination of test_types/*
+ classes. These classes will move to the single_test_runner module introduced
+ in this patch.
+
+ https://bugs.webkit.org/show_bug.cgi?id=53004
+
+ * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
+ * Scripts/webkitpy/layout_tests/layout_package/single_test_runner.py: Added.
+ * Scripts/webkitpy/layout_tests/layout_package/test_input.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_output.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ * Scripts/webkitpy/layout_tests/port/dryrun.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/port/webkit.py:
+ * Scripts/webkitpy/layout_tests/test_types/image_diff.py:
+ * Scripts/webkitpy/layout_tests/test_types/test_type_base.py:
+ * Scripts/webkitpy/layout_tests/test_types/text_diff.py:
+
2011-02-03 Dirk Pranke <dpranke@chromium.org>
Unreviewed, build fix.
from webkitpy.layout_tests.test_types import test_type_base
from webkitpy.layout_tests.test_types import text_diff
+import single_test_runner
import test_failures
-import test_output
import test_results
_log = logging.getLogger("webkitpy.layout_tests.layout_package."
"dump_render_tree_thread")
-def _expected_test_output(port, filename):
- """Returns an expected TestOutput object."""
- return test_output.TestOutput(port.expected_text(filename),
- port.expected_image(filename),
- port.expected_checksum(filename))
-
-def _process_output(port, options, test_input, test_types, test_args,
- test_output, worker_name):
- """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:
- port: port-specific hooks
- options: command line options argument from optparse
- proc: an active DumpRenderTree process
- test_input: Object containing the test filename and timeout
- test_types: list of test types to subject the output to
- test_args: arguments to be passed to each test
- test_output: a TestOutput object containing the output of the test
- worker_name: worker name for logging
-
- Returns: a TestResult object
- """
- failures = []
- fs = port._filesystem
-
- if test_output.crash:
- failures.append(test_failures.FailureCrash())
- if test_output.timeout:
- failures.append(test_failures.FailureTimeout())
-
- test_name = port.relative_test_filename(test_input.filename)
- if test_output.crash:
- _log.debug("%s Stacktrace for %s:\n%s" % (worker_name, test_name,
- test_output.error))
- filename = fs.join(options.results_directory, test_name)
- filename = fs.splitext(filename)[0] + "-stack.txt"
- fs.maybe_make_directory(fs.dirname(filename))
- fs.write_text_file(filename, test_output.error)
- elif test_output.error:
- _log.debug("%s %s output stderr lines:\n%s" % (worker_name, test_name,
- test_output.error))
-
- expected_test_output = _expected_test_output(port, test_input.filename)
-
- # Check the output and save the results.
- start_time = time.time()
- time_for_diffs = {}
- for test_type in test_types:
- start_diff_time = time.time()
- new_failures = test_type.compare_output(port, test_input.filename,
- test_args, test_output,
- expected_test_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 test_output.crash:
- failures.extend(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 test_results.TestResult(test_input.filename, failures, test_output.test_time,
- total_time_for_all_diffs, time_for_diffs)
-
-
def _pad_timeout(timeout):
"""Returns a safe multiple of the per-test timeout value to use
to detect hung test threads.
return options.pixel_tests and not (options.new_baseline or options.reset_results)
-def _run_single_test(port, options, test_input, test_types, test_args, driver, worker_name):
- # FIXME: Pull this into TestShellThread._run().
-
- # The image hash is used to avoid doing an image dump if the
- # checksums match, so it should be set to a blank value if we
- # are generating a new baseline. (Otherwise, an image from a
- # previous run will be copied into the baseline."""
- if _should_fetch_expected_checksum(options):
- test_input.image_hash = port.expected_checksum(test_input.filename)
- test_output = driver.run_test(test_input)
- return _process_output(port, options, test_input, test_types, test_args,
- test_output, worker_name)
-
-
class SingleTestThread(threading.Thread):
"""Thread wrapper for running a single test file."""
# in coverage: see http://bitbucket.org/ned/coveragepy/issue/85.
self._driver = self._port.create_driver(self._worker_number)
self._driver.start()
- self._test_result = _run_single_test(self._port, self._options,
- self._test_input, self._test_types,
- self._test_args, self._driver,
- self._name)
+ self._test_result = single_test_runner.run_single_test(
+ self._port, self._options, self._test_input, self._driver,
+ self._name, self._test_types, self._test_args)
self._driver.stop()
def get_test_result(self):
thread_timeout = _milliseconds_to_seconds(
_pad_timeout(int(test_input.timeout)))
self._next_timeout = time.time() + thread_timeout
- test_result = _run_single_test(self._port, self._options, test_input,
- self._test_types, self._test_args,
- self._driver, self._name)
+ test_result = single_test_runner.run_single_test(
+ self._port, self._options, test_input, self._driver, self._name,
+ self._test_types, self._test_args)
self._test_results.append(test_result)
return test_result
--- /dev/null
+# Copyright (C) 2011 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+import logging
+import os
+import time
+
+from webkitpy.layout_tests.port import base
+from webkitpy.layout_tests.layout_package import test_failures
+from webkitpy.layout_tests.layout_package.test_results import TestResult
+
+
+_log = logging.getLogger(__name__)
+
+
+def run_single_test(port, options, test_input, driver, worker_name, test_types, test_args):
+ # FIXME: Pull this into TestShellThread._run().
+ runner = SingleTestRunner(options, port, driver, test_input, worker_name, test_types, test_args)
+ return runner.run()
+
+
+class ExpectedDriverOutput:
+ """Groups information about an expected driver output."""
+ def __init__(self, text, image, image_hash):
+ self.text = text
+ self.image = image
+ self.image_hash = image_hash
+
+
+class SingleTestRunner:
+
+ def __init__(self, options, port, driver, test_input, worker_name, test_types, test_args):
+ self._options = options
+ self._port = port
+ self._driver = driver
+ self._filename = test_input.filename
+ self._timeout = test_input.timeout
+ self._worker_name = worker_name
+ self._test_types = test_types
+ self._test_args = test_args
+ self._testname = port.relative_test_filename(test_input.filename)
+
+ def _expected_driver_output(self):
+ return ExpectedDriverOutput(self._port.expected_text(self._filename),
+ self._port.expected_image(self._filename),
+ self._port.expected_checksum(self._filename))
+
+ def _should_fetch_expected_checksum(self):
+ return (self._options.pixel_tests and
+ not (self._options.new_baseline or self._options.reset_results))
+
+ def _driver_input(self):
+ # The image hash is used to avoid doing an image dump if the
+ # checksums match, so it should be set to a blank value if we
+ # are generating a new baseline. (Otherwise, an image from a
+ # previous run will be copied into the baseline."""
+ image_hash = None
+ if self._should_fetch_expected_checksum():
+ image_hash = self._port.expected_checksum(self._filename)
+ return base.DriverInput(self._filename, self._timeout, image_hash)
+
+ def run(self):
+ driver_output = self._driver.run_test(self._driver_input())
+ return self._process_output(driver_output)
+
+ 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
+ """
+ failures = []
+ fs = self._port._filesystem
+
+ if driver_output.crash:
+ failures.append(test_failures.FailureCrash())
+ if driver_output.timeout:
+ failures.append(test_failures.FailureTimeout())
+
+ if driver_output.crash:
+ _log.debug("%s Stacktrace for %s:\n%s" % (self._worker_name, self._testname,
+ driver_output.error))
+ stack_filename = fs.join(self._options.results_directory, self._testname)
+ stack_filename = fs.splitext(stack_filename)[0] + "-stack.txt"
+ fs.maybe_make_directory(fs.dirname(stack_filename))
+ fs.write_text_file(stack_filename, driver_output.error)
+ elif driver_output.error:
+ _log.debug("%s %s output stderr lines:\n%s" % (self._worker_name, self._testname,
+ driver_output.error))
+
+ 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._test_args, 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)
+ 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)
# FIXME: filename should really be test_name as a relative path.
self.filename = filename
self.timeout = timeout
- # The image_hash is used to avoid doing an image dump if the
- # checksums match. The image_hash is set later, and only if it is needed
- # for the test.
- self.image_hash = None
+++ /dev/null
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-class TestOutput(object):
- """Groups information about a test output for easy passing of data.
-
- This is used not only for a actual test output, but also for grouping
- expected test output.
- """
-
- def __init__(self, text, image, image_hash,
- crash=None, test_time=None, timeout=None, error=None):
- """Initializes a TestOutput object.
-
- Args:
- text: a text output
- image: an image output
- image_hash: a string containing the checksum of the image
- crash: a boolean indicating whether the driver crashed on the test
- test_time: a time which the test has taken
- timeout: a boolean indicating whehter the test timed out
- error: any unexpected or additional (or error) text output
- """
- self.text = text
- self.image = image
- self.image_hash = image_hash
- self.crash = crash
- self.test_time = test_time
- self.timeout = timeout
- self.error = error
platform)
+class DriverInput(object):
+ """Holds the input parameters for a driver."""
+
+ def __init__(self, filename, timeout, image_hash):
+ """Initializes a DriverInput object.
+
+ Args:
+ filename: Full path to the test.
+ timeout: Timeout in msecs the driver should use while running the test
+ image_hash: A image checksum which is used to avoid doing an image dump if
+ the checksums match.
+ """
+ self.filename = filename
+ self.timeout = timeout
+ self.image_hash = image_hash
+
+
+class DriverOutput(object):
+ """Groups information about a output from driver for easy passing of data."""
+
+ def __init__(self, text, image, image_hash,
+ crash=False, test_time=None, timeout=False, error=''):
+ """Initializes a TestOutput object.
+
+ Args:
+ text: a text output
+ image: an image output
+ image_hash: a string containing the checksum of the image
+ crash: a boolean indicating whether the driver crashed on the test
+ test_time: a time which the test has taken
+ timeout: a boolean indicating whehter the test timed out
+ error: any unexpected or additional (or error) text output
+ """
+ self.text = text
+ self.image = image
+ self.image_hash = image_hash
+ self.crash = crash
+ self.test_time = test_time
+ self.timeout = timeout
+ self.error = error
+
+
class Driver:
"""Abstract interface for the DumpRenderTree interface."""
"""
raise NotImplementedError('Driver.__init__')
- def run_test(self, test_input):
+ def run_test(self, driver_input):
"""Run a single test and return the results.
Note that it is okay if a test times out or crashes and leaves
are responsible for cleaning up and ensuring things are okay.
Args:
- test_input: a TestInput object
+ driver_input: a DriverInput object
- Returns a TestOutput object.
+ Returns a DriverOutput object.
"""
raise NotImplementedError('Driver.run_test')
from webkitpy.common.system import executive
from webkitpy.common.system.path import cygpath
from webkitpy.layout_tests.layout_package import test_expectations
-from webkitpy.layout_tests.layout_package import test_output
import base
import http_server
raise e
return self._output_image()
- def run_test(self, test_input):
+ def run_test(self, driver_input):
output = []
error = []
crash = False
start_time = time.time()
- uri = self._port.filename_to_uri(test_input.filename)
- cmd = self._test_shell_command(uri, test_input.timeout,
- test_input.image_hash)
+ uri = self._port.filename_to_uri(driver_input.filename)
+ cmd = self._test_shell_command(uri, driver_input.timeout,
+ driver_input.image_hash)
(line, crash) = self._write_command_and_read_line(input=cmd)
while not crash and line.rstrip() != "#EOF":
(line, crash) = self._write_command_and_read_line(input=None)
run_time = time.time() - start_time
- return test_output.TestOutput(
+ return base.DriverOutput(
''.join(output), self._output_image_with_retry(), actual_checksum,
crash, run_time, timeout, ''.join(error))
import sys
import time
-from webkitpy.layout_tests.layout_package import test_output
-
import base
import factory
def poll(self):
return None
- def run_test(self, test_input):
+ def run_test(self, driver_input):
start_time = time.time()
- text_output = self._port.expected_text(test_input.filename)
+ text_output = self._port.expected_text(driver_input.filename)
- if test_input.image_hash is not None:
- image = self._port.expected_image(test_input.filename)
- hash = self._port.expected_checksum(test_input.filename)
+ if driver_input.image_hash is not None:
+ image = self._port.expected_image(driver_input.filename)
+ hash = self._port.expected_checksum(driver_input.filename)
else:
image = None
hash = None
- return test_output.TestOutput(text_output, image, hash, False,
- time.time() - start_time, False, None)
+ return base.DriverOutput(text_output, image, hash, False,
+ time.time() - start_time, False, '')
def start(self):
pass
from webkitpy.common.system import filesystem_mock
from webkitpy.tool import mocktool
-from webkitpy.layout_tests.layout_package import test_output
-
import base
raise ValueError('exception from ' + test_name)
if test.hang:
time.sleep((float(test_input.timeout) * 4) / 1000.0)
- return test_output.TestOutput(test.actual_text, test.actual_image,
- test.actual_checksum, test.crash,
- time.time() - start_time, test.timeout,
- test.error)
+ return base.DriverOutput(test.actual_text, test.actual_image,
+ test.actual_checksum, test.crash,
+ time.time() - start_time, test.timeout,
+ test.error)
def start(self):
pass
import webbrowser
import webkitpy.common.system.ospath as ospath
-import webkitpy.layout_tests.layout_package.test_output as test_output
import webkitpy.layout_tests.port.base as base
import webkitpy.layout_tests.port.server_process as server_process
return
# FIXME: This function is huge.
- def run_test(self, test_input):
- uri = self._port.filename_to_uri(test_input.filename)
+ def run_test(self, driver_input):
+ uri = self._port.filename_to_uri(driver_input.filename)
if uri.startswith("file:///"):
command = uri[7:]
else:
command = uri
- if test_input.image_hash:
- command += "'" + test_input.image_hash
+ if driver_input.image_hash:
+ command += "'" + driver_input.image_hash
command += "\n"
start_time = time.time()
output = str() # Use a byte array for output, even though it should be UTF-8.
image = str()
- timeout = int(test_input.timeout) / 1000.0
+ timeout = int(driver_input.timeout) / 1000.0
deadline = time.time() + timeout
line = self._server_process.read_line(timeout)
while (not self._server_process.timed_out
# FIXME: This seems like the wrong section of code to be doing
# this reset in.
self._server_process.error = ""
- return test_output.TestOutput(output, image, actual_image_hash,
- self._server_process.crashed,
- time.time() - start_time,
- self._server_process.timed_out,
- error)
+ return base.DriverOutput(output, image, actual_image_hash,
+ self._server_process.crashed,
+ time.time() - start_time,
+ self._server_process.timed_out,
+ error)
def stop(self):
if self._server_process:
self.FILENAME_SUFFIX_COMPARE)
return port.diff_image(actual_image, expected_image, diff_filename)
- def compare_output(self, port, filename, test_args, actual_test_output,
- expected_test_output):
+ def compare_output(self, port, filename, test_args, actual_driver_output,
+ expected_driver_output):
"""Implementation of CompareOutput that checks the output image and
checksum against the expected files from the LayoutTest directory.
"""
failures = []
# If we didn't produce a hash file, this test must be text-only.
- if actual_test_output.image_hash is None:
+ if actual_driver_output.image_hash is None:
return failures
# If we're generating a new baseline, we pass.
if test_args.new_baseline or test_args.reset_results:
- self._save_baseline_files(filename, actual_test_output.image,
- actual_test_output.image_hash,
+ self._save_baseline_files(filename, actual_driver_output.image,
+ actual_driver_output.image_hash,
test_args.new_baseline)
return failures
- if not expected_test_output.image:
+ if not expected_driver_output.image:
# Report a missing expected PNG file.
- self._copy_image(filename, actual_test_output.image, expected_image=None)
- self._copy_image_hash(filename, actual_test_output.image_hash,
- expected_test_output.image_hash)
+ self._copy_image(filename, actual_driver_output.image, expected_image=None)
+ self._copy_image_hash(filename, actual_driver_output.image_hash,
+ expected_driver_output.image_hash)
failures.append(test_failures.FailureMissingImage())
return failures
- if not expected_test_output.image_hash:
+ if not expected_driver_output.image_hash:
# Report a missing expected checksum file.
- self._copy_image(filename, actual_test_output.image,
- expected_test_output.image)
- self._copy_image_hash(filename, actual_test_output.image_hash,
+ self._copy_image(filename, actual_driver_output.image,
+ expected_driver_output.image)
+ self._copy_image_hash(filename, actual_driver_output.image_hash,
expected_image_hash=None)
failures.append(test_failures.FailureMissingImageHash())
return failures
- if actual_test_output.image_hash == expected_test_output.image_hash:
+ if actual_driver_output.image_hash == expected_driver_output.image_hash:
# Hash matched (no diff needed, okay to return).
return failures
- self._copy_image(filename, actual_test_output.image,
- expected_test_output.image)
- self._copy_image_hash(filename, actual_test_output.image_hash,
- expected_test_output.image_hash)
+ self._copy_image(filename, actual_driver_output.image,
+ expected_driver_output.image)
+ self._copy_image_hash(filename, actual_driver_output.image_hash,
+ expected_driver_output.image_hash)
# Even though we only use the result in one codepath below but we
# still need to call CreateImageDiff for other codepaths.
images_are_different = self._create_diff_image(port, filename,
- actual_test_output.image,
- expected_test_output.image)
+ actual_driver_output.image,
+ expected_driver_output.image)
if not images_are_different:
failures.append(test_failures.FailureImageHashIncorrect())
else:
self._port.relative_test_filename(filename))
return fs.splitext(output_filename)[0] + modifier
- def compare_output(self, port, filename, test_args, actual_test_output,
- expected_test_output):
+ def compare_output(self, port, filename, test_args, actual_driver_output,
+ expected_driver_output):
"""Method that compares the output from the test with the
expected value.
filename: absolute filename to test file
test_args: a TestArguments object holding optional additional
arguments
- actual_test_output: a TestOutput object which represents actual test
+ actual_driver_output: a DriverOutput object which represents actual test
output
- expected_test_output: a TestOutput object which represents a expected
- test output
+ expected_driver_output: a ExpectedDriverOutput object which represents a
+ expected test output
Return:
a list of TestFailure objects, empty if the test passes
# the normalized text expectation files.
return output.replace("\r\r\n", "\r\n").replace("\r\n", "\n")
- def compare_output(self, port, filename, test_args, actual_test_output,
- expected_test_output):
+ def compare_output(self, port, filename, test_args, actual_driver_output,
+ expected_driver_output):
"""Implementation of CompareOutput that checks the output text against
the expected text from the LayoutTest directory."""
failures = []
# Although all DumpRenderTree output should be utf-8, we do not
# ever decode it inside run-webkit-tests. For some tests
# DumpRenderTree may not output utf-8 text (e.g. webarchives).
- self._save_baseline_data(filename, actual_test_output.text,
+ self._save_baseline_data(filename, actual_driver_output.text,
".txt", encoding=None,
generate_new_baseline=test_args.new_baseline)
return failures
# Normalize text to diff
- actual_text = self._get_normalized_output_text(actual_test_output.text)
+ actual_text = self._get_normalized_output_text(actual_driver_output.text)
# Assuming expected_text is already normalized.
- expected_text = expected_test_output.text
+ expected_text = expected_driver_output.text
# Write output files for new tests, too.
if port.compare_text(actual_text, expected_text):