Skip to content

Commit

Permalink
Fixed tests now fail when failing to create output
Browse files Browse the repository at this point in the history
  • Loading branch information
Sir-NoChill committed Oct 1, 2024
1 parent 0cd4255 commit 73553dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tests/TestRunning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ TestResult runTest(TestFile* test, const ToolChain& toolChain, const Config& cfg
genOutPath = eo.getOutputFile();
}

// Check if we were able to create the output file
std::ifstream file(genErrorString);
if (!file.is_open()) {
return TestResult(testPath, false, true, "Failed to create output file");
}

} catch (const CommandException& ce) {
// toolchain throws errors only when allowError is false in the config
if (cfg.getVerbosity() > 0) {
Expand Down

0 comments on commit 73553dd

Please sign in to comment.