Skip to content

Commit

Permalink
Properly skip more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hsyl20 committed Feb 18, 2025
1 parent d1ccf00 commit 2f4dc99
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Build.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,5 +1028,7 @@ generateSettings ghc_toolchain Settings{..} dst = do

-- fixup settings generated by ghc-toolchain
kvs <- (Map.fromList . read) <$> readFile gen_settings_path :: IO (Map String String)
let kvs' = Map.insert "Relative Global Package DB" "../pkgs" kvs
let kvs' = Map.insert "Relative Global Package DB" "../pkgs"
$ Map.insert "Support SMP" "NO" -- FIXME: this depends on the different ways used to build the RTS!
$ kvs
writeFile (dst </> "lib/settings") (show $ Map.toList kvs')
7 changes: 7 additions & 0 deletions testsuite/driver/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,13 @@ def req_ghc_smp( name, opts ):
if not config.ghc_has_smp:
opts.skip = True

def req_target_debug_rts( name, opts ):
"""
Mark a test as requiring the debug rts (e.g. compile with -debug or -ticky)
"""
if not config.debug_rts:
opts.skip = True

def req_target_smp( name, opts ):
"""
Mark a test as requiring smp when run on the target. If the target does
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/codeGen/should_run/T25374/all.T
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This shouldn't crash the disassembler
test('T25374', [extra_hc_opts('+RTS -Di -RTS'), ignore_stderr, unless(debug_rts(), skip)], ghci_script, [''])
test('T25374', [extra_hc_opts('+RTS -Di -RTS'), ignore_stderr, req_target_debug_rts], ghci_script, [''])

2 changes: 1 addition & 1 deletion testsuite/tests/rts/T8308/all.T
Original file line number Diff line number Diff line change
@@ -1 +1 @@
test('T8308', js_broken(22261), makefile_test, ['T8308'])
test('T8308', req_target_debug_rts, makefile_test, ['T8308'])
4 changes: 2 additions & 2 deletions testsuite/tests/rts/all.T
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ test('T10904', [ extra_run_opts('20000'), req_c ],
test('T10728', [extra_run_opts('+RTS -maxN3 -RTS'), only_ways(['threaded2'])],
compile_and_run, [''])

test('T9405', [when(opsys('mingw32'), fragile(21361)), js_broken(22261)], makefile_test, ['T9405'])
test('T9405', [when(opsys('mingw32'), fragile(21361)), req_target_debug_rts], makefile_test, ['T9405'])

test('T11788', [ when(ghc_dynamic(), skip)
, req_interp
Expand Down Expand Up @@ -620,7 +620,7 @@ test('T23221',
compile_and_run,
['-O -with-rtsopts -T'])

test('T23142', [unless(debug_rts(), skip), req_interp], makefile_test, ['T23142'])
test('T23142', [req_target_debug_rts, req_interp], makefile_test, ['T23142'])

test('T23400', [], compile_and_run, ['-with-rtsopts -A8k'])

Expand Down

0 comments on commit 2f4dc99

Please sign in to comment.