summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/driver')
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo005/A005.hsig5
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo005/Makefile16
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo005/test.T8
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo006/A.hsig5
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo006/B.hs8
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo006/Makefile20
-rw-r--r--testsuite/tests/driver/dynamicToo/dynamicToo006/test.T9
7 files changed, 71 insertions, 0 deletions
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo005/A005.hsig b/testsuite/tests/driver/dynamicToo/dynamicToo005/A005.hsig
new file mode 100644
index 0000000000..75d621cfec
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo005/A005.hsig
@@ -0,0 +1,5 @@
+
+module A005 where
+
+data Maybe a = Nothing | Just a
+
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo005/Makefile b/testsuite/tests/driver/dynamicToo/dynamicToo005/Makefile
new file mode 100644
index 0000000000..617510eec4
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo005/Makefile
@@ -0,0 +1,16 @@
+TOP=../../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+checkExists = [ -f $1 ] || echo $1 missing
+
+.PHONY: dynamicToo005
+# Check that "-c -dynamic-too" works with .hsig
+dynamicToo005:
+ "$(TEST_HC)" $(TEST_HC_OPTS) -dynamic-too -v0 \
+ -sig-of A005=base:Prelude \
+ -c A005.hsig
+ $(call checkExists,A005.o)
+ $(call checkExists,A005.hi)
+ $(call checkExists,A005.dyn_o)
+ $(call checkExists,A005.dyn_hi)
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo005/test.T b/testsuite/tests/driver/dynamicToo/dynamicToo005/test.T
new file mode 100644
index 0000000000..48460f5135
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo005/test.T
@@ -0,0 +1,8 @@
+
+test('dynamicToo005',
+ [extra_clean(['A005.o', 'A005.hi', 'A005.dyn_o', 'A005.dyn_hi']),
+ unless(have_vanilla(), skip),
+ unless(have_dynamic(), skip)],
+ run_command,
+ ['$MAKE -s --no-print-directory dynamicToo005'])
+
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo006/A.hsig b/testsuite/tests/driver/dynamicToo/dynamicToo006/A.hsig
new file mode 100644
index 0000000000..f79d5d334f
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo006/A.hsig
@@ -0,0 +1,5 @@
+
+module A where
+
+data Maybe a = Nothing | Just a
+
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo006/B.hs b/testsuite/tests/driver/dynamicToo/dynamicToo006/B.hs
new file mode 100644
index 0000000000..65900e786a
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo006/B.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+
+module B where
+
+import A
+
+b :: Maybe a
+b = Nothing
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo006/Makefile b/testsuite/tests/driver/dynamicToo/dynamicToo006/Makefile
new file mode 100644
index 0000000000..497f2c0942
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo006/Makefile
@@ -0,0 +1,20 @@
+TOP=../../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+checkExists = [ -f $1 ] || echo $1 missing
+
+.PHONY: dynamicToo006
+# Check that "--make -dynamic-too" works with .hsig
+dynamicToo006:
+ "$(TEST_HC)" $(TEST_HC_OPTS) -dynamic-too -v0 \
+ -sig-of A=base:Prelude \
+ --make B
+ $(call checkExists,A.o)
+ $(call checkExists,B.o)
+ $(call checkExists,A.hi)
+ $(call checkExists,B.hi)
+ $(call checkExists,A.dyn_o)
+ $(call checkExists,B.dyn_o)
+ $(call checkExists,A.dyn_hi)
+ $(call checkExists,B.dyn_hi)
diff --git a/testsuite/tests/driver/dynamicToo/dynamicToo006/test.T b/testsuite/tests/driver/dynamicToo/dynamicToo006/test.T
new file mode 100644
index 0000000000..72e06ca524
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/dynamicToo006/test.T
@@ -0,0 +1,9 @@
+
+test('dynamicToo006',
+ [extra_clean(['A.o', 'A.hi', 'A.dyn_o', 'A.dyn_hi',
+ 'B.o', 'B.hi', 'B.dyn_o', 'B.dyn_hi']),
+ unless(have_vanilla(), skip),
+ unless(have_dynamic(), skip)],
+ run_command,
+ ['$MAKE -s --no-print-directory dynamicToo006'])
+