Fix ffi023
authorSimon Marlow <marlowsd@gmail.com>
Tue, 18 Nov 2014 15:40:45 +0000 (15:40 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 18 Nov 2014 15:40:57 +0000 (15:40 +0000)
testsuite/tests/ffi/should_run/Makefile
testsuite/tests/ffi/should_run/all.T

index 12e51b2..98d26fe 100644 (file)
@@ -20,6 +20,9 @@ T5402_setup :
 T5594_setup :
        '$(TEST_HC)' $(TEST_HC_OPTS) -c T5594.hs
 
+ffi023_setup :
+       '$(TEST_HC)' $(TEST_HC_OPTS) -c ffi023.hs
+
 .PHONY: Capi_Ctype_001
 Capi_Ctype_001:
        '$(HSC2HS)' Capi_Ctype_A_001.hsc
index 0499631..0352f31 100644 (file)
@@ -211,5 +211,9 @@ test('T8083',
 
 test('ffi023', [ omit_ways(['ghci']),
                 extra_clean(['ffi023_c.o']),
-                extra_run_opts('1000 4') ],
+                extra_run_opts('1000 4'),
+                pre_cmd('$MAKE -s --no-print-directory ffi023_setup') ],
+                # The ffi023_setup hack is to ensure that we generate
+                # ffi023_stub.h before compiling ffi023_c.c, which
+                # needs it.
               compile_and_run, ['ffi023_c.c'])