summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver/dynamicToo
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-04-26 18:31:16 +0100
committerIan Lynagh <ian@well-typed.com>2013-04-26 19:11:51 +0100
commite0a8eb6cb24017773fb33197fd83c5b6f14707ba (patch)
treeea5625e9c37dbf4b9bd6cabd0b6269140b00973c /testsuite/tests/driver/dynamicToo
parent9183ff204ddfbacf5eb2cc243038276110cd8d47 (diff)
downloadhaskell-e0a8eb6cb24017773fb33197fd83c5b6f14707ba.tar.gz
More dynamic-too tests
Diffstat (limited to 'testsuite/tests/driver/dynamicToo')
-rw-r--r--testsuite/tests/driver/dynamicToo/A003.hs6
-rw-r--r--testsuite/tests/driver/dynamicToo/Makefile35
-rw-r--r--testsuite/tests/driver/dynamicToo/all.T21
3 files changed, 41 insertions, 21 deletions
diff --git a/testsuite/tests/driver/dynamicToo/A003.hs b/testsuite/tests/driver/dynamicToo/A003.hs
new file mode 100644
index 0000000000..af7091aca3
--- /dev/null
+++ b/testsuite/tests/driver/dynamicToo/A003.hs
@@ -0,0 +1,6 @@
+
+module A003 where
+
+a :: Char
+a = 'a'
+
diff --git a/testsuite/tests/driver/dynamicToo/Makefile b/testsuite/tests/driver/dynamicToo/Makefile
index 0986f13795..3953b5f6be 100644
--- a/testsuite/tests/driver/dynamicToo/Makefile
+++ b/testsuite/tests/driver/dynamicToo/Makefile
@@ -22,22 +22,31 @@ dynamicToo001:
./d001
-dynamic002Check = [ -f $1 ] || echo $1 missing
+checkExists = [ -f $1 ] || echo $1 missing
.PHONY: dynamicToo002
# Check that "--make -dynamic-too" works
dynamicToo002:
"$(TEST_HC)" $(TEST_HC_OPTS) -dynamic-too -v0 --make C002
- $(call dynamic002Check,A002.o)
- $(call dynamic002Check,B002.o)
- $(call dynamic002Check,C002.o)
- $(call dynamic002Check,A002.hi)
- $(call dynamic002Check,B002.hi)
- $(call dynamic002Check,C002.hi)
- $(call dynamic002Check,A002.dyn_o)
- $(call dynamic002Check,B002.dyn_o)
- $(call dynamic002Check,C002.dyn_o)
- $(call dynamic002Check,A002.dyn_hi)
- $(call dynamic002Check,B002.dyn_hi)
- $(call dynamic002Check,C002.dyn_hi)
+ $(call checkExists,A002.o)
+ $(call checkExists,B002.o)
+ $(call checkExists,C002.o)
+ $(call checkExists,A002.hi)
+ $(call checkExists,B002.hi)
+ $(call checkExists,C002.hi)
+ $(call checkExists,A002.dyn_o)
+ $(call checkExists,B002.dyn_o)
+ $(call checkExists,C002.dyn_o)
+ $(call checkExists,A002.dyn_hi)
+ $(call checkExists,B002.dyn_hi)
+ $(call checkExists,C002.dyn_hi)
+
+.PHONY: dynamicToo003
+# Check that "-c -dynamic-too" works
+dynamicToo003:
+ "$(TEST_HC)" $(TEST_HC_OPTS) -dynamic-too -v0 -c A003.hs
+ $(call checkExists,A003.o)
+ $(call checkExists,A003.hi)
+ $(call checkExists,A003.dyn_o)
+ $(call checkExists,A003.dyn_hi)
diff --git a/testsuite/tests/driver/dynamicToo/all.T b/testsuite/tests/driver/dynamicToo/all.T
index 7b4352ba34..5f78b0262e 100644
--- a/testsuite/tests/driver/dynamicToo/all.T
+++ b/testsuite/tests/driver/dynamicToo/all.T
@@ -1,10 +1,9 @@
setTestOpts(only_compiler_types(['ghc']))
test('dynamicToo001',
- [extra_clean(['A001.o', 'B001.o', 'C001.o',
- 'A001.hi', 'B001.hi', 'C001.hi',
- 'A001.dyn_o', 'B001.dyn_o', 'C001.dyn_o',
- 'A001.dyn_hi', 'B001.dyn_hi', 'C001.dyn_hi',
+ [extra_clean(['A001.o', 'A001.hi', 'A001.dyn_o', 'A001.dyn_hi',
+ 'B001.o', 'B001.hi', 'B001.dyn_o', 'B001.dyn_hi',
+ 'C001.o', 'C001.hi', 'C001.dyn_o', 'C001.dyn_hi',
's001', 'd001']),
when(opsys('mingw32'), expect_broken(7665)),
unless(have_vanilla(), skip),
@@ -13,13 +12,19 @@ test('dynamicToo001',
['$MAKE -s --no-print-directory dynamicToo001'])
test('dynamicToo002',
- [extra_clean(['A002.o', 'B002.o', 'C002.o',
- 'A002.hi', 'B002.hi', 'C002.hi',
- 'A002.dyn_o', 'B002.dyn_o', 'C002.dyn_o',
- 'A002.dyn_hi', 'B002.dyn_hi', 'C002.dyn_hi']),
+ [extra_clean(['A002.o', 'A002.hi', 'A002.dyn_o', 'A002.dyn_hi',
+ 'B002.o', 'B002.hi', 'B002.dyn_o', 'B002.dyn_hi',
+ 'C002.o', 'C002.hi', 'C002.dyn_o', 'C002.dyn_hi']),
unless(have_vanilla(), skip),
unless(have_dynamic(), skip),
expect_broken(7864)],
run_command,
['$MAKE -s --no-print-directory dynamicToo002'])
+test('dynamicToo003',
+ [extra_clean(['A003.o', 'A003.hi', 'A003.dyn_o', 'A003.dyn_hi']),
+ unless(have_vanilla(), skip),
+ unless(have_dynamic(), skip)],
+ run_command,
+ ['$MAKE -s --no-print-directory dynamicToo003'])
+