Commit 7d5a8453 authored by Sergei Trofimovich's avatar Sergei Trofimovich

should_run/allocLimit4: disable ghci way

Test sets allocation limit for a current main thread,
ghci already loaded a bunch of stuff in it.
Signed-off-by: default avatarSergei Trofimovich <siarheit@google.com>
parent 440d1bc1
......@@ -99,7 +99,9 @@ test('allocLimit2', normal, compile_and_run, [''])
test('allocLimit3', [ when(opsys('mingw32'), only_ways(threaded_ways)),
exit_code(1) ], compile_and_run, [''])
test('allocLimit4', [ extra_run_opts('+RTS -xq300k -RTS') ],
test('allocLimit4', [ extra_run_opts('+RTS -xq300k -RTS'),
# ghci consumes part of set limit at startup
omit_ways(['ghci']) ],
compile_and_run, [''])
# -----------------------------------------------------------------------------
......
......@@ -8,6 +8,7 @@ import Control.Monad
-- check that +RTS -xq is doing the right thing: the test requires
-- +RTS -xq300k
-- Test does not work in GHCi as it load A Lot Of Things at start
main = do
m <- newEmptyMVar
......@@ -19,7 +20,7 @@ main = do
case e of
Left AllocationLimitExceeded{} -> do
c <- getAllocationCounter
when (c < 250*1024 || c > 350*1024) $ fail "wrong limit grace"
when (c < 250*1024 || c > 350*1024) $ fail $ "wrong limit grace: " ++ show c
print (length [2..])
Right _ ->
fail "didn't catch AllocationLimitExceeded"
......
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