summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRuey-Lin Hsu <petercommand@gmail.com>2016-08-04 13:41:57 +0200
committerBen Gamari <ben@smart-cactus.org>2016-08-05 10:40:45 +0200
commitf09d65474ed042360999cb88221d65b07bfb4b5f (patch)
treecbecdd42cf26e33b4c9760cad75820f6f381b7fb /testsuite
parentfe4008f6cc51612c2511cf23fcd646bc23ef91b8 (diff)
downloadhaskell-f09d65474ed042360999cb88221d65b07bfb4b5f.tar.gz
check that the number of parallel build is greater than 0
Fixes #12062. Reviewers: bgamari, thomie, austin, simonmar Reviewed By: bgamari, thomie, simonmar Subscribers: simonmar, thomie Differential Revision: https://phabricator.haskell.org/D2415 GHC Trac Issues: #12062
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/driver/extra_files.py1
-rw-r--r--testsuite/tests/driver/T12062/A.hs2
-rw-r--r--testsuite/tests/driver/T12062/A.hs-boot1
-rw-r--r--testsuite/tests/driver/T12062/C.hs7
-rw-r--r--testsuite/tests/driver/T12062/Makefile3
-rw-r--r--testsuite/tests/driver/T12062/T12062.hs6
-rw-r--r--testsuite/tests/driver/T12062/T12062.stderr2
-rw-r--r--testsuite/tests/driver/T12062/all.T2
8 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/driver/extra_files.py b/testsuite/driver/extra_files.py
index bc5d460b77..ee09182b20 100644
--- a/testsuite/driver/extra_files.py
+++ b/testsuite/driver/extra_files.py
@@ -82,6 +82,7 @@ extra_src_files = {
'T11430': ['Test11430.hs', 't11430.hs'],
'T11824': ['TyCon.hs', 'Type.hs', 'Type.hs-boot', 'Unbound/'],
'T11827': ['A.hs', 'A.hs-boot', 'B.hs'],
+ 'T12062': ['A.hs', 'A.hs-boot', 'C.hs'],
'T1372': ['p1/', 'p2/'],
'T1407': ['A.c'],
'T1959': ['B.hs', 'C.hs', 'D.hs', 'E1.hs', 'E2.hs'],
diff --git a/testsuite/tests/driver/T12062/A.hs b/testsuite/tests/driver/T12062/A.hs
new file mode 100644
index 0000000000..b1ea7a4d24
--- /dev/null
+++ b/testsuite/tests/driver/T12062/A.hs
@@ -0,0 +1,2 @@
+module A where
+import C
diff --git a/testsuite/tests/driver/T12062/A.hs-boot b/testsuite/tests/driver/T12062/A.hs-boot
new file mode 100644
index 0000000000..d843c00b78
--- /dev/null
+++ b/testsuite/tests/driver/T12062/A.hs-boot
@@ -0,0 +1 @@
+module A where
diff --git a/testsuite/tests/driver/T12062/C.hs b/testsuite/tests/driver/T12062/C.hs
new file mode 100644
index 0000000000..0f2a5b3a37
--- /dev/null
+++ b/testsuite/tests/driver/T12062/C.hs
@@ -0,0 +1,7 @@
+module C where
+
+import Language.Haskell.TH
+
+import {-# SOURCE #-} A
+
+nothing = return [] :: Q [Dec]
diff --git a/testsuite/tests/driver/T12062/Makefile b/testsuite/tests/driver/T12062/Makefile
new file mode 100644
index 0000000000..1c39d1c1fe
--- /dev/null
+++ b/testsuite/tests/driver/T12062/Makefile
@@ -0,0 +1,3 @@
+TOP=../../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
diff --git a/testsuite/tests/driver/T12062/T12062.hs b/testsuite/tests/driver/T12062/T12062.hs
new file mode 100644
index 0000000000..ed581c000a
--- /dev/null
+++ b/testsuite/tests/driver/T12062/T12062.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE TemplateHaskell #-}
+module T12062 where
+
+import C
+
+$(nothing)
diff --git a/testsuite/tests/driver/T12062/T12062.stderr b/testsuite/tests/driver/T12062/T12062.stderr
new file mode 100644
index 0000000000..8262940b08
--- /dev/null
+++ b/testsuite/tests/driver/T12062/T12062.stderr
@@ -0,0 +1,2 @@
+ghc-stage2: on the commandline: Syntax: -j[n] where n > 0
+Usage: For basic information, try the `--help' option.
diff --git a/testsuite/tests/driver/T12062/all.T b/testsuite/tests/driver/T12062/all.T
new file mode 100644
index 0000000000..1372ae3ea5
--- /dev/null
+++ b/testsuite/tests/driver/T12062/all.T
@@ -0,0 +1,2 @@
+test('T12062', extra_clean(['T12062.o','T12062.hi', 'A.hi', 'A.o', 'A.hi-boot', 'A.o-boot', 'C.hi', 'C.o']),
+ multimod_compile_fail, ['T12062', '-v0 -j0'])