From 9a052177d0fd63efa863050d74c83350997984e8 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Mon, 19 Jul 2021 14:47:39 +0000 Subject: [PATCH] tools: Fix test-runner --filter flag on windows Likely got broken with https://dawn-review.googlesource.com/c/tint/+/56776 Change-Id: Ie9db21e11084435a47f6fa0bfc809a590a353685 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58396 Auto-Submit: Ben Clayton Commit-Queue: Antonio Maiorano Kokoro: Kokoro Reviewed-by: Antonio Maiorano --- tools/src/cmd/test-runner/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/src/cmd/test-runner/main.go b/tools/src/cmd/test-runner/main.go index 6dbcd12ed5..81bae47b98 100644 --- a/tools/src/cmd/test-runner/main.go +++ b/tools/src/cmd/test-runner/main.go @@ -116,8 +116,7 @@ func run() error { // Split the --filter flag up by ',', trimming any whitespace at the start and end globIncludes := strings.Split(filter, ",") for i, s := range globIncludes { - // Escape backslashes for the glob config - s = strings.ReplaceAll(s, `\`, `\\`) + s = filepath.ToSlash(s) // Replace '\' with '/' globIncludes[i] = `"` + strings.TrimSpace(s) + `"` }