mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add support for capturing console output to FileTest. (#4339)
One of the things that ClangRunnerTest is doing is capturing stderr/stdout because clang prints to it directly. This adds support for that to FileTest. I'm renaming the current `capture_output` field to `dump_output` because the name is ambiguous after this change, and the flag is already named `--dump_output`. It's still not great, but at least it's more distinct. Note ClangRunner still doesn't use the vfs; that still needs work. I'm just moving the NoArgs test over as a trivial test of the functionality.
This commit is contained in:
@@ -23,9 +23,9 @@ namespace {
|
||||
// phase subdirectories.
|
||||
class ToolchainFileTest : public FileTestBase {
|
||||
public:
|
||||
explicit ToolchainFileTest(llvm::StringRef exe_path,
|
||||
explicit ToolchainFileTest(llvm::StringRef exe_path, std::mutex* output_mutex,
|
||||
llvm::StringRef test_name)
|
||||
: FileTestBase(test_name),
|
||||
: FileTestBase(output_mutex, test_name),
|
||||
component_(GetComponent(test_name)),
|
||||
installation_(InstallPaths::MakeForBazelRunfiles(exe_path)) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user