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 | |
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.
-rw-r--r-- | libraries/base/tests/IO/all.T | 4 | ||||
-rw-r--r-- | libraries/base/tests/System/all.T | 2 | ||||
-rw-r--r-- | libraries/base/tests/all.T | 10 | ||||
m--------- | libraries/hpc | 0 | ||||
m--------- | libraries/process | 0 | ||||
-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 |
10 files changed, 25 insertions, 9 deletions
diff --git a/libraries/base/tests/IO/all.T b/libraries/base/tests/IO/all.T index 1a54564896..bfe14ee2aa 100644 --- a/libraries/base/tests/IO/all.T +++ b/libraries/base/tests/IO/all.T @@ -86,11 +86,13 @@ test('hGetBuf001', [ when(fast(), skip) , expect_fail_if_windows , js_broken(22374) + , req_process ], compile_and_run, ['-package unix']) test('hDuplicateTo001', [fragile_for(16819, concurrent_ways), - when(opsys('mingw32'), skip)], compile_and_run, ['']) + when(opsys('mingw32'), skip), + req_process], compile_and_run, ['']) test('countReaders001', js_broken(22261), compile_and_run, ['']) diff --git a/libraries/base/tests/System/all.T b/libraries/base/tests/System/all.T index ad3b046b25..10ddd7754f 100644 --- a/libraries/base/tests/System/all.T +++ b/libraries/base/tests/System/all.T @@ -4,7 +4,7 @@ test('getArgs001', normal, compile_and_run, ['']) test('getEnv001', normal, compile_and_run, ['']) test('T5930', normal, compile_and_run, ['']) -test('system001', [js_broken(22349), when(opsys("mingw32"), skip)], \ +test('system001', [js_broken(22349), when(opsys("mingw32"), skip), req_process], \ compile_and_run, ['']) test('Timeout001', js_broken(22261), compile_and_run, ['']) test('T16466', normal, compile_and_run, ['']) diff --git a/libraries/base/tests/all.T b/libraries/base/tests/all.T index d5eba40dff..0a9e00eb11 100644 --- a/libraries/base/tests/all.T +++ b/libraries/base/tests/all.T @@ -158,7 +158,7 @@ test('T2528', normal, compile_and_run, ['']) # May 2014: seems to work on msys2 # May 2018: The behavior of printf seems very implementation dependent. # so let's normalise the output. -test('T4006', [js_broken(22349), normalise_fun(normalise_quotes)], compile_and_run, ['']) +test('T4006', [js_broken(22349), normalise_fun(normalise_quotes), req_process], compile_and_run, ['']) test('T5943', normal, compile_and_run, ['']) test('T5962', normal, compile_and_run, ['']) @@ -181,7 +181,7 @@ test('T7653', [when(opsys('mingw32'), skip), omit_ways(prof_ways+['ghci'])], compile_and_run, ['']) test('T7787', normal, compile_and_run, ['']) -test('topHandler01', [when(opsys('mingw32'), skip), js_broken(22261)], compile_and_run, ['']) +test('topHandler01', [when(opsys('mingw32'), skip), js_broken(22261), req_process], compile_and_run, ['']) test('topHandler02', [when(opsys('mingw32'), skip), omit_ways(['ghci']), @@ -227,7 +227,7 @@ test('T8089', [exit_code(99), run_timeout_multiplier(0.01)], compile_and_run, ['']) test('T8684', expect_broken(8684), compile_and_run, ['']) -test('hWaitForInput-accurate-stdin', [js_broken(22349), expect_broken_for(16535, threaded_ways), omit_ways(['ghci'])], compile_and_run, ['']) +test('hWaitForInput-accurate-stdin', [js_broken(22349), expect_broken_for(16535, threaded_ways), omit_ways(['ghci']), req_process], compile_and_run, ['']) test('T9826',normal, compile_and_run,['']) test('T9848', [ collect_stats('bytes allocated') @@ -240,7 +240,7 @@ test('T10149', normal, compile_and_run, ['']) test('T11334a', normal, compile_and_run, ['']) test('T11555', normal, compile_and_run, ['']) test('T12494', normal, compile_and_run, ['']) -test('T12852', [when(opsys('mingw32'), skip), js_broken(22374)], compile_and_run, ['']) +test('T12852', [when(opsys('mingw32'), skip), js_broken(22374), req_process], compile_and_run, ['']) test('lazySTexamples', normal, compile_and_run, ['']) test('T11760', [req_ghc_smp, req_target_smp, @@ -254,7 +254,7 @@ test('T13191', ], compile_and_run, ['-O']) -test('T13525', [when(opsys('mingw32'), skip), js_broken(22374)], compile_and_run, ['']) +test('T13525', [when(opsys('mingw32'), skip), js_broken(22374), req_process], compile_and_run, ['']) test('T13097', normal, compile_and_run, ['']) test('functorOperators', normal, compile_and_run, ['']) test('T3474', diff --git a/libraries/hpc b/libraries/hpc -Subproject bb5c55d697b0d0e6b8cce5ff5037273241de323 +Subproject ffbd36cb1799b8dfde4fb8e2c7845edd8532053 diff --git a/libraries/process b/libraries/process -Subproject e60ab049b92238b0111654589f17b6ee68249f0 +Subproject 97e924aa97ab713529feed4f0edde5df9d4d267 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']) |