Skip to content

Commit

Permalink
Merge pull request #49 from cmput415/toolchain-files
Browse files Browse the repository at this point in the history
Put intermediate toolchain files in cwd rather than tmp
  • Loading branch information
JustinMeimar authored Sep 23, 2024
2 parents 6a35a64 + f2a2144 commit 367133f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/analysis/Grader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ void Grader::fillToolchainResultsJSON() {
}
trackSolutionFailure(test.get(), toolChain.first, attacker);
}
//
if (result.pass) {
testCount++;
passCount++;
}
// Print the test result in a nice to read format.
printGraderTestResult(result.pass, result.error);
Expand Down
7 changes: 3 additions & 4 deletions src/toolchain/Command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,9 @@ Command::Command(const JSON& step, int64_t timeout)
args.push_back(arg);

// If no output path is supplied by default, temporaries are created to capture stdout and stderr.
std::string output_name = std::string(step["stepName"]) + ".stdout";
std::string error_name = std::string(step["stepName"]) + ".stderr";
outPath = fs::temp_directory_path() / output_name;
errPath = fs::temp_directory_path() / error_name;
const auto& stepName = step["stepName"];
outPath = fs::path(stepName).replace_extension(".stdout");
errPath = fs::path(stepName).replace_extension(".stderr");

// Set the executable path
std::string path = step["executablePath"];
Expand Down

0 comments on commit 367133f

Please sign in to comment.