diff --git a/unittests/Support/CommandLineTest.cpp b/unittests/Support/CommandLineTest.cpp index 2bf07e37494..4fb20b18d9b 100644 --- a/unittests/Support/CommandLineTest.cpp +++ b/unittests/Support/CommandLineTest.cpp @@ -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 std::string runTest(Ts... OptionAttributes) { + outs().flush(); // flush any output from previous tests AutoDeleteFile File; { OutputRedirector Stdout(fileno(stdout));