[testrunner] Fix test selection on Windows

This makes flako usable on Windows using standard test names.
A workaround to bisecting to failures before this CL is to replace the
test_name by something like "mjsunit/regress\regress-1138075", i.e.
using this on the command line to trigger flako:
-p 'test_name="mjsunit/regress\\regress-1138075"'

R=liviurau@chromium.org

Bug: v8:9218
Change-Id: I37596efcaeca780eeacb27c2841fe8302ddb1e49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3081610
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76222}
This commit is contained in:
Clemens Backes 2021-08-09 16:04:51 +02:00 committed by V8 LUCI CQ
parent 07a241b2d1
commit 9740901ae1

View File

@ -4,6 +4,7 @@
from collections import defaultdict
import fnmatch
import os
from . import base
@ -80,4 +81,9 @@ class NameFilterProc(base.TestProcFilter):
if fnmatch.fnmatch(test.path, g):
return False
exact_matches = self._exact_matches.get(test.suite.name, {})
return test.path not in exact_matches
if test.path in exact_matches: return False
if os.sep != '/':
unix_path = test.path.replace(os.sep, '/')
if unix_path in exact_matches: return False
# Filter out everything else.
return True