mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-01 07:30:33 +00:00
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360617 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1d1646072b
commit
d6664e77e7
@ -1085,6 +1085,7 @@ public:
|
|||||||
// Return std::string because the output of a failing EXPECT check is
|
// Return std::string because the output of a failing EXPECT check is
|
||||||
// unreadable for StringRef. It also avoids any lifetime issues.
|
// unreadable for StringRef. It also avoids any lifetime issues.
|
||||||
template <typename... Ts> std::string runTest(Ts... OptionAttributes) {
|
template <typename... Ts> std::string runTest(Ts... OptionAttributes) {
|
||||||
|
outs().flush(); // flush any output from previous tests
|
||||||
AutoDeleteFile File;
|
AutoDeleteFile File;
|
||||||
{
|
{
|
||||||
OutputRedirector Stdout(fileno(stdout));
|
OutputRedirector Stdout(fileno(stdout));
|
||||||
|
Loading…
Reference in New Issue
Block a user