Commit 7f6a5a68 authored by Simon Marlow's avatar Simon Marlow
Browse files

test for #5313

parent d7b647a4
import qualified GHC
import System.Environment
main = do
(libdir:_) <- getArgs
GHC.runGhcT (Just libdir) $ do
-- begin initialize
df0 <- GHC.getSessionDynFlags
let df1 = df0{GHC.ghcMode = GHC.CompManager,
GHC.hscTarget = GHC.HscInterpreted,
GHC.ghcLink = GHC.LinkInMemory,
GHC.verbosity = 0}
_ <- GHC.setSessionDynFlags df1
-- begin reset
GHC.setContext [] []
GHC.setTargets []
_ <- GHC.load GHC.LoadAllTargets
return ()
...@@ -301,6 +301,14 @@ test('dynHelloWorld', ...@@ -301,6 +301,14 @@ test('dynHelloWorld',
compile_and_run, compile_and_run,
['']) [''])
# simple test that we can load and use the GHC package in all ways
# (in #5313 it was failing the dyn way)
p = subprocess.Popen([config.compiler, "--print-libdir"], stdout=subprocess.PIPE)
libdir = p.stdout.read()
p.stdout.close
test('5313', extra_run_opts(libdir), compile_and_run, ['-package ghc'])
test('2464', normal, compile, ['']) test('2464', normal, compile, [''])
test('3674', ignore_output, run_command, test('3674', ignore_output, run_command,
['$MAKE -s --no-print-directory 3674']) ['$MAKE -s --no-print-directory 3674'])
......
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