Diff
Modified: trunk/Tools/ChangeLog (158372 => 158373)
--- trunk/Tools/ChangeLog 2013-10-31 18:05:25 UTC (rev 158372)
+++ trunk/Tools/ChangeLog 2013-10-31 18:13:10 UTC (rev 158373)
@@ -1,3 +1,22 @@
+2013-10-31 Tamas Gergely <[email protected]>
+
+ Run tests as if they are expected to pass when --force is given.
+ https://bugs.webkit.org/show_bug.cgi?id=112890
+
+ Reviewed by Ryosuke Niwa.
+
+ The --force switch of new-run-webkit-tests is now forces all tests to
+ be run with 'PASS' as expected result.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager.run):
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectations.__init__):
+ (TestExpectations._add_expectations):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args):
+ (_set_up_derived_options):
+
2013-10-31 Geoffrey Garen <[email protected]>
Added Mark Lam as a reviewer.
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py (158372 => 158373)
--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2013-10-31 18:05:25 UTC (rev 158372)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py 2013-10-31 18:13:10 UTC (rev 158373)
@@ -179,7 +179,7 @@
return test_run_results.RunDetails(exit_code=-1)
self._printer.write_update("Parsing expectations ...")
- self._expectations = test_expectations.TestExpectations(self._port, test_names)
+ self._expectations = test_expectations.TestExpectations(self._port, test_names, force_expectations_pass=self._options.force)
tests_to_run, tests_to_skip = self._prepare_lists(paths, test_names)
self._printer.print_found(len(test_names), len(tests_to_run), self._options.repeat_each, self._options.iterations)
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py (158372 => 158373)
--- trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py 2013-10-31 18:05:25 UTC (rev 158372)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py 2013-10-31 18:13:10 UTC (rev 158373)
@@ -833,7 +833,7 @@
# FIXME: This constructor does too much work. We should move the actual parsing of
# the expectations into separate routines so that linting and handling overrides
# can be controlled separately, and the constructor can be more of a no-op.
- def __init__(self, port, tests=None, include_generic=True, include_overrides=True, expectations_to_lint=None):
+ def __init__(self, port, tests=None, include_generic=True, include_overrides=True, expectations_to_lint=None, force_expectations_pass=False):
self._full_test_list = tests
self._test_config = port.test_configuration()
self._is_lint_mode = expectations_to_lint is not None
@@ -842,6 +842,7 @@
self._port = port
self._skipped_tests_warnings = []
self._expectations = []
+ self._force_expectations_pass = force_expectations_pass
expectations_dict = expectations_to_lint or port.expectations_dict()
@@ -990,7 +991,11 @@
def _add_expectations(self, expectation_list):
for expectation_line in expectation_list:
- if not expectation_line.expectations:
+ if self._force_expectations_pass:
+ expectation_line.expectations = ['PASS']
+ expectation_line.parsed_expectations = set([PASS])
+
+ elif not expectation_line.expectations:
continue
if self._is_lint_mode or self._test_config in expectation_line.matching_configurations:
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (158372 => 158373)
--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2013-10-31 18:05:25 UTC (rev 158372)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py 2013-10-31 18:13:10 UTC (rev 158373)
@@ -226,8 +226,8 @@
"'ignore' == Run them anyway, "
"'only' == only run the SKIP tests, "
"'always' == always skip, even if listed on the command line.")),
- optparse.make_option("--force", dest="skipped", action="" const='ignore',
- help="Run all tests, even those marked SKIP in the test list (same as --skipped=ignore)"),
+ optparse.make_option("--force", action="" default=False,
+ help="Run all tests with PASS as expected result, even those marked SKIP in the test list (implies --skipped=ignore)"),
optparse.make_option("--time-out-ms",
help="Set the timeout for each test"),
optparse.make_option("--order", action="" default="natural",
@@ -337,6 +337,11 @@
additional_platform_directories.append(port.host.filesystem.abspath(path))
options.additional_platform_directory = additional_platform_directories
+ if options.force:
+ if options.skipped not in ('ignore', 'default'):
+ _log.warning("--force overrides --skipped=%s" % (options.skipped))
+ options.skipped = 'ignore'
+
if not options.http and options.skipped in ('ignore', 'only'):
_log.warning("--force/--skipped=%s overrides --no-http." % (options.skipped))
options.http = True