summaryrefslogtreecommitdiff
path: root/tools/slang-unit-test/unit-test-record-replay.cpp
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-06-18 16:38:39 -0700
committerGitHub <noreply@github.com>2025-06-18 16:38:39 -0700
commit3cbc500118d27f82c89f401ffb34826264e9cb60 (patch)
tree0d3cb7e997f4a2fd5037f515f0e4cc8b43259ec1 /tools/slang-unit-test/unit-test-record-replay.cpp
parent777ac6cae9776cd2d28bd5a9f627261ba9740153 (diff)
Fix retry logic for unit test (#7471)
* Fix the ignored unit-tests on retry * Retrigger CI * Add more error messages * Don't use test-server for retry of unit-test to see error messages * Clean up cl.yml Remove 'has-gpu' because it is unused after debug became full-gpu-test. Renamed files to make the meaning more clear: - Renamed expected-failure.txt to expected-failure-via-glsl.txt - Renamed expected-failure-github-runner.txt to expected-failure-no-gpu.txt * Rename cpu-hello-world.slang to avoid name conflict to example We have an example whose executable name is cpu-hello-world.exe. It gets built when you run `cmake --build`, but it gets overwritten by slang-test when it tests `tests/cpu-program/cpu-hello-world.slang`. This PR renames to avoid the name conflict. * Remove debug code --------- Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'tools/slang-unit-test/unit-test-record-replay.cpp')
-rw-r--r--tools/slang-unit-test/unit-test-record-replay.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/slang-unit-test/unit-test-record-replay.cpp b/tools/slang-unit-test/unit-test-record-replay.cpp
index 1dc1a36d2..bc5baeafd 100644
--- a/tools/slang-unit-test/unit-test-record-replay.cpp
+++ b/tools/slang-unit-test/unit-test-record-replay.cpp
@@ -256,6 +256,16 @@ static SlangResult runExample(
hashLines.add(line);
}
+ if (hashLines.getCount() == 0)
+ {
+ msgBuilder << "Hash value is not found for '" << exampleName << "'\n";
+ msgBuilder << "Process ret code: " << exeRes.resultCode << "\n";
+ msgBuilder << "Standard output:\n" << exeRes.standardOutput << "\n";
+ msgBuilder << "Standard error:\n" << exeRes.standardError << "\n";
+ getTestReporter()->message(TestMessageType::TestFailure, msgBuilder.toString().getBuffer());
+ return SLANG_FAIL;
+ }
+
res = parseHashes(hashLines, outHashes);
if (SLANG_FAILED(res))
{