]> granicus.if.org Git - llvm/commitdiff
[lit] Fix order of checks in shtest-shell.py test
authorBrian Gesiak <modocache@gmail.com>
Thu, 27 Jul 2017 16:50:40 +0000 (16:50 +0000)
committerBrian Gesiak <modocache@gmail.com>
Thu, 27 Jul 2017 16:50:40 +0000 (16:50 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309292 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/tests/Inputs/shtest-shell/write-to-stderr.py
utils/lit/tests/Inputs/shtest-shell/write-to-stdout-and-stderr.py

index aff94cd8b96477ebbaece8d4ba0b2c382e2163c0..9463251d823ab21766a3a816546b85c7000c4254 100644 (file)
@@ -1,3 +1,7 @@
 #!/usr/bin/env python
+
 import sys
+
+
 sys.stderr.write("a line on stderr\n")
+sys.stderr.flush()
index 5c1849870b1e1ca75f59f25a081bcff5692576b9..357089d4899b5223370081e552e158c1aa957a31 100644 (file)
@@ -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()