[commit: testsuite] master: Test for -staticlib flag (629f393)

git at git.haskell.org git at git.haskell.org
Wed Sep 4 21:09:33 CEST 2013


Repository : ssh://git@git.haskell.org/testsuite

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/629f393175b3800e714671b3e4a07b25d2a8edf3/testsuite

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

commit 629f393175b3800e714671b3e4a07b25d2a8edf3
Author: Luke Iannini <lukexi at me.com>
Date:   Sat Aug 31 22:49:16 2013 -0700

    Test for -staticlib flag
    
    Signed-off-by: Austin Seipp <aseipp at pobox.com>


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

629f393175b3800e714671b3e4a07b25d2a8edf3
 tests/driver/Makefile                    |    4 ++++
 tests/driver/{B045/F.hs => Static001.hs} |    2 +-
 tests/driver/all.T                       |   11 +++++++++++
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/tests/driver/Makefile b/tests/driver/Makefile
index 18cf596..7673713 100644
--- a/tests/driver/Makefile
+++ b/tests/driver/Makefile
@@ -438,6 +438,10 @@ shared001:
 	$(RM) Shared001.hi Shared001.o HSdll.dll.a HSdll.dll Shared001_stub.*
 	"$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP_NO_RTSOPTS) -v0 -shared Shared001.hs
 
+static001:
+	$(RM) Static001.hi Static001.o liba.a Static001_stub.*
+	"$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP_NO_RTSOPTS) -v0 -staticlib Static001.hs
+
 # -----------------------------------------------------------------------------
 
 T3674:
diff --git a/tests/driver/B045/F.hs b/tests/driver/Static001.hs
similarity index 82%
copy from tests/driver/B045/F.hs
copy to tests/driver/Static001.hs
index c89635b..43056f2 100644
--- a/tests/driver/B045/F.hs
+++ b/tests/driver/Static001.hs
@@ -1,5 +1,5 @@
 {-# LANGUAGE ForeignFunctionInterface #-}
-module B045.F where
+module Static001 where
 foreign export ccall f :: Int -> Int
 f :: Int -> Int
 f n = n + 1
diff --git a/tests/driver/all.T b/tests/driver/all.T
index dc51535..ca02b40 100644
--- a/tests/driver/all.T
+++ b/tests/driver/all.T
@@ -306,6 +306,17 @@ test('shared001',
      run_command,
      ['$MAKE -s --no-print-directory shared001'])
 
+if config.os == 'darwin':
+  only_darwin = normal
+else:
+  only_darwin = skip
+
+test('static001',
+     [only_darwin,
+      extra_clean(['Static001.hi', 'Static001.o', 'liba.a', 'Static001_stub.h', 'Static001_stub.o'])],
+     run_command,
+     ['$MAKE -s --no-print-directory static001'])
+
 test('dynHelloWorld',
      only_ways(['dyn']),
      compile_and_run,





More information about the ghc-commits mailing list