[Git][ghc/ghc][master] Testsuite: replace some js_skip with req_cmm

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Feb 28 16:12:58 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
239202a2 by Sylvain Henry at 2023-02-28T11:12:03-05:00
Testsuite: replace some js_skip with req_cmm

req_cmm is more informative than js_skip

- - - - -


7 changed files:

- testsuite/driver/testlib.py
- testsuite/tests/cmm/should_compile/T21370/all.T
- testsuite/tests/cmm/should_compile/all.T
- testsuite/tests/cmm/should_run/all.T
- testsuite/tests/codeGen/should_compile/all.T
- testsuite/tests/codeGen/should_compile/cg010/all.T
- testsuite/tests/codeGen/should_run/all.T


Changes:

=====================================
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)


=====================================
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, [])


=====================================
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'])


=====================================
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,


=====================================
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])


=====================================
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'])


=====================================
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',



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/239202a2b14714740e016d7bbcd4f351356fcb00

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/239202a2b14714740e016d7bbcd4f351356fcb00
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230228/c7dfeb82/attachment-0001.html>


More information about the ghc-commits mailing list