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 <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton 2021-07-19 14:47:39 +00:00 committed by Tint LUCI CQ
parent 73f0dde6d0
commit 9a052177d0
1 changed files with 1 additions and 2 deletions

View File

@ -116,8 +116,7 @@ func run() error {
// Split the --filter flag up by ',', trimming any whitespace at the start and end // Split the --filter flag up by ',', trimming any whitespace at the start and end
globIncludes := strings.Split(filter, ",") globIncludes := strings.Split(filter, ",")
for i, s := range globIncludes { for i, s := range globIncludes {
// Escape backslashes for the glob config s = filepath.ToSlash(s) // Replace '\' with '/'
s = strings.ReplaceAll(s, `\`, `\\`)
globIncludes[i] = `"` + strings.TrimSpace(s) + `"` globIncludes[i] = `"` + strings.TrimSpace(s) + `"`
} }