forked from OSchip/llvm-project
[Support] Ensure redirected outputs don't contain output from previous tests.
stdout may be buffered, and may not flush on every write. Explicitly flushing before redirecting the output ensures that the captured output does not contain output from other tests. llvm-svn: 360617
This commit is contained in:
parent
323dc634b9
commit
3cce23746e
|
@ -1085,6 +1085,7 @@ public:
|
|||
// Return std::string because the output of a failing EXPECT check is
|
||||
// unreadable for StringRef. It also avoids any lifetime issues.
|
||||
template <typename... Ts> std::string runTest(Ts... OptionAttributes) {
|
||||
outs().flush(); // flush any output from previous tests
|
||||
AutoDeleteFile File;
|
||||
{
|
||||
OutputRedirector Stdout(fileno(stdout));
|
||||
|
|
Loading…
Reference in New Issue