Skip to content

Commit 1904ded

Browse files
committed
Ensure the return status is correctly reported
1 parent 97cae93 commit 1904ded

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

source/MaterialXTest/MaterialXRender/RenderUtil.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ bool ShaderRenderTester::validate(const mx::FilePath optionsFilePath)
7575

7676
RenderSession session { runState.options, logger.renderLog() };
7777

78+
bool allSucceeded = true;
7879
for (const mx::FilePath& filename : files)
7980
{
8081
DocumentInfo docInfo = loadAndValidateDocument(filename, runState, logger, profiler);
@@ -88,14 +89,16 @@ bool ShaderRenderTester::validate(const mx::FilePath optionsFilePath)
8889
auto result = runRenderer(session, item, *runState.context);
8990
profiler.times().languageTimes.accumulate(result.languageTimes);
9091
profiler.times().elementsTested += result.elementsTested;
92+
if (!result.success)
93+
allSucceeded = false;
9194
}
9295
}
9396

9497
// Print profiling summary on the normal path.
9598
// All resource cleanup is handled by destructors.
9699
profiler.printSummary(runState.options, logger.profilingLog());
97100

98-
return true;
101+
return allSucceeded;
99102
}
100103

101104
void ShaderRenderTester::loadDependentLibraries(TestRunState& runState)

0 commit comments

Comments
 (0)