Fold ghc-prim.git into ghc.git (re #8545)
[ghc.git] / testsuite / tests / plugins / all.T
1 def f(name, opts):
2   if (ghc_with_interpreter == 0):
3         opts.skip = 1
4
5 setTestOpts(f)
6 setTestOpts(when(compiler_lt('ghc', '7.1'), skip))
7
8 test('plugins01',
9      [pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins01'),
10       clean_cmd('$MAKE -s --no-print-directory -C simple-plugin clean.plugins01')],
11      run_command,
12      ['$MAKE -s --no-print-directory plugins01'])
13 test('plugins02',
14      [pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins02'),
15       clean_cmd('$MAKE -s --no-print-directory -C simple-plugin clean.plugins02')],
16      compile_fail,
17      ['-package-db simple-plugin/pkg.plugins02/local.package.conf -fplugin Simple.BadlyTypedPlugin -package simple-plugin ' + config.ghci_way_flags])
18
19 test('plugins03',
20      [pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins03'),
21       clean_cmd('$MAKE -s --no-print-directory -C simple-plugin clean.plugins03')],
22      compile_fail,
23      ['-package-db simple-plugin/pkg.plugins03/local.package.conf -fplugin Simple.NonExistantPlugin -package simple-plugin'])
24
25 test('plugins04',
26      extra_clean(['HomePackagePlugin.hi', 'HomePackagePlugin.o']),
27      multimod_compile_fail,
28      ['plugins04', '-package ghc -fplugin HomePackagePlugin'])
29
30 test('plugins05',
31      [ extra_clean(['HomePackagePlugin.hi', 'HomePackagePlugin.o']),
32        only_ways([config.ghc_plugin_way]) ],
33      multimod_compile_and_run, ['plugins05', '-package ghc'])
34
35 test('plugins06',
36      [ extra_clean(['LinkerTicklingPlugin.hi', 'LinkerTicklingPlugin.o']),
37        unless(have_dynamic(),skip),
38        only_ways([config.ghc_plugin_way]) ],
39      multimod_compile_and_run, ['plugins06', '-package ghc'])
40