Failing test-case for #12135.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Sun, 5 Jun 2016 18:40:35 +0000 (11:40 -0700)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Sun, 5 Jun 2016 18:42:00 +0000 (11:42 -0700)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
testsuite/.gitignore
testsuite/tests/driver/Makefile
testsuite/tests/driver/T12135.hs [new file with mode: 0644]
testsuite/tests/driver/T12135.stdout [new file with mode: 0644]
testsuite/tests/driver/T12135a.h [new file with mode: 0644]
testsuite/tests/driver/T12135b.h [new file with mode: 0644]
testsuite/tests/driver/all.T

index e1f1822..87e3558 100644 (file)
@@ -572,6 +572,9 @@ mk/ghcconfig*_test___spaces_ghc*.exe.mk
 /tests/driver/T8602/t8602.sh
 /tests/driver/T9562/Main
 /tests/driver/T11763
+/tests/driver/T12135
+/tests/driver/T12135a
+/tests/driver/T12135b
 /tests/driver/Test.081b
 /tests/driver/Test.081b.hs
 /tests/driver/Test_081a
index 51fb71a..41a1891 100644 (file)
@@ -621,3 +621,14 @@ T10320:
        [ -s T10320.dump-rule-rewrites ]
        "$(TEST_HC)" $(TEST_HC_OPTS) -ddump-to-file -ddump-rule-rewrites T10320.hs
        [ -f T10320.dump-rule-rewrites ] && [ ! -s T10320.dump-rule-rewrites ]
+
+.PHONY: T12135
+T12135:
+       $(RM) -rf T12135.o T12135.hi T12135 T12135a T12135b
+       mkdir T12135a T12135b
+       cp T12135a.h T12135a/T12135.h
+       "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -IT12135b -IT12135a --make T12135.hs
+       ./T12135
+       cp T12135b.h T12135b/T12135.h
+       "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -IT12135b -IT12135a --make T12135.hs
+       ./T12135
diff --git a/testsuite/tests/driver/T12135.hs b/testsuite/tests/driver/T12135.hs
new file mode 100644 (file)
index 0000000..f6ea19d
--- /dev/null
@@ -0,0 +1,3 @@
+{-# LANGUAGE CPP #-}
+#include "T12135.h"
+main = print message
diff --git a/testsuite/tests/driver/T12135.stdout b/testsuite/tests/driver/T12135.stdout
new file mode 100644 (file)
index 0000000..8da4f15
--- /dev/null
@@ -0,0 +1,4 @@
+[1 of 1] Compiling Main             ( T12135.hs, T12135.o )
+Linking T12135 ...
+1
+2
diff --git a/testsuite/tests/driver/T12135a.h b/testsuite/tests/driver/T12135a.h
new file mode 100644 (file)
index 0000000..3603079
--- /dev/null
@@ -0,0 +1 @@
+message = 1
diff --git a/testsuite/tests/driver/T12135b.h b/testsuite/tests/driver/T12135b.h
new file mode 100644 (file)
index 0000000..cefcf6b
--- /dev/null
@@ -0,0 +1 @@
+message = 2
index 1adf482..54c84bc 100644 (file)
@@ -482,3 +482,9 @@ test('T10320',
      , extra_clean(['T10320', 'T10320.o', 'T10320.hi'])],
      run_command,
      ['$MAKE -s --no-print-directory T10320'])
+
+test('T12135',
+     [expect_broken(12135),
+      extra_clean(['T12135.o', 'T12135.hi', 'T12135', 'T12135a/T12135.h', 'T12135b/T12135.h'])],
+     run_command,
+     ['$MAKE -s --no-print-directory T12135'])