summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2016-06-05 11:40:35 -0700
committerEdward Z. Yang <ezyang@cs.stanford.edu>2016-06-05 11:42:00 -0700
commitf91d87df889fb612183b8f2d42b29d2edd7c1dbc (patch)
tree5ca2de61f977338b3f878e2d43118f84f3e5d592
parent886f4c1b1c8ad5b850d3703a48d92975ed615627 (diff)
downloadhaskell-ghc-quick3.tar.gz
Failing test-case for #12135.ghc-quick3
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
-rw-r--r--testsuite/.gitignore3
-rw-r--r--testsuite/tests/driver/Makefile11
-rw-r--r--testsuite/tests/driver/T12135.hs3
-rw-r--r--testsuite/tests/driver/T12135.stdout4
-rw-r--r--testsuite/tests/driver/T12135a.h1
-rw-r--r--testsuite/tests/driver/T12135b.h1
-rw-r--r--testsuite/tests/driver/all.T6
7 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/.gitignore b/testsuite/.gitignore
index e1f1822159..87e3558677 100644
--- a/testsuite/.gitignore
+++ b/testsuite/.gitignore
@@ -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
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile
index 51fb71a39b..41a1891377 100644
--- a/testsuite/tests/driver/Makefile
+++ b/testsuite/tests/driver/Makefile
@@ -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
index 0000000000..f6ea19d061
--- /dev/null
+++ b/testsuite/tests/driver/T12135.hs
@@ -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
index 0000000000..8da4f156fa
--- /dev/null
+++ b/testsuite/tests/driver/T12135.stdout
@@ -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
index 0000000000..36030790f6
--- /dev/null
+++ b/testsuite/tests/driver/T12135a.h
@@ -0,0 +1 @@
+message = 1
diff --git a/testsuite/tests/driver/T12135b.h b/testsuite/tests/driver/T12135b.h
new file mode 100644
index 0000000000..cefcf6b675
--- /dev/null
+++ b/testsuite/tests/driver/T12135b.h
@@ -0,0 +1 @@
+message = 2
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index 1adf482956..54c84bca36 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -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'])