diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2022-10-19 15:44:54 +0200 |
---|---|---|
committer | Sylvain Henry <sylvain@haskus.fr> | 2022-10-26 09:32:20 +0200 |
commit | 9ab31f42da8796363187e387c4085e8c9197f4e5 (patch) | |
tree | 6e3ea5351a597680b5a01838a7e9d191a8fa576f /testsuite/tests/ffi | |
parent | 0270cc54481bef9630274e77c2750940c1a4eff5 (diff) | |
download | haskell-9ab31f42da8796363187e387c4085e8c9197f4e5.tar.gz |
Testsuite: more precise test options
Necessary for newer cross-compiling backends (JS, Wasm) that don't
support TH yet.
Diffstat (limited to 'testsuite/tests/ffi')
-rw-r--r-- | testsuite/tests/ffi/should_compile/all.T | 3 | ||||
-rw-r--r-- | testsuite/tests/ffi/should_fail/all.T | 4 | ||||
-rw-r--r-- | testsuite/tests/ffi/should_run/all.T | 62 |
3 files changed, 35 insertions, 34 deletions
diff --git a/testsuite/tests/ffi/should_compile/all.T b/testsuite/tests/ffi/should_compile/all.T index cf7f9502e9..d8afeb9f7b 100644 --- a/testsuite/tests/ffi/should_compile/all.T +++ b/testsuite/tests/ffi/should_compile/all.T @@ -35,8 +35,7 @@ test('T11983', [omit_ways(['ghci'])], compile, ['T11983.c']) test('T14125', normal, compile, ['']) test( 'cc017', - # We need TH but can't load profiled dynamic objects - when(ghc_dynamic(), omit_ways(['profasm'])), + req_th, compile, [ '-optc=-DC -optcxx=-DCXX -optcxx=-std=c++11' diff --git a/testsuite/tests/ffi/should_fail/all.T b/testsuite/tests/ffi/should_fail/all.T index 9080282782..648af796c2 100644 --- a/testsuite/tests/ffi/should_fail/all.T +++ b/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', normal, compile_fail, ['']) +test('capi_value_function', req_c, compile_fail, ['']) test('NonreducingFfiSignature', normal, compile_fail, ['']) test('T5664', normal, compile_fail, ['-v0']) test('T7506', normal, compile_fail, ['']) @@ -23,7 +23,7 @@ test('T21305_fail', normal, compile_fail, ['']) # from an unsafe foreign function) and only makes sense in non-threaded way # (threaded runtime will hang). See #14912. test('UnsafeReenter', - [omit_ways(threaded_ways), exit_code(1)], + [omit_ways(threaded_ways), exit_code(1), req_c], compile_and_run, ['UnsafeReenterC.c']) diff --git a/testsuite/tests/ffi/should_run/all.T b/testsuite/tests/ffi/should_run/all.T index 79783c4776..da98a5ff6b 100644 --- a/testsuite/tests/ffi/should_run/all.T +++ b/testsuite/tests/ffi/should_run/all.T @@ -30,7 +30,8 @@ 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)), - exit_code(3) ], + exit_code(3), + req_c ], compile_and_run, ['ffi005_c.c']) test('ffi006', normal, compile_and_run, ['']) @@ -72,14 +73,14 @@ 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'])], compile_and_run, ['ffi015_cbits.c']) +test('ffi015', [req_c,omit_ways(['ghci'])], compile_and_run, ['ffi015_cbits.c']) # GHCi can't handle foreign import "&" test('ffi016', omit_ways(['ghci']), compile_and_run, ['']) test('ffi017', normal, compile_and_run, ['']) -test('ffi018', [omit_ways(['ghci'])], compile_and_run, ['ffi018_c.c']) +test('ffi018', [req_c,omit_ways(['ghci'])], compile_and_run, ['ffi018_c.c']) test('ffi018_ghci', [extra_files(['ffi018.h']), @@ -93,14 +94,14 @@ test('ffi019', normal, 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'])], compile_and_run, ['T1288_c.c']) +test('T1288', [omit_ways(['ghci']), req_c], 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'])], compile_and_run, ['T2276_c.c']) +test('T2276', [omit_ways(['ghci']), req_c], 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') ], @@ -108,12 +109,12 @@ test('T2276_ghci', [ only_ways(['ghci']), test('T2469', normal, compile_and_run, ['-optc-std=gnu99']) -test('T2594', [omit_ways(['ghci'])], compile_and_run, ['T2594_c.c']) +test('T2594', [omit_ways(['ghci']), req_c], compile_and_run, ['T2594_c.c']) -test('fptr01', [omit_ways(['ghci'])], compile_and_run, ['fptr01_c.c']) +test('fptr01', [omit_ways(['ghci']), req_c], compile_and_run, ['fptr01_c.c']) test('fptr02', normal, compile_and_run, ['']) -test('fptrfail01', [omit_ways(['ghci']), exit_code(1)], compile_and_run, +test('fptrfail01', [omit_ways(['ghci']), exit_code(1), req_c], compile_and_run, ['fptrfail01_c.c']) test('T2917a', normal, compile_and_run, ['']) @@ -135,7 +136,7 @@ else: flagsForT4038 = [''] test('T4038', normal, compile_and_run, flagsForT4038) -test('T4221', [omit_ways(['ghci'])], compile_and_run, ['T4221_c.c']) +test('T4221', [omit_ways(['ghci']),req_c], compile_and_run, ['T4221_c.c']) test('T5402', [ omit_ways(['ghci']), exit_code(42), @@ -158,10 +159,10 @@ 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'])], compile_and_run, +test('ffi_parsing_001', [omit_ways(['ghci']), req_c], compile_and_run, ['ffi_parsing_001_c.c']) -test('capi_value', [omit_ways(['ghci'])], compile_and_run, ['capi_value_c.c']) +test('capi_value', [omit_ways(['ghci']), req_c], compile_and_run, ['capi_value_c.c']) test('T7170', [when(opsys('mingw32'), fragile(16801)), @@ -171,7 +172,7 @@ test('T7170', test('T4012', [expect_broken_for(7388, ['ghci'])], multimod_compile_and_run, ['T4012', '']) -test('T8083', [omit_ways(['ghci'])], compile_and_run, ['T8083_c.c']) +test('T8083', [omit_ways(['ghci']), req_c], compile_and_run, ['T8083_c.c']) test('T9274', [omit_ways(['ghci'])], compile_and_run, ['']) @@ -183,45 +184,46 @@ test('ffi023', [ omit_ways(['ghci']), # needs it. compile_and_run, ['ffi023_c.c']) -test('T12134', [omit_ways(['ghci'])], compile_and_run, ['T12134_c.c']) +test('T12134', [omit_ways(['ghci']), req_c], compile_and_run, ['T12134_c.c']) -test('T12614', [omit_ways(['ghci'])], compile_and_run, ['T12614_c.c']) +test('T12614', [omit_ways(['ghci']), req_c], compile_and_run, ['T12614_c.c']) -test('T14624', [omit_ways(['ghci'])], compile_and_run, ['T14624_c.c']) +test('T14624', [omit_ways(['ghci']), req_c], compile_and_run, ['T14624_c.c']) -test('T15933', extra_files(['T15933_c.c', 'T15933.h']), makefile_test, ['T15933']) +test('T15933', [extra_files(['T15933_c.c', 'T15933.h']), req_c], makefile_test, ['T15933']) -test('T16650a', [omit_ways(['ghci'])], compile_and_run, ['T16650a_c.c']) +test('T16650a', [omit_ways(['ghci']), req_c], compile_and_run, ['T16650a_c.c']) -test('T16650b', [omit_ways(['ghci'])], compile_and_run, ['T16650b_c.c']) +test('T16650b', [omit_ways(['ghci']), req_c], compile_and_run, ['T16650b_c.c']) -test('T16650c', [omit_ways(['ghci'])], compile_and_run, ['T16650c_c.c']) +test('T16650c', [omit_ways(['ghci']), req_c], compile_and_run, ['T16650c_c.c']) -test('T16650d', [omit_ways(['ghci'])], compile_and_run, ['T16650d_c.c']) +test('T16650d', [omit_ways(['ghci']), req_c], compile_and_run, ['T16650d_c.c']) -test('PrimFFIInt8', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIInt8_c.c']) +test('PrimFFIInt8', [omit_ways(['ghci']), req_c], compile_and_run, ['PrimFFIInt8_c.c']) -test('PrimFFIWord8', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIWord8_c.c']) +test('PrimFFIWord8', [omit_ways(['ghci']), req_c], compile_and_run, ['PrimFFIWord8_c.c']) -test('PrimFFIInt16', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIInt16_c.c']) +test('PrimFFIInt16', [omit_ways(['ghci']), req_c], compile_and_run, ['PrimFFIInt16_c.c']) -test('PrimFFIWord16', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIWord16_c.c']) +test('PrimFFIWord16', [omit_ways(['ghci']), req_c], compile_and_run, ['PrimFFIWord16_c.c']) -test('PrimFFIInt32', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIInt32_c.c']) +test('PrimFFIInt32', [omit_ways(['ghci']), req_c], compile_and_run, ['PrimFFIInt32_c.c']) -test('PrimFFIWord32', [omit_ways(['ghci'])], compile_and_run, ['PrimFFIWord32_c.c']) +test('PrimFFIWord32', [omit_ways(['ghci']), req_c], compile_and_run, ['PrimFFIWord32_c.c']) -test('T493', [omit_ways(['ghci'])], compile_and_run, ['T493_c.c']) +test('T493', [omit_ways(['ghci']), req_c], compile_and_run, ['T493_c.c']) -test('UnliftedNewtypesByteArrayOffset', [omit_ways(['ghci'])], compile_and_run, ['UnliftedNewtypesByteArrayOffset_c.c']) +test('UnliftedNewtypesByteArrayOffset', [omit_ways(['ghci']), req_c], compile_and_run, ['UnliftedNewtypesByteArrayOffset_c.c']) -test('T17471', [omit_ways(['ghci'])], compile_and_run, +test('T17471', [omit_ways(['ghci']), req_c], compile_and_run, ['T17471_c.c -optc-D -optcFOO']) test('IncallAffinity', [req_smp, only_ways(['threaded1', 'threaded2']), # Unregisterised build doesn't support - when(unregisterised(), skip)], + when(unregisterised(), skip), + req_c], compile_and_run, ['IncallAffinity_c.c -no-hs-main']) |