summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2023-02-07 16:19:57 +0100
committerBen Gamari <ben@smart-cactus.org>2023-02-23 14:05:44 -0500
commite0cfea59a3027a48d4d51b0b80b7b1e42183c274 (patch)
tree1678e2805f24712fa82718da3c3e3b83c4e8eeb5
parent447a39fc745e633d97fed1cf579ef418e2c5baa9 (diff)
downloadhaskell-e0cfea59a3027a48d4d51b0b80b7b1e42183c274.tar.gz
Testsuite: decrease length001 timeout for JS (#22921)
-rw-r--r--libraries/base/tests/all.T4
-rw-r--r--testsuite/driver/testlib.py7
2 files changed, 8 insertions, 3 deletions
diff --git a/libraries/base/tests/all.T b/libraries/base/tests/all.T
index 5e4387851e..3bd1cce308 100644
--- a/libraries/base/tests/all.T
+++ b/libraries/base/tests/all.T
@@ -79,7 +79,9 @@ test('length001',
# excessive amounts of stack space. So we specifically set a low
# stack limit and mark it as failing under a few conditions.
[extra_run_opts('+RTS -K8m -RTS'),
- expect_fail_for(['normal', 'threaded1', 'llvm', 'nonmoving', 'nonmoving_thr', 'nonmoving_thr_ghc'])],
+ expect_fail_for(['normal', 'threaded1', 'llvm', 'nonmoving', 'nonmoving_thr', 'nonmoving_thr_ghc']),
+ # JS doesn't support stack limit so the test sometimes passes just fine. We decrease the timeout duration to force the failure.
+ when(js_arch(), run_timeout_multiplier(0.2))],
compile_and_run, [''])
test('ratio001', normal, compile_and_run, [''])
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 9a0d3c03ae..1a00da5a10 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -129,14 +129,17 @@ def no_deps( name, opts):
def skip( name, opts ):
opts.skip = True
+def js_arch() -> bool:
+ return arch("javascript");
+
# disable test on JS arch
def js_skip( name, opts ):
- if arch("javascript"):
+ if js_arch():
skip(name,opts)
# expect broken for the JS backend
def js_broken( bug: IssueNumber ):
- if arch("javascript"):
+ if js_arch():
return expect_broken(bug);
else:
return normal;