Make TH_Depends more portable
authorIan Lynagh <igloo@earth.li>
Mon, 30 Jan 2012 20:12:50 +0000 (20:12 +0000)
committerIan Lynagh <igloo@earth.li>
Mon, 30 Jan 2012 20:12:50 +0000 (20:12 +0000)
We now just sleep for 2 seconds, rather than using
    touch --date="now + 3 seconds"
which doesn't work on OS X. OS X does have "touch -A", but that doesn't
work on Linux.

testsuite/tests/th/Makefile

index 9769239..bdb49db 100644 (file)
@@ -29,10 +29,8 @@ TH_Depends:
 # Remove the executable, as GHC won't relink if the timestamps seem to
 # be the same
        $(RM) TH_Depends TH_Depends.exe
+       sleep 2
        echo "second run" > TH_Depends_external.txt
-# Give TH_Depends_external.txt a future date in case it gets the same
-# timestamp again
-       touch --date="now + 3 seconds" TH_Depends_external.txt
        '$(TEST_HC)' $(TEST_HC_OPTS) --make -v0 TH_Depends
        ./TH_Depends