summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/slang-test/main.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/slang-test/main.cpp b/tools/slang-test/main.cpp
index 8eda760d4..56fefbd9d 100644
--- a/tools/slang-test/main.cpp
+++ b/tools/slang-test/main.cpp
@@ -955,6 +955,15 @@ TestResult runCrossCompilerTest(TestContext* context, TestInput& input)
result = TestResult::Fail;
}
+ // Always fail if the compilation produced a failure, just
+ // to catch situations where, e.g., command-line options parsing
+ // caused the same error in both the Slang and glslang cases.
+ //
+ if( actualSpawner.getResultCode() != 0 )
+ {
+ result = TestResult::Fail;
+ }
+
// If the test failed, then we write the actual output to a file
// so that we can easily diff it from the command line and
// diagnose the problem.
@@ -1088,6 +1097,15 @@ TestResult runHLSLComparisonTest(TestContext* context, TestInput& input)
result = TestResult::Fail;
}
+ // Always fail if the compilation produced a failure, just
+ // to catch situations where, e.g., command-line options parsing
+ // caused the same error in both the Slang and fxc cases.
+ //
+ if( resultCode != 0 )
+ {
+ result = TestResult::Fail;
+ }
+
// If the test failed, then we write the actual output to a file
// so that we can easily diff it from the command line and
// diagnose the problem.