summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/driver')
-rw-r--r--testsuite/tests/driver/Makefile22
-rw-r--r--testsuite/tests/driver/T10869.hs9
-rw-r--r--testsuite/tests/driver/T10869A.hs7
-rw-r--r--testsuite/tests/driver/T10970.stdout2
-rw-r--r--testsuite/tests/driver/T12625.hs2
-rw-r--r--testsuite/tests/driver/T12625.stderr2
-rw-r--r--testsuite/tests/driver/T12674/-T12674.hs10
-rw-r--r--testsuite/tests/driver/T12674/-T12674c.c6
-rw-r--r--testsuite/tests/driver/T12674/T12674.stdout1
-rw-r--r--testsuite/tests/driver/T12674/T12674w.stdout1
-rw-r--r--testsuite/tests/driver/T12674/all.T5
-rw-r--r--testsuite/tests/driver/T13604.hs1
-rw-r--r--testsuite/tests/driver/T13604.stdout1
-rw-r--r--testsuite/tests/driver/T13604a.hs1
-rw-r--r--testsuite/tests/driver/T13604a.stdout1
-rw-r--r--testsuite/tests/driver/T13710/A.hs5
-rw-r--r--testsuite/tests/driver/T13710/A.hs-boot2
-rw-r--r--testsuite/tests/driver/T13710/B.hs3
-rw-r--r--testsuite/tests/driver/T13710/Makefile6
-rw-r--r--testsuite/tests/driver/T13710/T13710.stdout3
-rw-r--r--testsuite/tests/driver/T13710/all.T4
-rw-r--r--testsuite/tests/driver/T13914/T13914.stdout4
-rw-r--r--testsuite/tests/driver/T14075/F.hs1
-rw-r--r--testsuite/tests/driver/T14075/F.hs-boot6
-rw-r--r--testsuite/tests/driver/T14075/Makefile6
-rw-r--r--testsuite/tests/driver/T14075/O.hs3
-rw-r--r--testsuite/tests/driver/T14075/T14075.stderr7
-rw-r--r--testsuite/tests/driver/T14075/T14075.stdout3
-rw-r--r--testsuite/tests/driver/T14075/V.hs3
-rw-r--r--testsuite/tests/driver/T14075/V.hs-boot1
-rw-r--r--testsuite/tests/driver/T14075/all.T4
-rw-r--r--testsuite/tests/driver/T15396.hs8
-rw-r--r--testsuite/tests/driver/T15396.stdout1
-rw-r--r--testsuite/tests/driver/T3007/Makefile4
-rw-r--r--testsuite/tests/driver/T3007/all.T5
-rw-r--r--testsuite/tests/driver/T4437.hs5
-rw-r--r--testsuite/tests/driver/T8526/T8526.stdout4
-rw-r--r--testsuite/tests/driver/T9776.stderr2
-rw-r--r--testsuite/tests/driver/all.T19
-rw-r--r--testsuite/tests/driver/inline-check.hs12
-rw-r--r--testsuite/tests/driver/inline-check.stderr26
-rw-r--r--testsuite/tests/driver/json.stderr9
-rw-r--r--testsuite/tests/driver/json2.stderr10
-rw-r--r--testsuite/tests/driver/linkwhole/all.T6
-rw-r--r--testsuite/tests/driver/recomp015/all.T1
-rw-r--r--testsuite/tests/driver/retc001/all.T1
46 files changed, 210 insertions, 35 deletions
diff --git a/testsuite/tests/driver/Makefile b/testsuite/tests/driver/Makefile
index ffb924adb5..540f158b14 100644
--- a/testsuite/tests/driver/Makefile
+++ b/testsuite/tests/driver/Makefile
@@ -619,6 +619,14 @@ T10320:
"$(TEST_HC)" $(TEST_HC_OPTS) -v0 -fforce-recomp -ddump-to-file -ddump-rule-rewrites T10320.hs
[ -f T10320.dump-rule-rewrites ] && [ ! -s T10320.dump-rule-rewrites ]
+.PHONY: T10869
+T10869:
+ $(RM) -rf T10869.hi T10869.o T10869.hspp T10869
+ $(RM) -rf T10869A.hi T10869A.o T10869A.hspp
+ "$(TEST_HC)" $(TEST_HC_OPTS) -c -keep-hscpp-files T10869A.hs T10869.hs
+ test -f T10869.hscpp
+ test -f T10869A.hscpp
+
.PHONY: T12135
T12135:
$(RM) -rf T12135.o T12135.hi T12135 T12135a T12135b
@@ -637,6 +645,20 @@ T10923:
# should NOT output "compilation is NOT required"
"$(TEST_HC)" $(TEST_HC_OPTS) -v1 -O -c T10923.hs
+.PHONY: T13604
+T13604:
+ $(RM) -rf T13604.o T13604.hi
+ "$(TEST_HC)" $(TEST_HC_OPTS) -v1 -O0 -c T13604.hs
+ # SHOULD output "compilation is NOT required"
+ "$(TEST_HC)" $(TEST_HC_OPTS) -v1 -O -c -fignore-optim-changes T13604.hs
+
+.PHONY: T13604a
+T13604a:
+ $(RM) -rf T13604a.o T13604a.hi
+ "$(TEST_HC)" $(TEST_HC_OPTS) -v1 -O0 -c -fhpc T13604a.hs
+ # SHOULD output "compilation is NOT required"
+ "$(TEST_HC)" $(TEST_HC_OPTS) -v1 -O0 -c -fignore-hpc-changes T13604a.hs
+
.PHONY: T12955
T12955:
! "$(TEST_HC)" $(TEST_HC_OPTS) --make T12955
diff --git a/testsuite/tests/driver/T10869.hs b/testsuite/tests/driver/T10869.hs
new file mode 100644
index 0000000000..e1518544b2
--- /dev/null
+++ b/testsuite/tests/driver/T10869.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE CPP #-}
+
+module T10869 where
+import T10869A
+
+main :: IO()
+#if defined(__GLASGOW_HASKELL__)
+main = writeMsg
+#endif
diff --git a/testsuite/tests/driver/T10869A.hs b/testsuite/tests/driver/T10869A.hs
new file mode 100644
index 0000000000..14e57772c7
--- /dev/null
+++ b/testsuite/tests/driver/T10869A.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE CPP #-}
+module T10869A (writeMsg) where
+
+writeMsg :: IO ()
+#if defined(__GLASGOW_HASKELL__)
+writeMsg = putStrLn "Hello HSPP File"
+#endif
diff --git a/testsuite/tests/driver/T10970.stdout b/testsuite/tests/driver/T10970.stdout
index 96362170dd..bf26c89bd8 100644
--- a/testsuite/tests/driver/T10970.stdout
+++ b/testsuite/tests/driver/T10970.stdout
@@ -1,2 +1,2 @@
-0.5.10.2
+0.6.0.1
OK
diff --git a/testsuite/tests/driver/T12625.hs b/testsuite/tests/driver/T12625.hs
new file mode 100644
index 0000000000..b34b9142d7
--- /dev/null
+++ b/testsuite/tests/driver/T12625.hs
@@ -0,0 +1,2 @@
+main :: IO()
+main = putStrLn "T12625"
diff --git a/testsuite/tests/driver/T12625.stderr b/testsuite/tests/driver/T12625.stderr
new file mode 100644
index 0000000000..a171dbda90
--- /dev/null
+++ b/testsuite/tests/driver/T12625.stderr
@@ -0,0 +1,2 @@
+ghc: on the commandline: missing argument for flag: -I
+Usage: For basic information, try the `--help' option.
diff --git a/testsuite/tests/driver/T12674/-T12674.hs b/testsuite/tests/driver/T12674/-T12674.hs
new file mode 100644
index 0000000000..11a7c546bd
--- /dev/null
+++ b/testsuite/tests/driver/T12674/-T12674.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE ForeignFunctionInterface, CPP #-}
+import Foreign.C
+foreign import ccall unsafe "test" test :: CInt -> IO ()
+
+main :: IO ()
+-- Use conditional language to test passing a file with a filename
+-- starting with a hyphen to the preprocessor.
+#if defined(__GLASGOW_HASKELL__)
+main = test 3
+#endif
diff --git a/testsuite/tests/driver/T12674/-T12674c.c b/testsuite/tests/driver/T12674/-T12674c.c
new file mode 100644
index 0000000000..3b38c5879e
--- /dev/null
+++ b/testsuite/tests/driver/T12674/-T12674c.c
@@ -0,0 +1,6 @@
+#include <stdio.h>
+void test(int arg
+)
+{
+ printf("Result %i\n", arg );
+}
diff --git a/testsuite/tests/driver/T12674/T12674.stdout b/testsuite/tests/driver/T12674/T12674.stdout
new file mode 100644
index 0000000000..76239dd5cb
--- /dev/null
+++ b/testsuite/tests/driver/T12674/T12674.stdout
@@ -0,0 +1 @@
+Result 3
diff --git a/testsuite/tests/driver/T12674/T12674w.stdout b/testsuite/tests/driver/T12674/T12674w.stdout
new file mode 100644
index 0000000000..76239dd5cb
--- /dev/null
+++ b/testsuite/tests/driver/T12674/T12674w.stdout
@@ -0,0 +1 @@
+Result 3
diff --git a/testsuite/tests/driver/T12674/all.T b/testsuite/tests/driver/T12674/all.T
new file mode 100644
index 0000000000..0f9e205c9f
--- /dev/null
+++ b/testsuite/tests/driver/T12674/all.T
@@ -0,0 +1,5 @@
+test('T12674', [extra_files(['-T12674.hs', '-T12674c.c'])],
+ multi_compile, ['./-T12674.hs', [('././-T12674c.c', '')], '-v0'])
+test('T12674w', [extra_files(['-T12674.hs', '-T12674c.c']),
+ unless(opsys('mingw32'), skip)],
+ multi_compile, ['.\\\-T12674.hs', [('.\\\.\\\-T12674c.c', '')], '-v0'])
diff --git a/testsuite/tests/driver/T13604.hs b/testsuite/tests/driver/T13604.hs
new file mode 100644
index 0000000000..d98fb588ab
--- /dev/null
+++ b/testsuite/tests/driver/T13604.hs
@@ -0,0 +1 @@
+module T13604 where
diff --git a/testsuite/tests/driver/T13604.stdout b/testsuite/tests/driver/T13604.stdout
new file mode 100644
index 0000000000..ae02c1f7a8
--- /dev/null
+++ b/testsuite/tests/driver/T13604.stdout
@@ -0,0 +1 @@
+compilation IS NOT required
diff --git a/testsuite/tests/driver/T13604a.hs b/testsuite/tests/driver/T13604a.hs
new file mode 100644
index 0000000000..ea79324743
--- /dev/null
+++ b/testsuite/tests/driver/T13604a.hs
@@ -0,0 +1 @@
+module T13604a where
diff --git a/testsuite/tests/driver/T13604a.stdout b/testsuite/tests/driver/T13604a.stdout
new file mode 100644
index 0000000000..ae02c1f7a8
--- /dev/null
+++ b/testsuite/tests/driver/T13604a.stdout
@@ -0,0 +1 @@
+compilation IS NOT required
diff --git a/testsuite/tests/driver/T13710/A.hs b/testsuite/tests/driver/T13710/A.hs
new file mode 100644
index 0000000000..5181945eeb
--- /dev/null
+++ b/testsuite/tests/driver/T13710/A.hs
@@ -0,0 +1,5 @@
+{-# LANGUAGE RecordWildCards #-}
+module A where
+import B
+data E = MkE
+p (H{..}) = ()
diff --git a/testsuite/tests/driver/T13710/A.hs-boot b/testsuite/tests/driver/T13710/A.hs-boot
new file mode 100644
index 0000000000..94a2f5e306
--- /dev/null
+++ b/testsuite/tests/driver/T13710/A.hs-boot
@@ -0,0 +1,2 @@
+module A ( E ) where
+data E
diff --git a/testsuite/tests/driver/T13710/B.hs b/testsuite/tests/driver/T13710/B.hs
new file mode 100644
index 0000000000..87c93a9f39
--- /dev/null
+++ b/testsuite/tests/driver/T13710/B.hs
@@ -0,0 +1,3 @@
+module B where
+import {-# SOURCE #-} A
+data H = H { h :: E }
diff --git a/testsuite/tests/driver/T13710/Makefile b/testsuite/tests/driver/T13710/Makefile
new file mode 100644
index 0000000000..d582f94af5
--- /dev/null
+++ b/testsuite/tests/driver/T13710/Makefile
@@ -0,0 +1,6 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+T13710:
+ '$(TEST_HC)' $(TEST_HC_OPTS) --make B.hs
diff --git a/testsuite/tests/driver/T13710/T13710.stdout b/testsuite/tests/driver/T13710/T13710.stdout
new file mode 100644
index 0000000000..2d729289db
--- /dev/null
+++ b/testsuite/tests/driver/T13710/T13710.stdout
@@ -0,0 +1,3 @@
+[1 of 3] Compiling A[boot] ( A.hs-boot, A.o-boot )
+[2 of 3] Compiling B ( B.hs, B.o )
+[3 of 3] Compiling A ( A.hs, A.o )
diff --git a/testsuite/tests/driver/T13710/all.T b/testsuite/tests/driver/T13710/all.T
new file mode 100644
index 0000000000..64daacc96b
--- /dev/null
+++ b/testsuite/tests/driver/T13710/all.T
@@ -0,0 +1,4 @@
+test('T13710',
+ [extra_files(['A.hs', 'A.hs-boot', 'B.hs'])],
+ run_command,
+ ['$MAKE -s --no-print-directory T13710'])
diff --git a/testsuite/tests/driver/T13914/T13914.stdout b/testsuite/tests/driver/T13914/T13914.stdout
index 04d14aa293..d443ed47b9 100644
--- a/testsuite/tests/driver/T13914/T13914.stdout
+++ b/testsuite/tests/driver/T13914/T13914.stdout
@@ -5,11 +5,11 @@ main: Assertion failed
CallStack (from HasCallStack):
assert, called at main.hs:3:8 in main:Main
With -fignore-asserts
-[1 of 1] Compiling Main ( main.hs, main.o ) [flags changed]
+[1 of 1] Compiling Main ( main.hs, main.o ) [Optimisation flags changed]
Linking main ...
OK
Without -fignore-asserts
-[1 of 1] Compiling Main ( main.hs, main.o ) [flags changed]
+[1 of 1] Compiling Main ( main.hs, main.o ) [Optimisation flags changed]
Linking main ...
main: Assertion failed
CallStack (from HasCallStack):
diff --git a/testsuite/tests/driver/T14075/F.hs b/testsuite/tests/driver/T14075/F.hs
new file mode 100644
index 0000000000..3e32036eb4
--- /dev/null
+++ b/testsuite/tests/driver/T14075/F.hs
@@ -0,0 +1 @@
+module F () where
diff --git a/testsuite/tests/driver/T14075/F.hs-boot b/testsuite/tests/driver/T14075/F.hs-boot
new file mode 100644
index 0000000000..41008d554f
--- /dev/null
+++ b/testsuite/tests/driver/T14075/F.hs-boot
@@ -0,0 +1,6 @@
+module F where
+
+import O (O)
+
+newtype F = F ()
+instance O F where
diff --git a/testsuite/tests/driver/T14075/Makefile b/testsuite/tests/driver/T14075/Makefile
new file mode 100644
index 0000000000..505274a181
--- /dev/null
+++ b/testsuite/tests/driver/T14075/Makefile
@@ -0,0 +1,6 @@
+TOP=../../..
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/test.mk
+
+T14075:
+ ! '$(TEST_HC)' $(TEST_HC_OPTS) -j2 F O V
diff --git a/testsuite/tests/driver/T14075/O.hs b/testsuite/tests/driver/T14075/O.hs
new file mode 100644
index 0000000000..2cbb8bb0ef
--- /dev/null
+++ b/testsuite/tests/driver/T14075/O.hs
@@ -0,0 +1,3 @@
+module O (O) where
+
+class O a where
diff --git a/testsuite/tests/driver/T14075/T14075.stderr b/testsuite/tests/driver/T14075/T14075.stderr
new file mode 100644
index 0000000000..0493a96f12
--- /dev/null
+++ b/testsuite/tests/driver/T14075/T14075.stderr
@@ -0,0 +1,7 @@
+
+F.hs:1:1: error:
+ instance O.O F.F -- Defined at F.hs-boot:6:10
+ is defined in the hs-boot file, but not in the module itself
+
+F.hs-boot:5:1: error:
+ ‘F.F’ is exported by the hs-boot file, but not exported by the module
diff --git a/testsuite/tests/driver/T14075/T14075.stdout b/testsuite/tests/driver/T14075/T14075.stdout
new file mode 100644
index 0000000000..18f17be1ee
--- /dev/null
+++ b/testsuite/tests/driver/T14075/T14075.stdout
@@ -0,0 +1,3 @@
+[1 of 4] Compiling O ( O.hs, O.o )
+[2 of 4] Compiling F[boot] ( F.hs-boot, F.o-boot )
+[3 of 4] Compiling F ( F.hs, F.o )
diff --git a/testsuite/tests/driver/T14075/V.hs b/testsuite/tests/driver/T14075/V.hs
new file mode 100644
index 0000000000..cf06b93dcc
--- /dev/null
+++ b/testsuite/tests/driver/T14075/V.hs
@@ -0,0 +1,3 @@
+module V () where
+
+import {-# SOURCE #-} F ()
diff --git a/testsuite/tests/driver/T14075/V.hs-boot b/testsuite/tests/driver/T14075/V.hs-boot
new file mode 100644
index 0000000000..ec64e228fc
--- /dev/null
+++ b/testsuite/tests/driver/T14075/V.hs-boot
@@ -0,0 +1 @@
+module V where
diff --git a/testsuite/tests/driver/T14075/all.T b/testsuite/tests/driver/T14075/all.T
new file mode 100644
index 0000000000..646976a5b2
--- /dev/null
+++ b/testsuite/tests/driver/T14075/all.T
@@ -0,0 +1,4 @@
+test('T14075',
+ [extra_files(['F.hs', 'F.hs-boot', 'O.hs', 'V.hs', 'V.hs-boot'])],
+ run_command,
+ ['$MAKE -s --no-print-directory T14075'])
diff --git a/testsuite/tests/driver/T15396.hs b/testsuite/tests/driver/T15396.hs
new file mode 100644
index 0000000000..9ab9f6e6e6
--- /dev/null
+++ b/testsuite/tests/driver/T15396.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE OverloadedStrings #-}
+import Ar
+
+-- obtained from echo -n \0 > x.o && ar -q b.a x.o && cat b.a
+archive = "!<arch>\nx.o/ 0 0 0 644 1 \
+\`\n0\nx.o/ 0 0 0 644 1 `\n0\n"
+
+main = print (parseAr archive)
diff --git a/testsuite/tests/driver/T15396.stdout b/testsuite/tests/driver/T15396.stdout
new file mode 100644
index 0000000000..65edafad23
--- /dev/null
+++ b/testsuite/tests/driver/T15396.stdout
@@ -0,0 +1 @@
+Archive [ArchiveEntry {filename = "x.o", filetime = 0, fileown = 0, filegrp = 0, filemode = 644, filesize = 1, filedata = "0"},ArchiveEntry {filename = "x.o", filetime = 0, fileown = 0, filegrp = 0, filemode = 644, filesize = 1, filedata = "0"}]
diff --git a/testsuite/tests/driver/T3007/Makefile b/testsuite/tests/driver/T3007/Makefile
index 09db27a38f..52b3331af1 100644
--- a/testsuite/tests/driver/T3007/Makefile
+++ b/testsuite/tests/driver/T3007/Makefile
@@ -11,11 +11,11 @@ clean:
T3007:
$(MAKE) -s --no-print-directory clean
'$(GHC_PKG)' init package.conf
- cd A && '$(TEST_HC)' -v0 --make Setup
+ cd A && '$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make Setup
cd A && ./Setup configure -v0 --with-compiler='$(TEST_HC)' --ghc-pkg-option=--global-package-db=../package.conf --ghc-option=-package-db../package.conf
cd A && ./Setup build -v0
cd A && ./Setup register --inplace -v0
- cd B && '$(TEST_HC)' -v0 --make Setup
+ cd B && '$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make Setup
cd B && ./Setup configure -v0 --with-compiler='$(TEST_HC)' --ghc-pkg-option=--global-package-db=../package.conf --ghc-option=-package-db../package.conf
cd B && ./Setup build -v0
diff --git a/testsuite/tests/driver/T3007/all.T b/testsuite/tests/driver/T3007/all.T
index bd9046cdd8..803357ba02 100644
--- a/testsuite/tests/driver/T3007/all.T
+++ b/testsuite/tests/driver/T3007/all.T
@@ -1 +1,4 @@
-test('T3007', [extra_files(['A/', 'B/'])], run_command, ['$MAKE -s --no-print-directory T3007'])
+test('T3007',
+ extra_files(['A/', 'B/']),
+ run_command,
+ ['$MAKE -s --no-print-directory T3007'])
diff --git a/testsuite/tests/driver/T4437.hs b/testsuite/tests/driver/T4437.hs
index 3ae39d1ca2..2818851444 100644
--- a/testsuite/tests/driver/T4437.hs
+++ b/testsuite/tests/driver/T4437.hs
@@ -39,8 +39,9 @@ expectedGhcOnlyExtensions :: [String]
expectedGhcOnlyExtensions = ["RelaxedLayout",
"AlternativeLayoutRule",
"AlternativeLayoutRuleTransitional",
- "UnboxedSums",
- "DerivingStrategies"]
+ "DerivingVia",
+ "EmptyDataDeriving",
+ "GeneralisedNewtypeDeriving"]
expectedCabalOnlyExtensions :: [String]
expectedCabalOnlyExtensions = ["Generics",
diff --git a/testsuite/tests/driver/T8526/T8526.stdout b/testsuite/tests/driver/T8526/T8526.stdout
index 83b8f9593d..0255fa3b85 100644
--- a/testsuite/tests/driver/T8526/T8526.stdout
+++ b/testsuite/tests/driver/T8526/T8526.stdout
@@ -1,6 +1,6 @@
[1 of 1] Compiling A ( A.hs, interpreted )
-Ok, 1 module loaded.
+Ok, one module loaded.
True
[1 of 1] Compiling A ( A.hs, interpreted )
-Ok, 1 module loaded.
+Ok, one module loaded.
False
diff --git a/testsuite/tests/driver/T9776.stderr b/testsuite/tests/driver/T9776.stderr
index 328a105e61..0281a2d0c4 100644
--- a/testsuite/tests/driver/T9776.stderr
+++ b/testsuite/tests/driver/T9776.stderr
@@ -1,2 +1,2 @@
-ghc-stage2: on the commandline: missing argument for flag: -frule-check
+ghc-stage2: on the commandline: missing argument for flag: -drule-check
Usage: For basic information, try the `--help' option.
diff --git a/testsuite/tests/driver/all.T b/testsuite/tests/driver/all.T
index 19dcc0a950..be91a261d8 100644
--- a/testsuite/tests/driver/all.T
+++ b/testsuite/tests/driver/all.T
@@ -172,8 +172,8 @@ fobject_code = when(doing_ghci(), extra_hc_opts('-fobject-code'))
test( 'T4114a', fobject_code, compile_and_run, ['-cpp'])
test( 'T4114b', fobject_code, compile_and_run, ['-no-keep-hi-files'])
-test( 'T4114c', fobject_code, compile_and_run, ['-no-keep-o-files'])
-test( 'T4114d', fobject_code, compile_and_run,
+test( 'T4114c', [fobject_code, expect_broken_for(4114, ['ghci'])], compile_and_run, ['-no-keep-o-files'])
+test( 'T4114d', [fobject_code, expect_broken_for(4114, ['ghci'])], compile_and_run,
['-hisuf .myhi -osuf .myo -no-keep-o-files'])
test('T5584', [], run_command, ['$MAKE -s --no-print-directory T5584'])
@@ -214,7 +214,7 @@ test('write_interface_oneshot', [extra_files(['A011.hs'])], run_command,
test('write_interface_make', [extra_files(['A011.hs'])], run_command,
['$MAKE -s --no-print-directory write_interface_make'])
-test('T9776', normal, compile_fail, ['-frule-check'])
+test('T9776', normal, compile_fail, ['-drule-check'])
test('T9938', [], run_command, ['$MAKE -s --no-print-directory T9938'])
@@ -234,6 +234,8 @@ test('T10220', normal, run_command,
test('T10182', [], run_command, ['$MAKE -s --no-print-directory T10182'])
+test('T10869', [], run_command, ['$MAKE -s --no-print-directory T10869'])
+
test('T365',
[pre_cmd('touch test_preprocessor.txt'), unless(opsys('mingw32'), skip)],
compile_fail, [''])
@@ -264,6 +266,8 @@ test('T12192', normal, run_command, ['mkdir foo && (cd foo && {compiler} -v0 ../
test('T10923', [], run_command, ['$MAKE -s --no-print-directory T10923'])
+test('T12625', normal, compile_fail, ['-I'])
+
test('T12752pass', normal, compile, ['-DSHOULD_PASS=1 -Wcpp-undef'])
test('T12955', normal, run_command, ['$MAKE -s --no-print-directory T12955'])
@@ -271,3 +275,12 @@ test('T12955', normal, run_command, ['$MAKE -s --no-print-directory T12955'])
test('T12971', ignore_stdout, run_command, ['$MAKE -s --no-print-directory T12971'])
test('json', normal, compile_fail, ['-ddump-json'])
test('json2', normal, compile, ['-ddump-types -ddump-json'])
+test('T13604', [], run_command, ['$MAKE -s --no-print-directory T13604'])
+test('T13604a', [], run_command, ['$MAKE -s --no-print-directory T13604a'])
+# omitting hpc and profasm because they affect the
+# inlining and unfoldings
+test('inline-check', omit_ways(['hpc', 'profasm'])
+ , compile
+ , ['-dinline-check foo -O -ddebug-output'])
+
+test('T15396', normal, compile_and_run, ['-package ghc'])
diff --git a/testsuite/tests/driver/inline-check.hs b/testsuite/tests/driver/inline-check.hs
new file mode 100644
index 0000000000..83112e1226
--- /dev/null
+++ b/testsuite/tests/driver/inline-check.hs
@@ -0,0 +1,12 @@
+module InlineCheck where
+
+foo = (+1)
+
+foo1 = (+1)
+{-# NOINLINE foo1 #-}
+
+qux = foo 3
+
+qux1 = foo1 3
+
+too = qux
diff --git a/testsuite/tests/driver/inline-check.stderr b/testsuite/tests/driver/inline-check.stderr
new file mode 100644
index 0000000000..5bf9edaf24
--- /dev/null
+++ b/testsuite/tests/driver/inline-check.stderr
@@ -0,0 +1,26 @@
+Considering inlining: foo
+ arg infos [ValueArg]
+ interesting continuation RhsCtxt
+ some_benefit True
+ is exp: True
+ is work-free: True
+ guidance IF_ARGS [0] 30 0
+ discounted size = 10
+ ANSWER = YES
+Inactive unfolding: foo1
+Inactive unfolding: foo1
+Inactive unfolding: foo1
+Inactive unfolding: foo1
+Inactive unfolding: foo1
+Inactive unfolding: foo1
+Inactive unfolding: foo1
+Inactive unfolding: foo1
+Considering inlining: foo
+ arg infos []
+ interesting continuation RhsCtxt
+ some_benefit False
+ is exp: True
+ is work-free: True
+ guidance ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
+ ANSWER = NO
+Inactive unfolding: foo1
diff --git a/testsuite/tests/driver/json.stderr b/testsuite/tests/driver/json.stderr
index ff3915a654..61a55e09d0 100644
--- a/testsuite/tests/driver/json.stderr
+++ b/testsuite/tests/driver/json.stderr
@@ -1,8 +1 @@
-
-json.hs:6:7: error:
- • No instance for (Num (a -> a)) arising from the literal ‘5’
- (maybe you haven't applied a function to enough arguments?)
- • In the expression: 5
- In an equation for ‘id1’: id1 = 5
-[
- {"span": {"file": "json.hs","startLine": 6,"startCol": 7,"endLine": 6,"endCol": 8},"doc": "\u2022 No instance for (Num (a -> a)) arising from the literal \u20185\u2019\n (maybe you haven't applied a function to enough arguments?)\n\u2022 In the expression: 5\n In an equation for \u2018id1\u2019: id1 = 5","severity": "SevError","reason": null}]
+{"span": {"file": "json.hs","startLine": 6,"startCol": 7,"endLine": 6,"endCol": 8},"doc": "\u2022 No instance for (Num (a -> a)) arising from the literal \u20185\u2019\n (maybe you haven't applied a function to enough arguments?)\n\u2022 In the expression: 5\n In an equation for \u2018id1\u2019: id1 = 5","severity": "SevError","reason": null}
diff --git a/testsuite/tests/driver/json2.stderr b/testsuite/tests/driver/json2.stderr
index f511d97b57..bf7f80a579 100644
--- a/testsuite/tests/driver/json2.stderr
+++ b/testsuite/tests/driver/json2.stderr
@@ -1,9 +1 @@
-TYPE SIGNATURES
- foo :: forall a. a -> a
-TYPE CONSTRUCTORS
-COERCION AXIOMS
-Dependent modules: []
-Dependent packages: [base-4.10.0.0, ghc-prim-0.5.1.0,
- integer-gmp-1.0.0.1]
-[
- {"span": null,"doc": "TYPE SIGNATURES\n foo :: forall a. a -> a\nTYPE CONSTRUCTORS\nCOERCION AXIOMS\nDependent modules: []\nDependent packages: [base-4.10.0.0, ghc-prim-0.5.1.0,\n integer-gmp-1.0.0.1]","severity": "SevOutput","reason": null}]
+{"span": null,"doc": "TYPE SIGNATURES\n foo :: forall a. a -> a\nTYPE CONSTRUCTORS\nCOERCION AXIOMS\nDependent modules: []\nDependent packages: [base-4.12.0.0, ghc-prim-0.5.3,\n integer-gmp-1.0.2.0]","severity": "SevOutput","reason": null}
diff --git a/testsuite/tests/driver/linkwhole/all.T b/testsuite/tests/driver/linkwhole/all.T
index 294a87934a..1562aa82c6 100644
--- a/testsuite/tests/driver/linkwhole/all.T
+++ b/testsuite/tests/driver/linkwhole/all.T
@@ -1,3 +1,5 @@
-test('linkwhole', [extra_files(['Types.hs','Main.hs','MyCode.hs','Handles.hs']),
- when(opsys('mingw32'), skip)],
+test('linkwhole',
+ [extra_files(['Types.hs','Main.hs','MyCode.hs','Handles.hs']),
+ when(arch('powerpc64') or arch('powerpc64le'), expect_broken(11259)),
+ when(opsys('mingw32'), skip)],
run_command, ['$MAKE -s --no-print-directory linkwhole'])
diff --git a/testsuite/tests/driver/recomp015/all.T b/testsuite/tests/driver/recomp015/all.T
index e0b77f3cce..9399534c4e 100644
--- a/testsuite/tests/driver/recomp015/all.T
+++ b/testsuite/tests/driver/recomp015/all.T
@@ -2,7 +2,6 @@
test('recomp015',
[extra_files(['Generate.hs']),
- clean_cmd('$MAKE -s clean'),
# See ticket:11022#comment:7
unless(opsys('linux') or opsys('solaris2') or opsys('openbsd'), skip),
when(arch('arm'), skip),
diff --git a/testsuite/tests/driver/retc001/all.T b/testsuite/tests/driver/retc001/all.T
index 3f15ed1654..a5b0c827e1 100644
--- a/testsuite/tests/driver/retc001/all.T
+++ b/testsuite/tests/driver/retc001/all.T
@@ -1,6 +1,5 @@
test('retc001',
[extra_files(['A.hs', 'B1.hs', 'B2.hs', 'C.hs']),
- clean_cmd('$MAKE -s clean'),
# See issue 11204, this test sometimes passes and sometimes fails on OSX
when(opsys('darwin'), skip)],
run_command,