Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b3cdd4ed520fc96cff30af68e3ccc444a4c94a56
      
https://github.com/WebKit/WebKit/commit/b3cdd4ed520fc96cff30af68e3ccc444a4c94a56
  Author: Michael[tm] Smith <m...@w3.org>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
    M Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
    M Tools/Scripts/webkitpy/layout_tests/views/printing.py
    M Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
    M Tools/Scripts/webkitpy/port/driver.py
    M Tools/TestRunnerShared/TestCommand.cpp
    M Tools/TestRunnerShared/TestCommand.h
    M Tools/TestRunnerShared/TestFeatures.cpp
    M Tools/TestRunnerShared/TestFeatures.h
    M Tools/WebKitTestRunner/Options.cpp
    M Tools/WebKitTestRunner/TestController.cpp

  Log Message:
  -----------
  Enable specifying webkit-test-runner header values from a command-line option
https://bugs.webkit.org/show_bug.cgi?id=264948

Reviewed by Jonathan Bedard and Tim Horton.

This change adds a new “--additional-header” option to run-webkit-tests
(and WebKitTestRunner) to enable specifying webkit-test-runner Foo=bar
header values for test runs — as if those values were provided in a
“<!-- webkit-test-runner [ Foo=Bar ] -->” header in each test being run.

For example, given the following command-line invocation:

  run-webkit-tests --additional-header='useEphemeralSession=true' PATH

…that invocation would cause the test(s) at the given PATH value to be
run (once) in an ephemeral session — that is, as if the test itself had a
“<!-- webkit-test-runner [ useEphemeralSession=true ] -->” header.

This differs from the “--self-compare-with-header” option, which causes each
test to be run twice — once with the given header value, and once without —
and then does a pixel-diff comparison between the results. That’s useful
for reftests, but not so useful for JavaScript tests or other test types.

In contrast to that, the “--additional-header” option causes the tests to be
run just once, with the given header value, and does no separate comparison
against the results without the given header value (other than just the
normal reporting whether the actual results matched the expected results).
So the option is generally useful for all test types, not just for reftests.

* Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner._driver_input):
* Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Tools/Scripts/webkitpy/layout_tests/views/printing.py:
(Printer.print_config):
* Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py:
(Testprinter.test_print_config):
* Tools/Scripts/webkitpy/port/driver.py:
(DriverInput.__init__):
(DriverInput.__repr__):
(Driver._command_from_driver_input):
* Tools/TestRunnerShared/TestCommand.cpp:
(WTR::parseInputLine):
* Tools/TestRunnerShared/TestCommand.h:
* Tools/TestRunnerShared/TestFeatures.cpp:
(WTR::parseTestHeaderString):
(WTR::featureFromAdditionalHeaderOption):
* Tools/TestRunnerShared/TestFeatures.h:
* Tools/WebKitTestRunner/Options.cpp:
(WTR::handleOptionAdditionalHeader):
(WTR::OptionsHandler::OptionsHandler):
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::testOptionsForTest const):

Canonical link: https://commits.webkit.org/273763@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to