diff options
author | Cheng Shao <terrorjack@type.dance> | 2023-04-01 21:06:20 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-04-27 16:00:35 -0400 |
commit | ce580426ce3052e3b3d2847d0312652ea9087994 (patch) | |
tree | 90940a28cda4c5e75f14efe23ff67484430d2637 /testsuite | |
parent | aa6afe8ab48b5fbe09d332a25ce6af4719c5cb44 (diff) | |
download | haskell-ce580426ce3052e3b3d2847d0312652ea9087994.tar.gz |
testsuite: add the req_process predicate
This patch adds the req_process predicate to the testsuite to assert
the platform has a process model, also marking tests that involve
spawning processes as req_process. Also bumps hpc & process submodule.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/config/ghc | 3 | ||||
-rw-r--r-- | testsuite/driver/testglobals.py | 3 | ||||
-rw-r--r-- | testsuite/driver/testlib.py | 4 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/target-contents/all.T | 1 | ||||
-rw-r--r-- | testsuite/tests/rts/all.T | 7 |
5 files changed, 16 insertions, 2 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc index 46b897bef0..77c7e0a151 100644 --- a/testsuite/config/ghc +++ b/testsuite/config/ghc @@ -79,6 +79,9 @@ if not config.arch == "javascript": config.compile_ways.append('hpc') config.run_ways.append('hpc') +if config.arch == "wasm32": + config.have_process = False + config.way_flags = { 'normal' : [], 'normal_h' : [], diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py index 6688d961d2..66d68440fd 100644 --- a/testsuite/driver/testglobals.py +++ b/testsuite/driver/testglobals.py @@ -145,6 +145,9 @@ class TestConfig: # Do we have threaded RTS? self.ghc_with_threaded_rts = False + # Do we even have processes? + self.have_process = True + # Does the platform support loading of dynamic shared libraries? e.g. # some musl-based environments do not. self.supports_dynamic_libs = True diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index 43aab6f0da..370cdf1988 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -317,6 +317,10 @@ def req_ghc_with_threaded_rts( name, opts ): if not config.ghc_with_threaded_rts: opts.skip = True +def req_process( name, opts ): + if not config.have_process: + opts.skip = True + def ignore_stdout(name, opts): opts.ignore_stdout = True diff --git a/testsuite/tests/ghc-api/target-contents/all.T b/testsuite/tests/ghc-api/target-contents/all.T index 9072d6609e..3deaceaef6 100644 --- a/testsuite/tests/ghc-api/target-contents/all.T +++ b/testsuite/tests/ghc-api/target-contents/all.T @@ -1,6 +1,7 @@ test('TargetContents', [ extra_run_opts('"' + config.libdir + '"') , js_broken(22362) + , req_process ] , compile_and_run, ['-package ghc -package exceptions']) diff --git a/testsuite/tests/rts/all.T b/testsuite/tests/rts/all.T index aab8c6908c..57920ec4da 100644 --- a/testsuite/tests/rts/all.T +++ b/testsuite/tests/rts/all.T @@ -222,7 +222,8 @@ test('exec_signals', [when(opsys('mingw32'), skip), pre_cmd('$MAKE -s --no-print-directory exec_signals-prep'), cmd_prefix('./exec_signals_prepare'), - js_broken(22355)], + js_broken(22355), + req_process], compile_and_run, ['']) test('return_mem_to_os', normal, compile_and_run, ['']) @@ -390,6 +391,7 @@ test('T9839_05', test('T10590', [ ignore_stderr , when(opsys('mingw32'), skip) , js_skip # JS backend doesn't support pipes + , req_process ], compile_and_run, ['']) # 20000 was easily enough to trigger the bug with 7.10 @@ -422,7 +424,8 @@ test('T13617', [ unless(opsys('mingw32'), skip)], # Test is fragile on all systems. #21184 links to various other reports through # its history. test('T12903', [ fragile(21184) - , js_broken(22374)] + , js_broken(22374) + , req_process] , compile_and_run, ['']) test('T13832', [exit_code(1), req_ghc_with_threaded_rts], compile_and_run, ['-threaded']) |