[commit: testsuite] master: More dynamic-too tests (62833e1)

Ian Lynagh igloo at earth.li
Fri Apr 26 21:42:06 CEST 2013


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

On branch  : master

https://github.com/ghc/testsuite/commit/62833e1fa6212f7a33d2e5fb8a9fd0dc302bd5fa

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

commit 62833e1fa6212f7a33d2e5fb8a9fd0dc302bd5fa
Author: Ian Lynagh <ian at well-typed.com>
Date:   Fri Apr 26 18:31:16 2013 +0100

    More dynamic-too tests

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

 tests/driver/dynamicToo/{A001.hs => A003.hs} |    2 +-
 tests/driver/dynamicToo/Makefile             |   35 ++++++++++++++++---------
 tests/driver/dynamicToo/all.T                |   21 +++++++++------
 3 files changed, 36 insertions(+), 22 deletions(-)

diff --git a/tests/driver/dynamicToo/A001.hs b/tests/driver/dynamicToo/A003.hs
similarity index 53%
copy from tests/driver/dynamicToo/A001.hs
copy to tests/driver/dynamicToo/A003.hs
index 073c5fd..af7091a 100644
--- a/tests/driver/dynamicToo/A001.hs
+++ b/tests/driver/dynamicToo/A003.hs
@@ -1,5 +1,5 @@
 
-module A001 where
+module A003 where
 
 a :: Char
 a = 'a'
diff --git a/tests/driver/dynamicToo/Makefile b/tests/driver/dynamicToo/Makefile
index 0986f13..3953b5f 100644
--- a/tests/driver/dynamicToo/Makefile
+++ b/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/tests/driver/dynamicToo/all.T b/tests/driver/dynamicToo/all.T
index 7b4352b..5f78b02 100644
--- a/tests/driver/dynamicToo/all.T
+++ b/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'])
+





More information about the ghc-commits mailing list