test-runner: Don't overwrite SKIPs with --generate-expected
Unless the test also passed validation. Prevents clobbering expected validation failures when you've only checked tint didn't error. Change-Id: I44be0c8b1f9ef1a0df51bba81f5ad694715204b8 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53383 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: James Price <jrprice@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
parent
93e8f527ee
commit
3db1820f0b
|
@ -381,16 +381,20 @@ func (j job) run(wd, exe, dxcPath, xcrunPath string, generateExpected, generateS
|
||||||
}
|
}
|
||||||
|
|
||||||
// Can we validate?
|
// Can we validate?
|
||||||
|
validate := false
|
||||||
switch j.format {
|
switch j.format {
|
||||||
case spvasm:
|
case spvasm:
|
||||||
args = append(args, "--validate") // spirv-val is statically linked, always available
|
args = append(args, "--validate") // spirv-val is statically linked, always available
|
||||||
|
validate = true
|
||||||
case hlsl:
|
case hlsl:
|
||||||
if dxcPath != "" {
|
if dxcPath != "" {
|
||||||
args = append(args, "--dxc", dxcPath)
|
args = append(args, "--dxc", dxcPath)
|
||||||
|
validate = true
|
||||||
}
|
}
|
||||||
case msl:
|
case msl:
|
||||||
if xcrunPath != "" {
|
if xcrunPath != "" {
|
||||||
args = append(args, "--xcrun", xcrunPath)
|
args = append(args, "--xcrun", xcrunPath)
|
||||||
|
validate = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,7 +403,7 @@ func (j job) run(wd, exe, dxcPath, xcrunPath string, generateExpected, generateS
|
||||||
out = strings.ReplaceAll(out, "\r\n", "\n")
|
out = strings.ReplaceAll(out, "\r\n", "\n")
|
||||||
matched := expected == "" || expected == out
|
matched := expected == "" || expected == out
|
||||||
|
|
||||||
if ok && generateExpected {
|
if ok && generateExpected && (validate || !skipped) {
|
||||||
saveExpectedFile(j.file, j.format, out)
|
saveExpectedFile(j.file, j.format, out)
|
||||||
matched = true
|
matched = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue