[commit: ghc] master: testsuite/recomp001: Sleep to ensure that GHC notices file change (769e3ee)
git at git.haskell.org
git at git.haskell.org
Tue Jan 17 21:37:49 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/769e3ee7671f0a038558b591c58ba340c8c09952/ghc
>---------------------------------------------------------------
commit 769e3ee7671f0a038558b591c58ba340c8c09952
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Tue Jan 17 15:48:09 2017 -0500
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
>---------------------------------------------------------------
769e3ee7671f0a038558b591c58ba340c8c09952
testsuite/tests/driver/recomp001/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/testsuite/tests/driver/recomp001/Makefile b/testsuite/tests/driver/recomp001/Makefile
index de4f981..a592534 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
More information about the ghc-commits
mailing list