test-runner: allow using '/' in filter on Windows, and fix using '\'
Change-Id: I635952a6c04bc305a896143333b2ae141bb6a2b0 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53400 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
parent
6b358c3f21
commit
6a665d1b85
|
@ -104,9 +104,14 @@ func run() error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Allow using '/' in the filter on Windows
|
||||
filter = strings.ReplaceAll(filter, "/", string(filepath.Separator));
|
||||
|
||||
// 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, `\`, `\\`)
|
||||
globIncludes[i] = `"` + strings.TrimSpace(s) + `"`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue