test: Remove many expected files

For these tests, we only really care that we can successfully consume
them and generate valid output for each backend. Having the expected
files in the tree generates significant churn for any change to how we
generate backend code, which makes it hard to inspect diffs.

Change-Id: Ic98c248081144c0fb1791f1303eaf6d459548e3d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/62720
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
This commit is contained in:
James Price
2021-08-24 22:49:42 +00:00
committed by Tint LUCI CQ
parent 568136dd10
commit 87cce20f67
8526 changed files with 12 additions and 613699 deletions

View File

@@ -539,7 +539,18 @@ func (j job) run(wd, exe string, fxc bool, dxcPath, xcrunPath string, generateEx
matched := expected == "" || expected == out
if ok && generateExpected && (validate || !skipped) {
saveExpectedFile(j.file, j.format, out)
// Don't generate expected results for certain directories that contain
// large corpora of tests for which the generated code is uninteresting.
saveResult := true
for _, exclude := range []string{"/test/unittest/", "/test/vk-gl-cts/"} {
if strings.Contains(j.file, exclude) {
saveResult = false
}
}
if saveResult {
saveExpectedFile(j.file, j.format, out)
}
matched = true
}