summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver/recomp001
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-01-17 15:48:09 -0500
committerBen Gamari <ben@smart-cactus.org>2017-01-17 15:56:27 -0500
commit769e3ee7671f0a038558b591c58ba340c8c09952 (patch)
tree4d245b6a96bff2bab653b69fb2a558e87eb97c0a /testsuite/tests/driver/recomp001
parent38f289fa2a8715d2d5869e144b764c35cba16c6a (diff)
downloadhaskell-769e3ee7671f0a038558b591c58ba340c8c09952.tar.gz
testsuite/recomp001: Sleep to ensure that GHC notices file change
Some operating systems (e.g. Darwin) have very poor file timestamp resolution. On these systems GHC often fails to notice that B.hs changes in this testsuite, leading to sporatic test failures. Add a sleep to ensure the change is noticed. Test Plan: Validate Reviewers: ezyang, austin Subscribers: mpickering, gracjan, thomie Differential Revision: https://phabricator.haskell.org/D2964
Diffstat (limited to 'testsuite/tests/driver/recomp001')
-rw-r--r--testsuite/tests/driver/recomp001/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/testsuite/tests/driver/recomp001/Makefile b/testsuite/tests/driver/recomp001/Makefile
index de4f9814c6..a592534703 100644
--- a/testsuite/tests/driver/recomp001/Makefile
+++ b/testsuite/tests/driver/recomp001/Makefile
@@ -15,4 +15,7 @@ recomp001: clean
cp B1.hs B.hs
'$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 C.hs
cp B2.hs B.hs
+ # Operating systems with poor timer resolution (e.g. Darwin) need a bit
+ # of time here, lest GHC not realize that the file changed.
+ sleep 1
-'$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 C.hs