Skip to content

Commit

Permalink
[run-webkit-tests] Remember failures when repeating test
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=229217
<rdar://problem/81919223>

Reviewed by Ryan Haddad.

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.update_summary_with_result): Replace existing result with unexpected result so
that unexpected results always take precedence over expected ones.
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(TestRunResults.add): Do not replace existing result.


Canonical link: https://commits.webkit.org/240653@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JonWBedard committed Aug 19, 2021
1 parent d10c58b commit f3435a1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Tools/ChangeLog
@@ -1,3 +1,17 @@
2021-08-18 Jonathan Bedard <jbedard@apple.com>

[run-webkit-tests] Remember failures when repeating test
https://bugs.webkit.org/show_bug.cgi?id=229217
<rdar://problem/81919223>

Reviewed by Ryan Haddad.

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.update_summary_with_result): Replace existing result with unexpected result so
that unexpected results always take precedence over expected ones.
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(TestRunResults.add): Do not replace existing result.

2021-08-18 Lauro Moura <lmoura@igalia.com>

REGRESSION(r279169) [WebDriver] WPT Tools now requires python3 to launch the server
Expand Down
Expand Up @@ -227,13 +227,18 @@ def update_summary_with_result(self, result):
if result.type == test_expectations.SKIP:
exp_str = got_str = 'SKIP'
expected = True
expectations = None
else:
expectations = self._expectations.filtered_expectations_for_test(result.test_name, self._options.pixel_tests or bool(result.reftest_type), self._options.world_leaks)
expected = self._expectations.matches_an_expected_result(result.test_name, result.type, expectations)
exp_str = self._expectations.model().expectations_to_string(expectations)
got_str = self._expectations.model().expectation_to_string(result.type)

existing = self._current_run_results.results_by_name.get(result.test_name)
self._current_run_results.add(result, expected)
if existing and not expected:
existing_expectation = self._expectations.matches_an_expected_result(result.test_name, existing.type, expectations)
self._current_run_results.change_result_to_failure(existing, result, existing_expectation, expected)

self.printer.print_finished_test(result, expected, exp_str, got_str)

Expand Down
Expand Up @@ -69,7 +69,7 @@ def __init__(self, expectations, num_tests):

def add(self, test_result, expected):
self.tests_by_expectation[test_result.type].add(test_result.test_name)
self.results_by_name[test_result.test_name] = test_result
self.results_by_name[test_result.test_name] = self.results_by_name.get(test_result.test_name, test_result)
if test_result.is_other_crash:
return
if test_result.type != test_expectations.SKIP:
Expand Down

0 comments on commit f3435a1

Please sign in to comment.