diff options
Diffstat (limited to 'testsuite/tests/driver/recompHash')
-rw-r--r-- | testsuite/tests/driver/recompHash/A.hs | 6 | ||||
-rw-r--r-- | testsuite/tests/driver/recompHash/B.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/driver/recompHash/Makefile | 17 | ||||
-rw-r--r-- | testsuite/tests/driver/recompHash/all.T | 3 | ||||
-rw-r--r-- | testsuite/tests/driver/recompHash/recompHash.stdout | 2 |
5 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/tests/driver/recompHash/A.hs b/testsuite/tests/driver/recompHash/A.hs new file mode 100644 index 0000000000..905110c8cf --- /dev/null +++ b/testsuite/tests/driver/recompHash/A.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE TemplateHaskell #-} +module A where + +import B + +main = print 0 diff --git a/testsuite/tests/driver/recompHash/B.hs b/testsuite/tests/driver/recompHash/B.hs new file mode 100644 index 0000000000..7b1456b488 --- /dev/null +++ b/testsuite/tests/driver/recompHash/B.hs @@ -0,0 +1,3 @@ +module B where + +c = print 0 diff --git a/testsuite/tests/driver/recompHash/Makefile b/testsuite/tests/driver/recompHash/Makefile new file mode 100644 index 0000000000..6155169cba --- /dev/null +++ b/testsuite/tests/driver/recompHash/Makefile @@ -0,0 +1,17 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +# Recompilation tests + +clean: + rm -f *.o* + rm -f *.dyn_o* + rm -f *.hi* + +# Touching a file should not cause recompilation + +recompHash: clean + '$(TEST_HC)' $(TEST_HC_OPTS) --make A.hs -fhide-source-paths + touch B.hs + '$(TEST_HC)' $(TEST_HC_OPTS) --make A.hs -fhide-source-paths diff --git a/testsuite/tests/driver/recompHash/all.T b/testsuite/tests/driver/recompHash/all.T new file mode 100644 index 0000000000..ab0814b62b --- /dev/null +++ b/testsuite/tests/driver/recompHash/all.T @@ -0,0 +1,3 @@ +test('recompHash', [extra_files(['A.hs', 'B.hs']), + when(fast(), skip)], + makefile_test, []) diff --git a/testsuite/tests/driver/recompHash/recompHash.stdout b/testsuite/tests/driver/recompHash/recompHash.stdout new file mode 100644 index 0000000000..2c8a019066 --- /dev/null +++ b/testsuite/tests/driver/recompHash/recompHash.stdout @@ -0,0 +1,2 @@ +[1 of 2] Compiling B +[2 of 2] Compiling A |