test-runner: don't generate for excluded paths on Windows

Script would erroneously generate for files in excluded paths because of
slash differences.

Also make the output display the path to the MSL and HLSL executable
being used.

Change-Id: I0bf55dd461c96b7b910f7a9aa9756ab2006c2a33
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/68821
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:
Antonio Maiorano 2021-11-10 14:34:55 +00:00 committed by Tint LUCI CQ
parent ae4b3ffe6b
commit bb1a9930c1
1 changed files with 6 additions and 2 deletions

View File

@ -198,7 +198,11 @@ func run() error {
fmt.Printf(" validation ")
if *tool.path != "" || (fxc && tool.lang == "hlsl") {
color.Set(color.FgGreen)
fmt.Printf("ENABLED")
tool_path := *tool.path
if fxc && tool.lang == "hlsl" {
tool_path = "Tint will use FXC dll in PATH"
}
fmt.Printf("ENABLED (" + tool_path + ")")
} else {
color.Set(color.FgRed)
fmt.Printf("DISABLED")
@ -615,7 +619,7 @@ func saveExpectedFile(path string, format outputFormat, content string) error {
// Don't generate expected results for certain directories that contain
// large corpora of tests for which the generated code is uninteresting.
for _, exclude := range []string{"/test/unittest/", "/test/vk-gl-cts/"} {
if strings.Contains(path, exclude) {
if strings.Contains(path, filepath.FromSlash(exclude)) {
return nil
}
}