From d256538b3a3c96e96d112b02a87ab380d61ef96f Mon Sep 17 00:00:00 2001 From: Brian Gesiak Date: Thu, 27 Jul 2017 16:50:40 +0000 Subject: [lit] Fix order of checks in shtest-shell.py test Summary: An expectation in `utils/lit/tests/Inputs/shtest-shell/redirects.txt` expects that first a string printed to stdout is seen, and then a string printed to stderr. Add `flush()` calls to ensure that stdout is printed before stderr, as expected. Reviewers: rnk, mgorny, jroelofs Reviewed By: rnk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35947 llvm-svn: 309292 --- .../lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py') diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py b/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py index 5c1849870b1..357089d4899 100644 --- a/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py +++ b/llvm/utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py @@ -1,4 +1,10 @@ #!/usr/bin/env python + import sys + + sys.stdout.write("a line on stdout\n") +sys.stdout.flush() + sys.stderr.write("a line on stderr\n") +sys.stderr.flush() -- cgit v1.2.3