Commit 933f23f6 authored by Mathias Bynens's avatar Mathias Bynens Committed by Commit Bot

[test] Simplify output processor logic

Instead of conditionally normalizing file paths, go back to using
the basename in the dynamically-generated regular expression
pattern.

Bug: v8:7950, v8:9395, v8:9406
Change-Id: I57d2449a8229a67b038c7fcffe36218848d9a575
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1681122Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarTamer Tas <tmrts@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62439}
parent 5ab03647
......@@ -37,13 +37,10 @@ class OutProc(base.OutProc):
# the extension in the first place.
base_path = self._basepath + '.js'
if not os.path.exists(base_path):
# d8's output for module tests contains forward slashes for
# file paths as opposed to backslashes on Windows. Address this
# by normalizing only in this specific case.
base_path = self._basepath.replace('\\', '/') + '.mjs'
base_path = self._basepath + '.mjs'
env = {
'basename': base_path,
'basename': os.path.basename(base_path),
}
for (expected, actual) in itertools.izip_longest(
expected_lines, actual_lines, fillvalue=''):
......
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