From c9207a8b151f80e3df28e1e32b7cdf2f8bb34fcd Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sat, 7 Dec 2024 18:47:29 +0300 Subject: [PATCH] update vctest --- vctest/main.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vctest/main.cpp b/vctest/main.cpp index afea3451..1bc82545 100644 --- a/vctest/main.cpp +++ b/vctest/main.cpp @@ -126,6 +126,15 @@ static void display_test_output(const fs::path& path, std::ostream& stream) { } } +static std::string fix_path(std::string s) { + for (char& c : s) { + if (c == '\\') { + c = '/'; + } + } + return s; +} + static bool run_test(const Config& config, const fs::path& path) { using std::chrono::duration_cast; using std::chrono::high_resolution_clock; @@ -139,7 +148,7 @@ static bool run_test(const Config& config, const fs::path& path) { ss << " --test " << path; ss << " --res " << config.resDir; ss << " --dir " << config.workingDir; - ss << " >" << (config.workingDir / "output.txt").string() << " 2>&1"; + ss << " >" << fix_path((config.workingDir / "output.txt").string()) << " 2>&1"; auto command = ss.str(); print_separator(std::cout);