Commit d1df8d1c authored by Rufflewind's avatar Rufflewind Committed by Ben Gamari

Ensure each test inherits the TEST_HC_OPTS

This is so that global test flags that control the error formatting are
propagated correctly.  This patch is kind of related to: D2718

The stderr for API annotations is ignored entirely now per @alanz's
suggestion.

Test Plan: validate

Reviewers: thomie, alanz, austin, bgamari

Reviewed By: bgamari

Subscribers: alanz

Differential Revision: https://phabricator.haskell.org/D2808
parent ca593c7d
......@@ -31,7 +31,7 @@ prep:
prep.%:
cd $* && "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make -o setup Setup.hs
cd $* && ./setup configure $(CABAL_MINIMAL_BUILD) -v0 --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=../$(LOCAL_PKGCONF)
cd $* && ./setup configure $(CABAL_MINIMAL_BUILD) -v0 --with-compiler="$(TEST_HC)" --ghc-options="$(TEST_HC_OPTS)" --with-hc-pkg="$(GHC_PKG)" --package-db=../$(LOCAL_PKGCONF)
cd $* && ./setup build -v0
cd $* && ./setup register -v0 --inplace
Test10268.hs:5:6: error:
Variable not in scope: footemplate :: Language.Haskell.TH.Lib.ExpQ
Test10268.hs:7:14: error:
Not in scope: type constructor or class ‘Pattern’
Test10268.hs:10:10: error:
Not in scope: type constructor or class ‘Pattern’
Test10276.hs:10:3: error:
‘qqExp’ is not a (visible) method of class ‘QQExp’
Test10276.hs:11:29: error:
Not in scope: ‘M.empty’
No module named ‘M’ is imported.
In the Template Haskell quotation
[|| fst
$ runState
$$(qqExpM x) ((0, M.empty) :: (Int, M.Map L.Name [L.Operand])) ||]
Test10276.hs:11:46: error:
Not in scope: type constructor or class ‘M.Map’
No module named ‘M’ is imported.
In the Template Haskell quotation
[|| fst
$ runState
$$(qqExpM x) ((0, M.empty) :: (Int, M.Map L.Name [L.Operand])) ||]
Test10276.hs:11:52: error:
Not in scope: type constructor or class ‘L.Name’
No module named ‘L’ is imported.
In the Template Haskell quotation
[|| fst
$ runState
$$(qqExpM x) ((0, M.empty) :: (Int, M.Map L.Name [L.Operand])) ||]
Test10276.hs:11:60: error:
Not in scope: type constructor or class ‘L.Operand’
No module named ‘L’ is imported.
In the Template Haskell quotation
[|| fst
$ runState
$$(qqExpM x) ((0, M.empty) :: (Int, M.Map L.Name [L.Operand])) ||]
Test10276.hs:14:3: error:
‘qqExp’ is not a (visible) method of class ‘QQExp2’
Test10276.hs:15:29: error:
Not in scope: ‘M.empty’
No module named ‘M’ is imported.
In the Template Haskell quotation
[|| fst
$ runState
$$(qqExpM x) ((0, M.empty) :: (Int, M.Map L.Name [L.Operand])) ||]
Test10276.hs:15:46: error:
Not in scope: type constructor or class ‘M.Map’
No module named ‘M’ is imported.
In the Template Haskell quotation
[|| fst
$ runState
$$(qqExpM x) ((0, M.empty) :: (Int, M.Map L.Name [L.Operand])) ||]
Test10276.hs:15:52: error:
Not in scope: type constructor or class ‘L.Name’
No module named ‘L’ is imported.
In the Template Haskell quotation
[|| fst
$ runState
$$(qqExpM x) ((0, M.empty) :: (Int, M.Map L.Name [L.Operand])) ||]
Test10276.hs:15:60: error:
Not in scope: type constructor or class ‘L.Operand’
No module named ‘L’ is imported.
In the Template Haskell quotation
[|| fst
$ runState
$$(qqExpM x) ((0, M.empty) :: (Int, M.Map L.Name [L.Operand])) ||]
Test10278.hs:9:27: error:
Not in scope: type constructor or class ‘Tower’
Test10278.hs:9:39: error:
Not in scope: type constructor or class ‘Tower’
Test10278.hs:10:34: error:
Not in scope: type constructor or class ‘Tower’
Test10278.hs:10:46: error:
Not in scope: type constructor or class ‘Tower’
Test10280.hs:4:8: error:
Variable not in scope:
atomicModifyIORef :: t0 -> (a0 -> (t1, ())) -> t
Test10280.hs:4:26: error: Variable not in scope: ciTokens
Test10280.hs:4:44: error: Variable not in scope: f :: a0 -> t1
Test10312.hs:77:38: error: Not in scope: data constructor ‘Fixity’
Test10313.hs:9:13: error:
The deprecation for ‘solverCheckAndGetModel’
lacks an accompanying binding
Test10313.hs:15:16: error:
Multiple warning declarations for ‘Logic’
also at Test10313.hs:9:13-17
Test10313.hs:15:16: error:
The deprecation for ‘solverCheckAndGetModel’
lacks an accompanying binding
Test10313.hs:16:13: error:
Multiple warning declarations for ‘solverCheckAndGetModel’
also at Test10313.hs:10:13-34
Test10313.hs:30:15: error:
Not in scope: data constructor ‘Bitstream’
Test10313.hs:32:7: error:
Not in scope: ‘S.concatMap’
No module named ‘S’ is imported.
Test10313.hs:32:27: error:
Not in scope: ‘GV.stream’
No module named ‘GV’ is imported.
Test10313.hs:33:7: error:
Not in scope: ‘S.sized’
No module named ‘S’ is imported.
Test10354.hs:13:8: error:
Not in scope: type constructor or class ‘ForceError’
Test10357.hs:4:13: error: Variable not in scope: one
Test10357.hs:4:19: error: Variable not in scope: x
Test10357.hs:5:7: error:
Variable not in scope: multPoly :: t0 -> t2 -> t
Test10357.hs:6:10: error:
Variable not in scope: poly :: t1 -> [Double] -> t0
Test10357.hs:6:15: error:
• Data constructor not in scope: LE
• Perhaps you meant ‘LT’ (imported from Prelude)
Test10357.hs:7:10: error:
Variable not in scope: addPoly :: t3 -> t6 -> t2
Test10357.hs:7:19: error:
Variable not in scope: poly :: t5 -> [Double] -> t4
Test10357.hs:7:24: error:
• Data constructor not in scope: LE
• Perhaps you meant ‘LT’ (imported from Prelude)
Test10357.hs:7:43: error:
Variable not in scope: multPoly :: t4 -> t -> t3
Test10357.hs:8:19: error:
Variable not in scope: poly :: t8 -> [Double] -> t7
Test10357.hs:8:24: error:
• Data constructor not in scope: LE
• Perhaps you meant ‘LT’ (imported from Prelude)
Test10357.hs:8:43: error:
Variable not in scope: multPoly :: t7 -> t -> t6
Test10399.hs:10:27: error:
Not in scope: type constructor or class ‘MPISecret’
Test10399.hs:12:39: error:
Not in scope: ‘P.base’
No module named ‘P’ is imported.
Test10399.hs:12:50: error:
Not in scope: ‘P.pos’
No module named ‘P’ is imported.
Test10399.hs:12:60: error:
Not in scope: ‘P.form’
No module named ‘P’ is imported.
Test11018.hs:12:26: error:
Illegal kind signature: ‘* -> *’
Perhaps you intended to use KindSignatures
In the data type declaration for ‘Recorder’
Test11018.hs:14:23: error:
Not in scope: type constructor or class ‘FinalizerHandle’
Test11018.hs:17:6: error:
Not in scope: type constructor or class ‘Arrow’
Test11018.hs:20:7: error:
Not in scope: type constructor or class ‘Arrow’
Test11018.hs:23:6: error:
Not in scope: type constructor or class ‘ArrowApply’
Test11018.hs:26:7: error:
Not in scope: type constructor or class ‘ArrowApply’
Test11018.hs:37:27: error:
Illegal kind signature: ‘★ -> ★’
Perhaps you intended to use KindSignatures
In the data type declaration for ‘RecorderU’
Test11018.hs:39:23: error:
Not in scope: type constructor or class ‘FinalizerHandle’
Test11018.hs:42:7: error:
Not in scope: type constructor or class ‘Arrow’
Test11018.hs:45:8: error:
Not in scope: type constructor or class ‘Arrow’
Test11018.hs:48:7: error:
Not in scope: type constructor or class ‘ArrowApply’
Test11018.hs:51:8: error:
Not in scope: type constructor or class ‘ArrowApply’
Test11321.hs:12:15: error:
Not in scope: type constructor or class ‘Sing’
test('annotations', normal, run_command, ['$MAKE -s --no-print-directory annotations'])
test('parseTree', normal, run_command, ['$MAKE -s --no-print-directory parseTree'])
test('comments', normal, run_command, ['$MAKE -s --no-print-directory comments'])
test('exampleTest', normal, run_command, ['$MAKE -s --no-print-directory exampleTest'])
test('listcomps', normal, run_command, ['$MAKE -s --no-print-directory listcomps'])
test('T10255', normal, run_command, ['$MAKE -s --no-print-directory T10255'])
test('T10268', normal, run_command, ['$MAKE -s --no-print-directory T10268'])
test('T10269', normal, run_command, ['$MAKE -s --no-print-directory T10269'])
test('T10280', normal, run_command, ['$MAKE -s --no-print-directory T10280'])
test('T10312', normal, run_command, ['$MAKE -s --no-print-directory T10312'])
test('T10307', normal, run_command, ['$MAKE -s --no-print-directory T10307'])
test('T10309', normal, run_command, ['$MAKE -s --no-print-directory T10309'])
test('boolFormula', normal, run_command, ['$MAKE -s --no-print-directory boolFormula'])
test('T10357', normal, run_command, ['$MAKE -s --no-print-directory T10357'])
test('T10358', normal, run_command, ['$MAKE -s --no-print-directory T10358'])
test('T10278', normal, run_command, ['$MAKE -s --no-print-directory T10278'])
test('T10354', normal, run_command, ['$MAKE -s --no-print-directory T10354'])
test('T10396', normal, run_command, ['$MAKE -s --no-print-directory T10396'])
test('T10399', normal, run_command, ['$MAKE -s --no-print-directory T10399'])
test('T10313', normal, run_command, ['$MAKE -s --no-print-directory T10313'])
test('T11018', normal, run_command, ['$MAKE -s --no-print-directory T11018'])
test('bundle-export', normal, run_command, ['$MAKE -s --no-print-directory bundle-export'])
test('T10276', normal, run_command, ['$MAKE -s --no-print-directory T10276'])
test('T10598', normal, run_command, ['$MAKE -s --no-print-directory T10598'])
test('T11321', normal, run_command, ['$MAKE -s --no-print-directory T11321'])
test('T11332', normal, run_command, ['$MAKE -s --no-print-directory T11332'])
test('T11430', normal, run_command, ['$MAKE -s --no-print-directory T11430'])
test('load-main', normal, run_command, ['$MAKE -s --no-print-directory load-main'])
test('annotations', ignore_stderr, run_command, ['$MAKE -s --no-print-directory annotations'])
test('parseTree', ignore_stderr, run_command, ['$MAKE -s --no-print-directory parseTree'])
test('comments', ignore_stderr, run_command, ['$MAKE -s --no-print-directory comments'])
test('exampleTest', ignore_stderr, run_command, ['$MAKE -s --no-print-directory exampleTest'])
test('listcomps', ignore_stderr, run_command, ['$MAKE -s --no-print-directory listcomps'])
test('T10255', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10255'])
test('T10268', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10268'])
test('T10269', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10269'])
test('T10280', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10280'])
test('T10312', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10312'])
test('T10307', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10307'])
test('T10309', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10309'])
test('boolFormula', ignore_stderr, run_command, ['$MAKE -s --no-print-directory boolFormula'])
test('T10357', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10357'])
test('T10358', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10358'])
test('T10278', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10278'])
test('T10354', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10354'])
test('T10396', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10396'])
test('T10399', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10399'])
test('T10313', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10313'])
test('T11018', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T11018'])
test('bundle-export', ignore_stderr, run_command, ['$MAKE -s --no-print-directory bundle-export'])
test('T10276', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10276'])
test('T10598', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T10598'])
test('T11321', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T11321'])
test('T11332', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T11332'])
test('T11430', ignore_stderr, run_command, ['$MAKE -s --no-print-directory T11430'])
test('load-main', ignore_stderr, run_command, ['$MAKE -s --no-print-directory load-main'])
......@@ -7,5 +7,5 @@ clean:
apirecomp001: clean
'$(TEST_HC)' $(TEST_HC_OPTS) $(ghciWayFlags) --make -v0 -package ghc myghc.hs
./myghc "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`"
./myghc "`'$(TEST_HC)' $(TEST_HC_OPTS) --print-libdir | tr -d '\r'`" $(TEST_HC_OPTS)
B.hs:4:1: warning: [-Wmissing-signatures]
B.hs:4:1: warning: [-Wmissing-signatures (in -Wall)]
Top-level binding with no type signature:
answer_to_live_the_universe_and_everything :: Int
B.hs:5:13: warning: [-Wtype-defaults]
B.hs:5:13: warning: [-Wtype-defaults (in -Wall)]
• Defaulting the following constraints to type ‘Integer’
(Num a0) arising from the literal ‘1’ at B.hs:5:13
(Enum a0)
......@@ -12,14 +12,14 @@ B.hs:5:13: warning: [-Wtype-defaults]
In the first argument of ‘length’, namely ‘[1 .. 23 * 2]’
In the first argument of ‘(-)’, namely ‘length [1 .. 23 * 2]’
A.hs:7:1: warning: [-Wmissing-signatures]
A.hs:7:1: warning: [-Wmissing-signatures (in -Wall)]
Top-level binding with no type signature: main :: IO ()
B.hs:4:1: warning: [-Wmissing-signatures]
B.hs:4:1: warning: [-Wmissing-signatures (in -Wall)]
Top-level binding with no type signature:
answer_to_live_the_universe_and_everything :: Int
B.hs:5:13: warning: [-Wtype-defaults]
B.hs:5:13: warning: [-Wtype-defaults (in -Wall)]
• Defaulting the following constraints to type ‘Integer’
(Num a0) arising from the literal ‘1’ at B.hs:5:13
(Enum a0)
......@@ -28,5 +28,5 @@ B.hs:5:13: warning: [-Wtype-defaults]
In the first argument of ‘length’, namely ‘[1 .. 23 * 2]’
In the first argument of ‘(-)’, namely ‘length [1 .. 23 * 2]’
A.hs:7:1: warning: [-Wmissing-signatures]
A.hs:7:1: warning: [-Wmissing-signatures (in -Wall)]
Top-level binding with no type signature: main :: IO ()
......@@ -19,9 +19,11 @@ import Control.Monad
import System.IO
main = do
[libdir] <- getArgs
libdir : args <- getArgs
runGhc (Just libdir) $ do
dflags <- getSessionDynFlags
dflags0 <- getSessionDynFlags
(dflags, _, _) <- parseDynamicFlags dflags0
(map (mkGeneralLocated "on the commandline") args)
setSessionDynFlags $ dflags { hscTarget = HscNothing
, ghcLink = LinkInMemory
, verbosity = 0 -- silence please
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment