diff --git a/test/tools_test.cpp b/test/tools_test.cpp index fdcb0949..4ec0cf92 100644 --- a/test/tools_test.cpp +++ b/test/tools_test.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -103,7 +104,7 @@ class scoped_no_leak_check { } else { new_asan_options.assign(kNoLeakCheck); } - ::setenv("ASAN_OPTIONS", new_asan_options.c_str(), 1); + ::setenv(kEnvVar, new_asan_options.c_str(), 1); unset_asan_ = true; } @@ -366,9 +367,14 @@ void ignore_sigpipe() { #endif } +template +concept subprocess_arg = std::convertible_to || + std::convertible_to> || + std::convertible_to; + class subprocess { public: - template + template subprocess(std::filesystem::path const& prog, Args&&... args) : prog_{prog} { (append_arg(cmdline_, std::forward(args)), ...); @@ -477,7 +483,7 @@ class subprocess { args.insert(args.end(), more.begin(), more.end()); } - template + template T> static void append_arg(std::vector& args, T const& arg) { args.emplace_back(arg); }