Commit 2d0540a6 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Stop CheckA and CheckB sharing a source file

Caused failures when run in parallel
parent 10d09ea8
......@@ -3,7 +3,7 @@
-- Since Safe we require base package be trusted to compile
module CheckB where
import CheckA
import CheckB_Aux
mainM :: Int -> Int
mainM n = trace "Allowed Leak" $ n * 2
......
[1 of 2] Compiling CheckA ( CheckA.hs, CheckA.o )
[1 of 2] Compiling CheckB_Aux ( CheckB_Aux.hs, CheckB_Aux.o )
[2 of 2] Compiling CheckB ( CheckB.hs, CheckB.o )
{-# LANGUAGE Trustworthy #-}
module CheckB_Aux (
trace
) where
import qualified Debug.Trace as D
import qualified Data.ByteString.Lazy.Char8 as BS
-- | Allowed declasification
trace :: String -> a -> a
trace s = D.trace $ s ++ show a3
a3 :: BS.ByteString
a3 = BS.take 3 $ BS.repeat 'a'
......@@ -5,7 +5,9 @@ def f( opts ):
setTestOpts(f)
test('CheckA', normal, compile, [''])
test('CheckB', normal, multimod_compile, ['CheckB', '-trust base'])
test('CheckB',
extra_clean(['CheckB_Aux.hi', 'CheckB_Aux.o']),
multimod_compile, ['CheckB', '-trust base'])
# fail as we don't trust base when compiling Check01
test('Check01', normal, multi_compile_fail, ['Check01', [
......
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