dawn/node: Fail tests where the process aborted abnormally.
If the process exits with a non-zero status (like crashing), then don't pretend the test passed.
This would only occur if the test result had already been printed.
Change-Id: I29e81362b6e09f1fca48c55b1798ba409e9a703e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/95942
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn/node/tools/src/cmd/run-cts/main.go b/src/dawn/node/tools/src/cmd/run-cts/main.go
index afbe830..2d41f89 100644
--- a/src/dawn/node/tools/src/cmd/run-cts/main.go
+++ b/src/dawn/node/tools/src/cmd/run-cts/main.go
@@ -972,7 +972,9 @@
msg := buf.String()
switch {
case errors.Is(err, context.DeadlineExceeded):
- return result{testcase: query, status: timeout, message: msg}
+ return result{testcase: query, status: timeout, message: msg, error: err}
+ case err != nil:
+ break
case strings.Contains(msg, "[fail]"):
return result{testcase: query, status: fail, message: msg}
case strings.Contains(msg, "[warn]"):