diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index dbdd1f3e30ae8f11a32b3563072b093f9d647f2b..788b0dd1d7f5be0e832ee77ecaeb113a7f9d69e5 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -334,6 +334,20 @@ def req_th( name, opts ): if ghc_dynamic(): return _omit_ways(name, opts, ['profasm', 'profthreaded']) +def req_plugins( name, opts ): + """ + Mark a test as requiring GHC plugins. In additional to having + interpreter support, currently we don't run the test for cross + GHCs, since plugin support for cross GHC (!7377) is unfinished + work (#14335) and completely untested in CI, and we don't enable + the internal-interpreter flag for the ghc library for cross GHC + anyway. + """ + req_interp(name, opts) + + if config.cross: + opts.skip = True + def req_ghc_smp( name, opts ): """ Mark a test as requiring GHC to be linked with an RTS that supports smp. diff --git a/testsuite/tests/plugins/all.T b/testsuite/tests/plugins/all.T index a78e377629ed15416793e21a813d14bbb468d82f..a7bad499350aef9da6599e661bae69afdb2e952c 100644 --- a/testsuite/tests/plugins/all.T +++ b/testsuite/tests/plugins/all.T @@ -1,5 +1,5 @@ setTestOpts([ - req_interp, + req_plugins, # Plugins aren't supported with the JS backend so we get unexpected passes # for tests that expected to fail... Just skipping them for now until #14335 # is fixed diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index 9eb66c4f5eac2be51432139056e9115c6e4b56a4..a7db56ddf9bb13d02cc27897f81406ed888cfd50 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -156,7 +156,7 @@ test('T7702', # allocation done by the plugin... but a regression allocates > 90mb collect_compiler_stats('peak_megabytes_allocated',70), when(opsys('mingw32'), [multi_cpu_race]), - req_interp + req_plugins ], compile, ['-v0 -package-db T7702plugin/pkg.T7702/local.package.conf -fplugin T7702Plugin -package T7702plugin ' + config.plugin_way_flags]) diff --git a/testsuite/tests/tcplugins/all.T b/testsuite/tests/tcplugins/all.T index cf496e4198708308964e81ba23028673cad0e8be..9ccb224ef933bf31144ef85b5b272e50c9d2fa79 100644 --- a/testsuite/tests/tcplugins/all.T +++ b/testsuite/tests/tcplugins/all.T @@ -1,4 +1,7 @@ -setTestOpts(js_broken(22261)) +setTestOpts([ + req_plugins, + js_broken(22261) +]) # See NullaryPlugin.hs for a description of this plugin. test('TcPlugin_Nullary' diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 5057c4d7e4de14244c91dc0ff4aee5f1b01db9ce..4a4bafc97e337969e7d0364039a58c297eae0d51 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -500,7 +500,7 @@ test('T10592', normal, compile, ['']) test('T11305', normal, compile, ['']) test('T11254', normal, compile, ['']) test('T11379', normal, compile, ['']) -test('T11462', [js_broken(22261), req_th], multi_compile, +test('T11462', [js_broken(22261), req_th, req_plugins], multi_compile, [None, [('T11462_Plugin.hs', '-package ghc'), ('T11462.hs', '')], '-dynamic' if have_dynamic() else '']) test('T11480', normal, compile, ['']) @@ -568,7 +568,7 @@ test('T11723', normal, compile, ['']) test('T12987', normal, compile, ['']) test('T11736', normal, compile, ['']) test('T13248', expect_broken(13248), compile, ['']) -test('T11525', [js_broken(22261), req_th], multi_compile, +test('T11525', [js_broken(22261), req_th, req_plugins], multi_compile, [None, [('T11525_Plugin.hs', '-package ghc'), ('T11525.hs', '')], '-dynamic' if have_dynamic() else '']) test('T12923_1', normal, compile, ['']) @@ -934,4 +934,3 @@ test('T25125', normal, compile, ['']) test('T24845a', normal, compile, ['']) test('T23501a', normal, compile, ['']) test('T23501b', normal, compile, ['']) -