summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2023-02-27 15:36:21 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-02-28 11:12:03 -0500
commit239202a2b14714740e016d7bbcd4f351356fcb00 (patch)
tree40c798cf6c17cfe85cc6bcf438f8fed843af0beb
parent8b77f9bfceb456115f63349ad0ff66a5cea7ab59 (diff)
downloadhaskell-239202a2b14714740e016d7bbcd4f351356fcb00.tar.gz
Testsuite: replace some js_skip with req_cmm
req_cmm is more informative than js_skip
-rw-r--r--testsuite/driver/testlib.py10
-rw-r--r--testsuite/tests/cmm/should_compile/T21370/all.T2
-rw-r--r--testsuite/tests/cmm/should_compile/all.T2
-rw-r--r--testsuite/tests/cmm/should_run/all.T6
-rw-r--r--testsuite/tests/codeGen/should_compile/all.T12
-rw-r--r--testsuite/tests/codeGen/should_compile/cg010/all.T2
-rw-r--r--testsuite/tests/codeGen/should_run/all.T10
7 files changed, 25 insertions, 19 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index c35bea1811..a1242faeb3 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -273,6 +273,13 @@ def req_c( name, opts ):
# JS backend doesn't support C (yet)
js_skip(name, opts)
+def req_cmm( name, opts ):
+ """
+ Mark a test as requiring Cmm support
+ """
+ # JS backend doesn't support Cmm
+ js_skip(name, opts)
+
def req_ffi_exports( name, opts):
"""
Mark a test as requiring FFI exports
@@ -771,8 +778,7 @@ def objcpp_src( name, opts ):
def cmm_src( name, opts ):
opts.cmm_src = True
- # JS backend doesn't support Cmm
- js_skip(name, opts)
+ req_cmm(name, opts)
def outputdir( odir ):
return lambda name, opts, d=odir: _outputdir(name, opts, d)
diff --git a/testsuite/tests/cmm/should_compile/T21370/all.T b/testsuite/tests/cmm/should_compile/T21370/all.T
index f0df98e111..eb08628b6f 100644
--- a/testsuite/tests/cmm/should_compile/T21370/all.T
+++ b/testsuite/tests/cmm/should_compile/T21370/all.T
@@ -1,4 +1,4 @@
test('T21370',
[ extra_files(["subdir", "test.cmm", "test2.cmm", "Main.hs"])
- , js_skip # use Cmm
+ , req_cmm
], makefile_test, [])
diff --git a/testsuite/tests/cmm/should_compile/all.T b/testsuite/tests/cmm/should_compile/all.T
index 721b2c1dee..7f40159162 100644
--- a/testsuite/tests/cmm/should_compile/all.T
+++ b/testsuite/tests/cmm/should_compile/all.T
@@ -1,5 +1,5 @@
setTestOpts(
- [ js_skip # Cmm not supported by the JS backend
+ [ req_cmm
])
test('selfloop', [cmm_src], compile, ['-no-hs-main'])
diff --git a/testsuite/tests/cmm/should_run/all.T b/testsuite/tests/cmm/should_run/all.T
index 2a50208476..d6c90d4ac2 100644
--- a/testsuite/tests/cmm/should_run/all.T
+++ b/testsuite/tests/cmm/should_run/all.T
@@ -6,7 +6,7 @@ test('HooplPostorder',
test('cmp64',
[ extra_run_opts('"' + config.libdir + '"')
, omit_ways(['ghci'])
- , js_skip
+ , req_cmm
],
multi_compile_and_run,
['cmp64', [('cmp64_cmm.cmm', '')], '-O'])
@@ -21,7 +21,7 @@ test('cmp64',
test('ByteSwitch',
[ extra_run_opts('"' + config.libdir + '"')
, omit_ways(['ghci'])
- , js_skip
+ , req_cmm
],
multi_compile_and_run,
['ByteSwitch', [('ByteSwitch_cmm.cmm', '')], ''])
@@ -29,7 +29,7 @@ test('ByteSwitch',
test('T22871',
[ extra_run_opts('"' + config.libdir + '"')
, omit_ways(['ghci'])
- , js_skip
+ , req_cmm
, when(arch('i386'), skip) # x86 NCG panics with "iselExpr64(i386)"
],
multi_compile_and_run,
diff --git a/testsuite/tests/codeGen/should_compile/all.T b/testsuite/tests/codeGen/should_compile/all.T
index 7e5d1d39f2..ccd30a7cfe 100644
--- a/testsuite/tests/codeGen/should_compile/all.T
+++ b/testsuite/tests/codeGen/should_compile/all.T
@@ -29,7 +29,7 @@ test('T9329', [when(unregisterised(), expect_broken(15467)), cmm_src], compile,
test('debug',
[ normal,
- js_skip # requires Cmm
+ req_cmm
],
makefile_test, [])
@@ -72,7 +72,7 @@ test('T17334', [ unless(have_ncg() and (arch('x86_64') or arch('i386')), skip)
], compile, ['-O'])
test('T14373',
- [ js_skip # JS backend doesn't produce Cmm
+ [ req_cmm
],
multimod_compile_filter, ['T14373', '-fasm -O2 -c -ddump-cmm-from-stg',
r'grep -e "const T14373\.._closure+.;"'])
@@ -80,17 +80,17 @@ test('T14373',
switch_skeleton_only = r'grep -e "switch \[" -e "case " -e "default: " | sed -e "s|\] .*|\]|g" -e "s|goto .*|goto |g"'
test('T14373a',
- [ js_skip # JS backend doesn't produce Cmm
+ [ req_cmm
],
multimod_compile_filter, ['T14373a', '-fasm -O2 -c -ddump-cmm-from-stg',
switch_skeleton_only])
test('T14373b',
- [ js_skip # JS backend doesn't produce Cmm
+ [ req_cmm
],
multimod_compile_filter, ['T14373b', '-fasm -O2 -c -ddump-cmm-from-stg',
switch_skeleton_only])
test('T14373c',
- [ js_skip # JS backend doesn't produce Cmm
+ [ req_cmm
],
multimod_compile_filter, ['T14373c', '-fasm -O2 -c -ddump-cmm-from-stg',
switch_skeleton_only])
@@ -99,7 +99,7 @@ switch_skeleton_and_entries_only = (r'grep -e "switch \[" -e "case " -e "default
r'| sed -e "s|\] .*|\]|g" -e "s|goto .*|goto |g" -e "s|R1 = .*_closure+2;.*|R1 = XYZ_closure+2;|g" -e "s|//.*|//|g"')
test('T14373d',
- [ js_skip # JS backend doesn't produce Cmm
+ [ req_cmm
],
multimod_compile_filter, ['T14373d', '-fasm -O2 -c -ddump-cmm-from-stg',
switch_skeleton_and_entries_only])
diff --git a/testsuite/tests/codeGen/should_compile/cg010/all.T b/testsuite/tests/codeGen/should_compile/cg010/all.T
index 8c42213c44..d7524bc95d 100644
--- a/testsuite/tests/codeGen/should_compile/cg010/all.T
+++ b/testsuite/tests/codeGen/should_compile/cg010/all.T
@@ -1,4 +1,4 @@
test('cg010',
[ extra_files(['A.hs','Main.hs'])
- , js_skip # skip with JS backend because Cmm is required
+ , req_cmm
], makefile_test, ['cg010'])
diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T
index a0296a7fed..71ab9b845e 100644
--- a/testsuite/tests/codeGen/should_run/all.T
+++ b/testsuite/tests/codeGen/should_run/all.T
@@ -74,7 +74,7 @@ test('cgrun065', normal, compile_and_run, [''])
test('cgrun066', normal, compile_and_run, [''])
test('cgrun067', [extra_files(['Cgrun067A.hs'])], compile_and_run, [''])
test('cgrun069',
- [ omit_ways(['ghci']), js_skip],
+ [ omit_ways(['ghci']), req_cmm],
multi_compile_and_run,
['cgrun069', [('cgrun069_cmm.cmm', '')], ''])
test('cgrun070', normal, compile_and_run, [''])
@@ -99,7 +99,7 @@ test('T3207', normal, compile_and_run, [''])
test('T3561', normal, compile_and_run, [''])
test('T3677', extra_run_opts('+RTS -K8k -RTS'), compile_and_run, [''])
test('T4441', normal, compile_and_run, [''])
-test('T5149', [omit_ways(['ghci']), js_skip], multi_compile_and_run,
+test('T5149', [omit_ways(['ghci']), req_cmm], multi_compile_and_run,
['T5149', [('T5149_cmm.cmm', '')], ''])
test('T5129',
# The bug is in simplifier when run with -O1 and above, so only run it
@@ -148,8 +148,8 @@ test('T9013', omit_ways(['ghci']), # ghci doesn't support unboxed tuples
compile_and_run, [''])
test('T9340', normal, compile_and_run, [''])
test('cgrun074', normal, compile_and_run, [''])
-test('CmmSwitchTest32', [unless(wordsize(32), skip),js_skip], compile_and_run, [''])
-test('CmmSwitchTest64', [unless(wordsize(64), skip),js_skip], compile_and_run, [''])
+test('CmmSwitchTest32', [unless(wordsize(32), skip), req_cmm], compile_and_run, [''])
+test('CmmSwitchTest64', [unless(wordsize(64), skip), req_cmm], compile_and_run, [''])
# Skipping WAY=ghci, because it is not broken.
test('T10245', normal, compile_and_run, [''])
test('T10246', normal, compile_and_run, [''])
@@ -163,7 +163,7 @@ test('T10521b', normal, compile_and_run, [''])
test('T10870', when(wordsize(32), skip), compile_and_run, [''])
test('PopCnt',
[omit_ways(['ghci'])
- , js_skip # use Cmm
+ ,req_cmm
], multi_compile_and_run,
['PopCnt', [('PopCnt_cmm.cmm', '')], ''])
test('T12059',