test-runner: on Windows, use forward slash separators in paths passed to tint
This ensures that we don't fail when comparing against expected output
that contains paths in them.
Bug: tint:872
Change-Id: I93d4b940eae2c22175ef3add94bb28f907156ca0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53600
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/tools/src/cmd/test-runner/main.go b/tools/src/cmd/test-runner/main.go
index a60c340..6a2f7c4 100644
--- a/tools/src/cmd/test-runner/main.go
+++ b/tools/src/cmd/test-runner/main.go
@@ -380,6 +380,10 @@
file = j.file
}
+ // Make relative paths use forward slash separators (on Windows) so that paths in tint
+ // output match expected output that contain errors
+ file = strings.ReplaceAll(file, `\`, `/`)
+
args := []string{
file,
"--format", string(j.format),