summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-11-04 16:15:15 -0400
committerYong He <yonghe@outlook.com>2017-11-04 16:15:15 -0400
commit8d19b2b4443101040acaf7d9dce2a7a6affea712 (patch)
tree361c9cd72efd6c31b23360ed235d3f7bbba00177 /tools
parent288841f66c808af70ad7687f9704c87075129b18 (diff)
parentcc98fd4606222ec1d18878d5e8278dc32910076b (diff)
Merge branch 'master' of https://github.com/shader-slang/slang
Diffstat (limited to 'tools')
-rw-r--r--tools/slang-test/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/slang-test/main.cpp b/tools/slang-test/main.cpp
index 0ff6535b8..7cfa981ae 100644
--- a/tools/slang-test/main.cpp
+++ b/tools/slang-test/main.cpp
@@ -674,6 +674,7 @@ TestResult runSimpleTest(TestInput& input)
// Otherwise we compare to the expected output
if (actualOutput != expectedOutput)
{
+ maybeDumpOutput(expectedOutput, actualOutput);
result = kTestResult_Fail;
}
@@ -1147,6 +1148,14 @@ TestResult runComputeComparisonImpl(TestInput& input, const char * langOption, S
}
auto actualOutput = getOutput(spawner);
+ auto expectedOutput = getExpectedOutput(outputStem);
+ if (actualOutput != expectedOutput)
+ {
+ String actualOutputPath = outputStem + ".actual";
+ Slang::File::WriteAllText(actualOutputPath, actualOutput);
+
+ return kTestResult_Fail;
+ }
// check against reference output
if (!File::Exists(actualOutputFile))