Skip to content
Snippets Groups Projects
Commit af771148 authored by Cheng Shao's avatar Cheng Shao Committed by Marge Bot
Browse files

testsuite: fix optasm tests for wasm32

parent fe50eb35
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,10 @@ setTestOpts(
])
test('selfloop', [cmm_src], compile, ['-no-hs-main'])
test('cmm_sink_sp', [ only_ways(['optasm']), grep_errmsg(r'(\[Sp.*\]).*(=).*(\[.*R1.*\]).*;',[1,2,3]), cmm_src], compile, ['-no-hs-main -ddump-cmm -dsuppress-uniques -O'])
test('cmm_sink_sp', [ only_ways(['optasm']),
when(arch('wasm32'), fragile(24152)),
grep_errmsg(r'(\[Sp.*\]).*(=).*(\[.*R1.*\]).*;',[1,2,3]),
cmm_src], compile, ['-no-hs-main -ddump-cmm -dsuppress-uniques -O'])
test('T16930', normal, makefile_test, ['T16930'])
test('T17442', normal, compile, [''])
......
test('regalloc_unit_tests',
[ when(unregisterised(), skip), extra_files(['no_spills.cmm']),
when(not have_ncg(), skip),
# no regalloc business on wasm32
when(arch('wasm32'), expect_fail),
[ignore_stderr, only_ways(['normal'])], extra_run_opts('"' + config.libdir + '"') ],
compile_and_run,
['-package ghc'])
test('T5644', [extra_files(['Conf.hs', 'ManyQueue.hs', 'Util.hs', 'heap-overflow.hs']),
only_ways(['optasm','threaded1','threaded2']),
extra_run_opts('+RTS -M20m -RTS'),
exit_code(251) # RTS exit code for "out of memory"
exit_code(251), # RTS exit code for "out of memory"
when(arch('wasm32'), [ignore_stderr, exit_code(1)])
],
multimod_compile_and_run,
['heap-overflow.hs','-O'])
......@@ -44,6 +44,8 @@ test('derefnull',
when(opsys('mingw32'), [ignore_stderr, exit_code(11)]),
when(opsys('mingw32'), [fragile(18548)]),
when(arch('javascript'), [ignore_stderr, exit_code(1)]),
# On wasm32, 0x0 is a valid linear memory address
when(arch('wasm32'), [ignore_stdout, ignore_stderr, exit_code(0)]),
# ThreadSanitizer changes the output
when(have_thread_sanitizer(), skip),
# since these test are supposed to crash the
......@@ -82,6 +84,8 @@ test('divbyzero',
when(platform('x86_64-apple-darwin'), [ignore_stderr, exit_code(136)]),
# ThreadSanitizer changes the output
when(have_thread_sanitizer(), skip),
# wasmtime returns sigabrt error code upon wasm traps
when(arch('wasm32'), [ignore_stdout, ignore_stderr, exit_code(134)]),
# since these test are supposed to crash the
# profile report will be empty always.
# so disable the check for profiling
......
test('simplCore.oneShot', [extra_files(['OneShot1.hs', 'OneShot2.hs']),
test('simplCore-oneShot', [extra_files(['OneShot1.hs', 'OneShot2.hs']),
only_ways(['optasm'])], multimod_compile_and_run,
['OneShot2', '-v0'])
......@@ -19,7 +19,8 @@ test('simplrun007', normal, compile_and_run, [''])
test('simplrun008', normal, compile_and_run, [''])
test('simplrun009', normal, compile_and_run, [''])
test('simplrun010', [extra_run_opts('24 16 8 +RTS -M10m -RTS'),
exit_code(251)]
exit_code(251),
when(arch('wasm32'), [ignore_stderr, exit_code(1)])]
, compile_and_run, [''])
test('simplrun011', normal, compile_and_run, ['-fno-worker-wrapper'])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment