[commit: testsuite] master: Add a test for "--make -dynamic-too" (06a089e)

Ian Lynagh igloo at earth.li
Fri Apr 26 03:12:00 CEST 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

https://github.com/ghc/testsuite/commit/06a089eb6431c6156ee22dd3f3d1d3fe707c9c9a

>---------------------------------------------------------------

commit 06a089eb6431c6156ee22dd3f3d1d3fe707c9c9a
Author: Ian Lynagh <ian at well-typed.com>
Date:   Thu Apr 25 23:30:22 2013 +0100

    Add a test for "--make -dynamic-too"

>---------------------------------------------------------------

 tests/driver/dynamicToo/{A001.hs => A002.hs}   |    2 +-
 tests/driver/dynamicToo/{B001_1.hs => B002.hs} |    2 +-
 tests/driver/dynamicToo/C002.hs                |    9 +++++++++
 tests/driver/dynamicToo/Makefile               |   20 ++++++++++++++++++++
 tests/driver/dynamicToo/all.T                  |   10 ++++++++++
 5 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/tests/driver/dynamicToo/A001.hs b/tests/driver/dynamicToo/A002.hs
similarity index 53%
copy from tests/driver/dynamicToo/A001.hs
copy to tests/driver/dynamicToo/A002.hs
index 073c5fd..46db39b 100644
--- a/tests/driver/dynamicToo/A001.hs
+++ b/tests/driver/dynamicToo/A002.hs
@@ -1,5 +1,5 @@
 
-module A001 where
+module A002 where
 
 a :: Char
 a = 'a'
diff --git a/tests/driver/dynamicToo/B001_1.hs b/tests/driver/dynamicToo/B002.hs
similarity index 53%
copy from tests/driver/dynamicToo/B001_1.hs
copy to tests/driver/dynamicToo/B002.hs
index 9640f7b..d62c8c2 100644
--- a/tests/driver/dynamicToo/B001_1.hs
+++ b/tests/driver/dynamicToo/B002.hs
@@ -1,5 +1,5 @@
 
-module B001 where
+module B002 where
 
 b :: Char
 b = 'b'
diff --git a/tests/driver/dynamicToo/C002.hs b/tests/driver/dynamicToo/C002.hs
new file mode 100644
index 0000000..9fb7404
--- /dev/null
+++ b/tests/driver/dynamicToo/C002.hs
@@ -0,0 +1,9 @@
+
+module C002 where
+
+import A001
+import B001
+
+ab :: String
+ab = [a, b]
+
diff --git a/tests/driver/dynamicToo/Makefile b/tests/driver/dynamicToo/Makefile
index 5083fe4..69803de 100644
--- a/tests/driver/dynamicToo/Makefile
+++ b/tests/driver/dynamicToo/Makefile
@@ -21,3 +21,23 @@ dynamicToo001:
 	./s001
 	./d001
 
+
+dynamic002Check = [ -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,A001.o)
+	$(call dynamic002Check,B001.o)
+	$(call dynamic002Check,C001.o)
+	$(call dynamic002Check,A001.hi)
+	$(call dynamic002Check,B001.hi)
+	$(call dynamic002Check,C001.hi)
+	$(call dynamic002Check,A001.dyn_o)
+	$(call dynamic002Check,B001.dyn_o)
+	$(call dynamic002Check,C001.dyn_o)
+	$(call dynamic002Check,A001.dyn_hi)
+	$(call dynamic002Check,B001.dyn_hi)
+	$(call dynamic002Check,C001.dyn_hi)
+
diff --git a/tests/driver/dynamicToo/all.T b/tests/driver/dynamicToo/all.T
index 6465d1e..f036337 100644
--- a/tests/driver/dynamicToo/all.T
+++ b/tests/driver/dynamicToo/all.T
@@ -12,3 +12,13 @@ test('dynamicToo001',
      run_command,
      ['$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']),
+      unless(have_vanilla(), skip),
+      unless(have_dynamic(), skip)],
+     run_command,
+     ['$MAKE -s --no-print-directory dynamicToo002'])
+





More information about the ghc-commits mailing list