[Git][ghc/ghc][wip/js-staging] testsuite: remove js_skip_csources, use c_src

doyougnu (@doyougnu) gitlab at gitlab.haskell.org
Wed Oct 19 18:18:41 UTC 2022



doyougnu pushed to branch wip/js-staging at Glasgow Haskell Compiler / GHC


Commits:
afb397e9 by doyougnu at 2022-10-19T14:17:08-04:00
testsuite: remove js_skip_csources, use c_src

- - - - -


12 changed files:

- testsuite/driver/testlib.py
- testsuite/tests/backpack/should_run/all.T
- testsuite/tests/codeGen/should_run/T20137/all.T
- testsuite/tests/codeGen/should_run/T20735/all.T
- testsuite/tests/codeGen/should_run/all.T
- testsuite/tests/driver/multipleHomeUnits/o-dir/all.T
- testsuite/tests/ffi/should_fail/all.T
- testsuite/tests/ffi/should_run/all.T
- testsuite/tests/generics/all.T
- testsuite/tests/rep-poly/all.T
- testsuite/tests/rts/all.T
- testsuite/tests/rts/linker/T11223/all.T


Changes:

=====================================
testsuite/driver/testlib.py
=====================================
@@ -149,10 +149,6 @@ def js_broken( bug: IssueNumber ):
     else:
         return normal;
 
-# an alias to js_skip to note that these tests fail due to c-sources
-def js_skip_csources(name, opts):
-    js_skip(name,opts);
-
 def expect_fail( name, opts ):
     # The compiler, testdriver, OS or platform is missing a certain
     # feature, and we don't plan to or can't fix it now or in the


=====================================
testsuite/tests/backpack/should_run/all.T
=====================================
@@ -1,13 +1,13 @@
-test('bkprun01', js_skip_csources, backpack_run, [''])
-test('bkprun02', js_skip_csources, backpack_run, [''])
-test('bkprun03', js_skip_csources, backpack_run, [''])
-test('bkprun04', js_skip_csources, backpack_run, [''])
-test('bkprun05', [exit_code(1), js_skip_csources], backpack_run, [''])
-test('bkprun06', js_skip_csources, backpack_run, [''])
-test('bkprun07', js_skip_csources, backpack_run, [''])
-test('bkprun08', js_skip_csources, backpack_run, [''])
-test('bkprun09', js_skip_csources, backpack_run, ['-O'])
-test('T13955', js_skip_csources, backpack_run, [''])
-test('T15138', js_skip_csources, backpack_run, [''])
-test('T15379', js_skip_csources, backpack_run,[''])
+test('bkprun01', c_src, backpack_run, [''])
+test('bkprun02', c_src, backpack_run, [''])
+test('bkprun03', c_src, backpack_run, [''])
+test('bkprun04', c_src, backpack_run, [''])
+test('bkprun05', [exit_code(1), c_src], backpack_run, [''])
+test('bkprun06', c_src, backpack_run, [''])
+test('bkprun07', c_src, backpack_run, [''])
+test('bkprun08', c_src, backpack_run, [''])
+test('bkprun09', c_src, backpack_run, ['-O'])
+test('T13955', c_src, backpack_run, [''])
+test('T15138', c_src, backpack_run, [''])
+test('T15379', c_src, backpack_run,[''])
 test('T20133', expect_broken(20133), backpack_run, [''])


=====================================
testsuite/tests/codeGen/should_run/T20137/all.T
=====================================
@@ -1 +1 @@
-test('T20137', js_skip_csources, compile_and_run, ['T20137C.c'])
+test('T20137', c_src, compile_and_run, ['T20137C.c'])


=====================================
testsuite/tests/codeGen/should_run/T20735/all.T
=====================================
@@ -1,5 +1,5 @@
 test('T20735',
-     js_skip_csources,
+     c_src,
      multi_compile_and_run,
      ['T20735', [('T20735_c.c', '')], ''])
 


=====================================
testsuite/tests/codeGen/should_run/all.T
=====================================
@@ -211,7 +211,7 @@ test('T16449_2', exit_code(0), compile_and_run, [''])
 test('T16846', [only_ways(['optasm']), exit_code(1)], compile_and_run, [''])
 
 test('T17920', cmm_src, compile_and_run, [''])
-test('T18527', js_skip_csources, compile_and_run, ['T18527FFI.c'])
+test('T18527', c_src, compile_and_run, ['T18527FFI.c'])
 test('T19149', only_ways('sanity'), compile_and_run, ['T19149_c.c'])
 test('T20275', normal, compile_and_run, [''])
 


=====================================
testsuite/tests/driver/multipleHomeUnits/o-dir/all.T
=====================================
@@ -1,7 +1,7 @@
 # This test checks that getRootSummary doesn't cross package boundaries.
 test('multipleHomeUnits_odir'
     , [extra_files([ 'p1/', 'unitP1']),
-       js_skip_csources
+       c_src
       ]
     , makefile_test
     , ['mhu-odir'])


=====================================
testsuite/tests/ffi/should_fail/all.T
=====================================
@@ -9,7 +9,7 @@ test('T3066', normal, compile_fail, [''])
 test('ccfail004', [extra_files(['Ccfail004A.hs'])], multimod_compile_fail, ['ccfail004', '-v0'])
 test('ccfail005', normal, compile_fail, [''])
 test('ccall_value', normal, compile_fail, [''])
-test('capi_value_function', js_skip_csources, compile_fail, [''])
+test('capi_value_function', c_src, compile_fail, [''])
 test('NonreducingFfiSignature', normal, compile_fail, [''])
 test('T5664', normal, compile_fail, ['-v0'])
 test('T7506', normal, compile_fail, [''])
@@ -24,7 +24,7 @@ test('T21305_fail', normal, compile_fail, [''])
 # (threaded runtime will hang). See #14912.
 test('UnsafeReenter',
      [omit_ways(threaded_ways), exit_code(1),
-     js_skip_csources],
+     c_src],
      compile_and_run,
      ['UnsafeReenterC.c'])
 


=====================================
testsuite/tests/ffi/should_run/all.T
=====================================
@@ -34,7 +34,7 @@ test('ffi004', skip, compile_and_run, [''])
 test('ffi005', [ omit_ways(prof_ways + ['ghci']),
                  when(arch('i386'), skip),
                  when(platform('i386-apple-darwin'), expect_broken(4105)),
-                 js_skip_csources,
+                 c_src,
                  exit_code(3) ],
                compile_and_run, ['ffi005_c.c'])
 
@@ -79,7 +79,7 @@ test('ffi014', [only_ways(['threaded1', 'threaded2'])], compile_and_run,
      ['ffi014_cbits.c'])
 
 # GHCi can't handle the separate C file (ToDo: fix this somehow)
-test('ffi015', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['ffi015_cbits.c'])
+test('ffi015', [omit_ways(['ghci']), c_src], compile_and_run, ['ffi015_cbits.c'])
 
 # GHCi can't handle foreign import "&"
 test('ffi016', [ omit_ways(['ghci'])
@@ -95,7 +95,7 @@ test('ffi018_ghci',
       only_ways(['ghci']),
       when(unregisterised(), fragile(16085)),
       pre_cmd('$MAKE -s --no-print-directory ffi018_ghci_setup'),
-      js_skip_csources],
+      c_src],
      compile_and_run, ['ffi018_ghci_c.o'])
 
 test('ffi019', [normal, js_skip], compile_and_run, [''])
@@ -103,14 +103,14 @@ test('ffi019', [normal, js_skip], compile_and_run, [''])
 # This one originally failed only GHCi, but doesn't hurt to test all ways.
 test('T1679', normal, compile_and_run, [''])
 
-test('T1288', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['T1288_c.c'])
+test('T1288', [omit_ways(['ghci']), c_src], compile_and_run, ['T1288_c.c'])
 test('T1288_ghci',
      [only_ways(['ghci']),
       when(unregisterised(), fragile(16085)),
       pre_cmd('$MAKE -s --no-print-directory T1288_ghci_setup')],
      compile_and_run, ['T1288_ghci_c.o'])
 
-test('T2276', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['T2276_c.c'])
+test('T2276', [omit_ways(['ghci']), c_src], compile_and_run, ['T2276_c.c'])
 test('T2276_ghci', [ only_ways(['ghci']),
                      when(opsys('darwin'), skip), # stdcall not supported on OS X
                      pre_cmd('$MAKE -s --no-print-directory T2276_ghci_setup') ],
@@ -118,7 +118,7 @@ test('T2276_ghci', [ only_ways(['ghci']),
 
 test('T2469', normal, compile_and_run, ['-optc-std=gnu99'])
 
-test('T2594', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['T2594_c.c'])
+test('T2594', [omit_ways(['ghci']), c_src], compile_and_run, ['T2594_c.c'])
 
 test('fptr01', [omit_ways(['ghci'])], compile_and_run,
       [ 'fptr01_js.js' if arch("js") else 'fptr01_c.c'])
@@ -126,7 +126,7 @@ test('fptr02', normal, compile_and_run, [''])
 
 test('fptrfail01', [omit_ways(['ghci']),
                    exit_code(1),
-                   js_skip_csources], compile_and_run,
+                   c_src], compile_and_run,
      ['fptrfail01_c.c'])
 
 test('T2917a', normal, compile_and_run, [''])
@@ -149,7 +149,7 @@ else:
 	flagsForT4038 = ['']
 test('T4038', normal, compile_and_run, flagsForT4038)
 
-test('T4221', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['T4221_c.c'])
+test('T4221', [omit_ways(['ghci']), c_src], compile_and_run, ['T4221_c.c'])
 
 test('T5402', [ omit_ways(['ghci']),
                 exit_code(42),
@@ -172,7 +172,7 @@ test('Capi_Ctype_001', [extra_files(['Capi_Ctype_A_001.hsc', 'capi_ctype_001.h',
 test('Capi_Ctype_002', [extra_files(['Capi_Ctype_A_002.hsc', 'capi_ctype_002_A.h', 'capi_ctype_002_B.h'])],
      makefile_test, ['Capi_Ctype_002'])
 
-test('ffi_parsing_001', [omit_ways(['ghci']), js_skip_csources], compile_and_run,
+test('ffi_parsing_001', [omit_ways(['ghci']), c_src], compile_and_run,
      ['ffi_parsing_001_c.c'])
 
 test('capi_value', [omit_ways(['ghci'])], compile_and_run, ['capi_value_c.c'])
@@ -185,7 +185,7 @@ test('T7170',
 test('T4012', [expect_broken_for(7388, ['ghci'])], multimod_compile_and_run,
      ['T4012', ''])
 
-test('T8083', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['T8083_c.c'])
+test('T8083', [omit_ways(['ghci']), c_src], compile_and_run, ['T8083_c.c'])
 
 test('T9274', [omit_ways(['ghci'])], compile_and_run, [''])
 
@@ -198,39 +198,39 @@ test('ffi023', [ omit_ways(['ghci']),
                 # needs it.
               compile_and_run, ['ffi023_c.c'])
 
-test('T12134', [omit_ways(['ghci']),js_skip_csources], compile_and_run, ['T12134_c.c'])
+test('T12134', [omit_ways(['ghci']),c_src], compile_and_run, ['T12134_c.c'])
 
-test('T12614', [omit_ways(['ghci']),js_skip_csources], compile_and_run, ['T12614_c.c'])
+test('T12614', [omit_ways(['ghci']),c_src], compile_and_run, ['T12614_c.c'])
 
 test('T14624', [omit_ways(['ghci'])], compile_and_run, ['T14624_c.c'])
 
-test('T15933', [extra_files(['T15933_c.c', 'T15933.h']), js_skip_csources], makefile_test, ['T15933'])
+test('T15933', [extra_files(['T15933_c.c', 'T15933.h']), c_src], makefile_test, ['T15933'])
 
-test('T16650a', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['T16650a_c.c'])
+test('T16650a', [omit_ways(['ghci']), c_src], compile_and_run, ['T16650a_c.c'])
 
-test('T16650b', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['T16650b_c.c'])
+test('T16650b', [omit_ways(['ghci']), c_src], compile_and_run, ['T16650b_c.c'])
 
-test('T16650c', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['T16650c_c.c'])
+test('T16650c', [omit_ways(['ghci']), c_src], compile_and_run, ['T16650c_c.c'])
 
-test('T16650d', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['T16650d_c.c'])
+test('T16650d', [omit_ways(['ghci']), c_src], compile_and_run, ['T16650d_c.c'])
 
-test('PrimFFIInt8', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['PrimFFIInt8_c.c'])
+test('PrimFFIInt8', [omit_ways(['ghci']), c_src], compile_and_run, ['PrimFFIInt8_c.c'])
 
-test('PrimFFIWord8', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['PrimFFIWord8_c.c'])
+test('PrimFFIWord8', [omit_ways(['ghci']), c_src], compile_and_run, ['PrimFFIWord8_c.c'])
 
-test('PrimFFIInt16', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['PrimFFIInt16_c.c'])
+test('PrimFFIInt16', [omit_ways(['ghci']), c_src], compile_and_run, ['PrimFFIInt16_c.c'])
 
-test('PrimFFIWord16', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['PrimFFIWord16_c.c'])
+test('PrimFFIWord16', [omit_ways(['ghci']), c_src], compile_and_run, ['PrimFFIWord16_c.c'])
 
-test('PrimFFIInt32', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['PrimFFIInt32_c.c'])
+test('PrimFFIInt32', [omit_ways(['ghci']), c_src], compile_and_run, ['PrimFFIInt32_c.c'])
 
-test('PrimFFIWord32', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['PrimFFIWord32_c.c'])
+test('PrimFFIWord32', [omit_ways(['ghci']), c_src], compile_and_run, ['PrimFFIWord32_c.c'])
 
-test('T493', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['T493_c.c'])
+test('T493', [omit_ways(['ghci']), c_src], compile_and_run, ['T493_c.c'])
 
-test('UnliftedNewtypesByteArrayOffset', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['UnliftedNewtypesByteArrayOffset_c.c'])
+test('UnliftedNewtypesByteArrayOffset', [omit_ways(['ghci']), c_src], compile_and_run, ['UnliftedNewtypesByteArrayOffset_c.c'])
 
-test('T17471', [omit_ways(['ghci']), js_skip_csources], compile_and_run,
+test('T17471', [omit_ways(['ghci']), c_src], compile_and_run,
      ['T17471_c.c -optc-D -optcFOO'])
 
 test('IncallAffinity',
@@ -240,7 +240,7 @@ test('IncallAffinity',
      compile_and_run,
      ['IncallAffinity_c.c -no-hs-main'])
 
-test('T19237', js_skip_csources, compile_and_run, ['T19237_c.c'])
+test('T19237', c_src, compile_and_run, ['T19237_c.c'])
 
 test('T21305', [cmm_src,omit_ways(['ghci'])], multi_compile_and_run,
                  ['T21305', [('T21305_cmm.cmm', '')], ''])


=====================================
testsuite/tests/generics/all.T
=====================================
@@ -20,9 +20,9 @@ test('GenCannotDoRep1_8', normal, compile_fail, [''])
 test('GFullyStrict', normal, compile_and_run, [''])
 
 test('T5462Yes1', [extra_files(['GEnum/', 'GEq/', 'GFunctor/']),
-                   outputdir('out_T5462Yes1'), js_skip_csources]
+                   outputdir('out_T5462Yes1'), c_src]
     , multimod_compile_and_run, ['T5462Yes1', '-iGEq -iGEnum -iGFunctor'])
-test('T5462Yes2', [extra_files(['GFunctor/']), outputdir('out_T5462Yes2'), js_skip_csources]
+test('T5462Yes2', [extra_files(['GFunctor/']), outputdir('out_T5462Yes2'), c_src]
     , multimod_compile_and_run, ['T5462Yes2', '-iGFunctor'])
 test('T5462No1', [extra_files(['GFunctor/']), outputdir('out_T5462No1')]
     , multimod_compile_fail, ['T5462No1', '-iGFunctor'])


=====================================
testsuite/tests/rep-poly/all.T
=====================================
@@ -40,9 +40,9 @@ test('RepPolyArgument', normal, compile_fail, [''])
 test('RepPolyArrowCmd', normal, compile_fail, [''])
 test('RepPolyArrowFun', normal, compile_fail, [''])
 test('RepPolyBackpack1', normal, backpack_compile_fail, [''])
-test('RepPolyBackpack2', js_skip_csources, backpack_run, [''])
+test('RepPolyBackpack2', c_src, backpack_run, [''])
 test('RepPolyBackpack3', normal, backpack_compile_fail, [''])
-test('RepPolyBackpack4', js_skip_csources, backpack_run, [''])
+test('RepPolyBackpack4', c_src, backpack_run, [''])
 test('RepPolyBackpack5', normal, backpack_run, [''])
 test('RepPolyBinder', normal, compile_fail, [''])
 test('RepPolyCase1', normal, compile_fail, [''])


=====================================
testsuite/tests/rts/all.T
=====================================
@@ -257,7 +257,7 @@ test('T7037', [], makefile_test, ['T7037'])
 test('T7087', exit_code(1), compile_and_run, [''])
 test('T7160', omit_ways(['nonmoving_thr', 'nonmoving_thr_ghc']), compile_and_run, [''])
 
-test('T7040', [omit_ways(['ghci']), js_skip_csources], compile_and_run, ['T7040_c.c'])
+test('T7040', [omit_ways(['ghci']), c_src], compile_and_run, ['T7040_c.c'])
 
 test('T7040_ghci',
      [extra_files(['T7040_c.h']),
@@ -377,7 +377,7 @@ test('T10590', [ ignore_stderr
                ], compile_and_run, [''])
 
 # 20000 was easily enough to trigger the bug with 7.10
-test('T10904', [ omit_ways(['ghci']), extra_run_opts('20000'), js_skip_csources ],
+test('T10904', [ omit_ways(['ghci']), extra_run_opts('20000'), c_src ],
                compile_and_run, ['T10904lib.c'])
 
 test('T10728', [extra_run_opts('+RTS -maxN3 -RTS'), only_ways(['threaded2'])],
@@ -474,10 +474,10 @@ test('keep-cafs',
 
 # Test proper functioning of C++ exceptions within a C++ program.
 # On darwin, this requires -fcompact-unwind.
-test('T11829', [ check_errmsg("This is a test"), js_skip_csources], compile_and_run,
+test('T11829', [ check_errmsg("This is a test"), c_src], compile_and_run,
      ['T11829_c.cpp -package system-cxx-std-lib'])
 
-test('T16514', js_skip_csources, compile_and_run, ['T16514_c.c'])
+test('T16514', c_src, compile_and_run, ['T16514_c.c'])
 test('test-zeroongc', extra_run_opts('-DZ'), compile_and_run, ['-debug'])
 
 test('T13676',


=====================================
testsuite/tests/rts/linker/T11223/all.T
=====================================
@@ -15,13 +15,13 @@ def normalise_duplicate_errmsg( msg ):
 test('T11223_simple_link',
      [extra_files(['foo.c', 'foo.hs']),
       when(ghc_dynamic(), skip),
-      js_skip_csources],
+      c_src],
      makefile_test, ['t_11223_simple_link'])
 
 test('T11223_simple_link_lib',
      [extra_files(['foo.c', 'foo.hs']),
       when(ghc_dynamic(), skip),
-      js_skip_csources],
+      c_src],
      makefile_test, ['t_11223_simple_link_lib'])
 
 # I'm ignoring the output since for this particular invocation normalise_errmsg
@@ -35,37 +35,37 @@ test('T11223_simple_duplicate_lib',
      [extra_files(['bar.c', 'foo.c', 'foo.hs']),
       when(platform('i386-unknown-mingw32'), expect_broken(13515)),
       when(ghc_dynamic(), skip), normalise_errmsg_fun(normalise_duplicate_errmsg),
-      js_skip_csources],
+      c_src],
      makefile_test, ['t_11223_simple_duplicate_lib'])
 
 test('T11223_simple_unused_duplicate_lib',
      [extra_files(['bar.c', 'foo.c', 'foo.hs']),
       when(ghc_dynamic(), skip),
-      js_skip_csources],
+      c_src],
      makefile_test, ['t_11223_simple_unused_duplicate_lib'])
 
 test('T11223_link_order_a_b_succeed',
      [extra_files(['bar.c', 'foo.c', 'foo2.hs']),
       when(ghc_dynamic(), skip),
-      js_skip_csources],
+      c_src],
      makefile_test, ['t_11223_link_order_a_b_succeed'])
 
 test('T11223_link_order_b_a_succeed',
      [extra_files(['bar.c', 'foo.c', 'foo2.hs']),
       when(ghc_dynamic(), skip),
-      js_skip_csources],
+      c_src],
      makefile_test, ['t_11223_link_order_b_a_succeed'])
 
 test('T11223_link_order_a_b_2_fail',
      [extra_files(['bar.c', 'foo.c', 'foo3.hs']),
       when(ghc_dynamic(), skip), normalise_errmsg_fun(normalise_duplicate_errmsg),
-      js_skip_csources],
+      c_src],
      makefile_test, ['t_11223_link_order_a_b_2_fail'])
 
 test('T11223_link_order_b_a_2_succeed',
      [extra_files(['bar.c', 'foo.c', 'foo3.hs']),
       when(ghc_dynamic(), skip),
-      js_skip_csources],
+      c_src],
      makefile_test, ['t_11223_link_order_b_a_2_succeed'])
 
 # Weak Symbols are not currently implemented. So Disable all the tests



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/afb397e9edd5445a3ffe48b523f620b7690cf156
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/20221019/da1384b0/attachment-0001.html>


More information about the ghc-commits mailing list