Commit 35ca0a01 authored by Michal Majewski's avatar Michal Majewski Committed by Commit Bot

[test] Filter out incompatible tests in predictable mode

Bug: v8:6917
Change-Id: Ie18390ae0849e8d5341e4c2a7b757fae886c2986
Reviewed-on: https://chromium-review.googlesource.com/895582
Commit-Queue: Michał Majewski <majeski@google.com>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50994}
parent e210ee55
......@@ -4,6 +4,7 @@
from ..local import statusfile
from ..outproc import base as outproc_base
from ..testproc import base as testproc_base
from ..testproc.result import Result
......@@ -15,11 +16,7 @@ from ..testproc.result import Result
def get_outproc(test):
output_proc = test.output_proc
if output_proc.negative or statusfile.FAIL in test.expected_outcomes:
# TODO(majeski): Skip these tests instead of having special outproc.
return NeverUnexpectedOutputOutProc(output_proc)
return OutProc(output_proc)
return OutProc(test.output_proc)
class OutProc(outproc_base.BaseOutProc):
......@@ -46,9 +43,7 @@ class OutProc(outproc_base.BaseOutProc):
return self._outproc.expected_outcomes
class NeverUnexpectedOutputOutProc(OutProc):
"""Output processor wrapper for tests that we will return False for
has_unexpected_output in the predictable mode.
"""
def has_unexpected_output(self, output):
return False
class PredictableFilterProc(testproc_base.TestProcFilter):
def _filter(self, test):
return (statusfile.FAIL in test.expected_outcomes or
test.output_proc.negative)
......@@ -588,6 +588,7 @@ class StandardTestRunner(base_runner.BaseTestRunner):
tests_counter,
VariantProc(self._variants),
StatusFileFilterProc(options.slow_tests, options.pass_fail_tests),
self._create_predictable_filter(),
self._create_seed_proc(options),
self._create_signal_proc(),
] + indicators + [
......@@ -632,6 +633,12 @@ class StandardTestRunner(base_runner.BaseTestRunner):
exit_code = 0
return exit_code
def _create_predictable_filter(self):
if not self.build_config.predictable:
return None
return predictable.PredictableFilterProc()
def _create_seed_proc(self, options):
if options.random_seed_stress_count == 1:
return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment