Commit 9db2e905 authored by Stefan Schulze Frielinghaus's avatar Stefan Schulze Frielinghaus Committed by Marge Bot

Testsuite: Introduce req_rts_linker

Some tests depend on the RTS linker. Introduce a modifier to skip such
tests, in case the RTS linker is not available.
parent a3ce52fd
Pipeline #12409 failed with stages
in 294 minutes and 42 seconds
......@@ -192,6 +192,10 @@ def req_interp( name, opts ):
if not config.have_interp:
opts.expect = 'fail'
def req_rts_linker( name, opts ):
if not config.have_RTS_linker:
opts.expect = 'fail'
def req_th( name, opts ):
"""
Mark a test as requiring TemplateHaskell. In addition to having interpreter
......
......@@ -130,8 +130,7 @@ test('dynHelloWorld',
[''])
test('T5313',
[ unless(config.have_RTS_linker, skip),
extra_run_opts('"' + config.libdir + '"')],
[ req_rts_linker, extra_run_opts('"' + config.libdir + '"')],
compile_and_run,
['-package ghc'])
......
test('linkwhole',
[extra_files(['Types.hs','Main.hs','MyCode.hs','Handles.hs']),
unless(config.have_RTS_linker, skip),
req_rts_linker,
when(opsys('freebsd'), expect_broken(16035)),
when(opsys('mingw32'), skip)],
makefile_test, [])
test('T10052', [unless(config.have_RTS_linker, skip),
req_interp],
test('T10052', [req_rts_linker, req_interp],
makefile_test, ['T10052'])
test('ghcApi', normal, compile_and_run, ['-package ghc'])
test('T6145', normal, makefile_test, ['T6145'])
test('T8639_api', unless (config.have_RTS_linker, skip),
test('T8639_api', req_rts_linker,
makefile_test, ['T8639_api'])
test('T8628', unless(config.have_RTS_linker, skip),
test('T8628', req_rts_linker,
makefile_test, ['T8628'])
test('T9595', extra_run_opts('"' + config.libdir + '"'),
compile_and_run,
['-package ghc'])
test('T10508_api', [ extra_run_opts('"' + config.libdir + '"'),
unless(config.have_RTS_linker, skip)],
req_rts_linker ],
compile_and_run,
['-package ghc'])
test('T10942', extra_run_opts('"' + config.libdir + '"'),
......
test('dynCompileExpr',
[ extra_run_opts('"' + config.libdir + '"'),
when(opsys('mingw32'), expect_broken_for(5987, ['dyn'])),
unless(config.have_RTS_linker, skip),
omit_ways(prof_ways) ], # cannot run interpreted code with -prof
req_rts_linker, omit_ways(prof_ways) ], # cannot run interpreted code with -prof
compile_and_run, ['-package ghc'])
test('T16392',
[extra_files(['A.hs']),
when(config.have_ext_interp, extra_ways(['ghci-ext']))],
extra_ways(['ghci-ext']),
req_rts_linker],
ghci_script, ['T16392.script'])
......@@ -15,7 +15,7 @@ test('ghcilink003', [unless(doing_ghci, skip)], makefile_test, ['ghcilink003'])
test('ghcilink004',
[extra_files(['TestLink.hs', 'f.c']),
unless(doing_ghci, skip),
unless(config.have_RTS_linker, skip)],
req_rts_linker],
makefile_test, ['ghcilink004'])
test('ghcilink005',
......
......@@ -47,6 +47,7 @@ test('big-obj', [extra_files(['big-obj-c.c', 'big-obj.hs']),
test('T3372',
[unless(doing_ghci, skip),
req_rts_linker,
extra_run_opts('"' + config.libdir + '"'),
unless(config.have_RTS_linker, skip),
# Concurrent GHC sessions is fragile on Windows since we must lock the
......
test('prog001',
[extra_files(['../shell.hs', 'A.hs', 'B.hs', 'C1.hs', 'D1.hs', 'D2.hs']),
cmd_prefix('ghciWayFlags=' + config.ghci_way_flags),
unless(opsys('mingw32') or (not config.have_ext_interp), extra_ways(['ghci-ext']))],
req_rts_linker,
unless(opsys('mingw32'), extra_ways(['ghci-ext']))],
ghci_script, ['prog001.script'])
......@@ -10,12 +10,12 @@
test('ghci001', combined_output, ghci_script, ['ghci001.script'])
test('ghci002', combined_output, ghci_script, ['ghci002.script'])
test('ghci003', combined_output, ghci_script, ['ghci003.script'])
test('ghci004', [ combined_output,
unless(opsys('mingw32') or (not config.have_ext_interp),extra_ways(['ghci-ext'])) ],
test('ghci004', [ combined_output, req_rts_linker,
unless(opsys('mingw32'),extra_ways(['ghci-ext'])) ],
ghci_script, ['ghci004.script'])
test('ghci005', combined_output, ghci_script, ['ghci005.script'])
test('ghci006', [ combined_output,
unless(opsys('mingw32') or (not config.have_ext_interp),extra_ways(['ghci-ext'])) ],
test('ghci006', [ combined_output, req_rts_linker,
unless(opsys('mingw32'),extra_ways(['ghci-ext'])) ],
ghci_script, ['ghci006.script'])
test('ghci007', combined_output, ghci_script, ['ghci007.script'])
test('ghci008', [ combined_output,
......
......@@ -24,7 +24,7 @@ test('Ppr023', ignore_stderr, makefile_test, ['ppr023'])
test('Ppr024', ignore_stderr, makefile_test, ['ppr024'])
test('Ppr025', ignore_stderr, makefile_test, ['ppr025'])
test('Ppr026', ignore_stderr, makefile_test, ['ppr026'])
test('Ppr027', ignore_stderr, makefile_test, ['ppr027'])
test('Ppr027', [ignore_stderr, req_rts_linker], makefile_test, ['ppr027'])
test('Ppr028', ignore_stderr, makefile_test, ['ppr028'])
test('Ppr029', ignore_stderr, makefile_test, ['ppr029'])
test('Ppr030', ignore_stderr, makefile_test, ['ppr030'])
......@@ -37,22 +37,22 @@ test('Ppr036', ignore_stderr, makefile_test, ['ppr036'])
test('Ppr037', ignore_stderr, makefile_test, ['ppr037'])
test('Ppr038', ignore_stderr, makefile_test, ['ppr038'])
test('Ppr039', ignore_stderr, makefile_test, ['ppr039'])
test('Ppr040', ignore_stderr, makefile_test, ['ppr040'])
test('Ppr040', [ignore_stderr, req_rts_linker], makefile_test, ['ppr040'])
test('Ppr041', ignore_stderr, makefile_test, ['ppr041'])
test('Ppr042', ignore_stderr, makefile_test, ['ppr042'])
test('Ppr043', ignore_stderr, makefile_test, ['ppr043'])
test('Ppr043', [ignore_stderr, req_rts_linker], makefile_test, ['ppr043'])
test('Ppr044', ignore_stderr, makefile_test, ['ppr044'])
test('Ppr045', ignore_stderr, makefile_test, ['ppr045'])
test('Ppr046', ignore_stderr, makefile_test, ['ppr046'])
test('Ppr047', expect_fail, makefile_test, ['ppr047'])
test('Ppr048', ignore_stderr, makefile_test, ['ppr048'])
test('T13199', ignore_stderr, makefile_test, ['T13199'])
test('T13199', [ignore_stderr, req_rts_linker], makefile_test, ['T13199'])
test('T13050p', ignore_stderr, makefile_test, ['T13050p'])
test('T13550', ignore_stderr, makefile_test, ['T13550'])
test('T13942', ignore_stderr, makefile_test, ['T13942'])
test('T14289', ignore_stderr, makefile_test, ['T14289'])
test('T14289b', ignore_stderr, makefile_test, ['T14289b'])
test('T14289c', ignore_stderr, makefile_test, ['T14289c'])
test('T13550', [ignore_stderr, req_rts_linker], makefile_test, ['T13550'])
test('T13942', [ignore_stderr, req_rts_linker], makefile_test, ['T13942'])
test('T14289', [ignore_stderr, req_rts_linker], makefile_test, ['T14289'])
test('T14289b', [ignore_stderr, req_rts_linker], makefile_test, ['T14289b'])
test('T14289c', [ignore_stderr, req_rts_linker], makefile_test, ['T14289c'])
test('T14306', ignore_stderr, makefile_test, ['T14306'])
test('T14343', normal, compile_fail, [''])
test('T14343b', normal, compile_fail, [''])
......
......@@ -6,7 +6,7 @@ test('T7918',
only_ways([config.ghc_th_way]), unless(have_dynamic(), skip)],
compile_and_run, ['-package ghc ' + config.ghc_th_way_flags])
test('T14028',
[req_interp,
[req_interp, req_rts_linker,
only_ways([config.ghc_th_way]),
unless(config.have_ext_interp, skip),
when(opsys('linux') and arch('x86_64'), expect_broken_for(17300, ['dyn']))],
......
......@@ -395,6 +395,7 @@ test('keep-cafs',
when(opsys('mingw32'), expect_broken (5987)),
when(platform('powerpc64le-unknown-linux'), expect_broken(11261)),
when(opsys('freebsd'), expect_broken(16035)),
req_rts_linker
],
makefile_test, ['KeepCafs'])
......
......@@ -56,17 +56,14 @@ def checkDynAsm(actual_file, normaliser):
# separately now.
# These should have extra_clean() arguments, but I need
# to somehow extract out the name of DLLs to do that
test('T5435_v_asm_a', [extra_files(['T5435.hs', 'T5435_asm.c']),
unless(config.have_RTS_linker, skip)],
test('T5435_v_asm_a', [extra_files(['T5435.hs', 'T5435_asm.c']), req_rts_linker],
makefile_test, ['T5435_v_asm_a'])
# this one just needs to run on linux, as darwin/mingw32 are covered
# by the _a test already.
test('T5435_v_asm_b', [extra_files(['T5435.hs', 'T5435_asm.c']),
unless(config.have_RTS_linker, skip),
when(opsys('darwin') or opsys('mingw32'), skip)],
test('T5435_v_asm_b', [extra_files(['T5435.hs', 'T5435_asm.c']), req_rts_linker,
when(opsys('darwin') or opsys('mingw32'), skip)],
makefile_test, ['T5435_v_asm_b'])
test('T5435_v_gcc', [extra_files(['T5435.hs', 'T5435_gcc.c']),
unless(config.have_RTS_linker, skip)],
test('T5435_v_gcc', [extra_files(['T5435.hs', 'T5435_gcc.c']), req_rts_linker],
makefile_test, ['T5435_v_gcc'])
test('T5435_dyn_asm', [extra_files(['T5435.hs', 'T5435_asm.c']),
check_stdout(checkDynAsm)],
......@@ -75,8 +72,7 @@ test('T5435_dyn_gcc', extra_files(['T5435.hs', 'T5435_gcc.c']) , makefile_test,
######################################
test('linker_unload',
[extra_files(['LinkerUnload.hs', 'Test.hs']),
unless(config.have_RTS_linker, skip)],
[extra_files(['LinkerUnload.hs', 'Test.hs']), req_rts_linker],
makefile_test, ['linker_unload'])
######################################
......
test('linker_unload_multiple_objs',
[extra_files(['../LinkerUnload.hs', 'A.hs', 'B.hs', 'C.hs', 'D.hs',]),
unless(config.have_RTS_linker, skip)],
req_rts_linker],
run_command, ['$MAKE -s --no-print-directory linker_unload_multiple_objs'])
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