all.T 1.94 KB
Newer Older
1
def f(name, opts):
2 3
    if (ghc_with_interpreter == 0):
        opts.skip = 1
batterseapower's avatar
batterseapower committed
4 5

setTestOpts(f)
6
setTestOpts(when(compiler_lt('ghc', '7.1'), skip))
batterseapower's avatar
batterseapower committed
7

8 9 10 11 12 13 14 15 16
test('plugins01',
     [pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins01'),
      clean_cmd('$MAKE -s --no-print-directory -C simple-plugin clean.plugins01')],
     run_command,
     ['$MAKE -s --no-print-directory plugins01'])
test('plugins02',
     [pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins02'),
      clean_cmd('$MAKE -s --no-print-directory -C simple-plugin clean.plugins02')],
     compile_fail,
17
     ['-package-db simple-plugin/pkg.plugins02/local.package.conf -fplugin Simple.BadlyTypedPlugin -package simple-plugin ' + config.ghci_way_flags])
18 19 20 21 22 23 24 25 26 27 28

test('plugins03',
     [pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins03'),
      clean_cmd('$MAKE -s --no-print-directory -C simple-plugin clean.plugins03')],
     compile_fail,
     ['-package-db simple-plugin/pkg.plugins03/local.package.conf -fplugin Simple.NonExistantPlugin -package simple-plugin'])

test('plugins04',
     extra_clean(['HomePackagePlugin.hi', 'HomePackagePlugin.o']),
     multimod_compile_fail,
     ['plugins04', '-package ghc -fplugin HomePackagePlugin'])
batterseapower's avatar
batterseapower committed
29

30 31
test('plugins05',
     [ extra_clean(['HomePackagePlugin.hi', 'HomePackagePlugin.o']),
ian@well-typed.com's avatar
ian@well-typed.com committed
32
       only_ways([config.ghc_plugin_way]) ],
33
     multimod_compile_and_run, ['plugins05', '-package ghc'])
batterseapower's avatar
batterseapower committed
34

35 36
test('plugins06',
     [ extra_clean(['LinkerTicklingPlugin.hi', 'LinkerTicklingPlugin.o']),
37
       unless(have_dynamic(),skip),
ian@well-typed.com's avatar
ian@well-typed.com committed
38
       only_ways([config.ghc_plugin_way]) ],
39
     multimod_compile_and_run, ['plugins06', '-package ghc'])
40

41 42 43 44 45 46
test('plugins07',
     [pre_cmd('$MAKE -s --no-print-directory -C rule-defining-plugin package.plugins07'),
      clean_cmd('$MAKE -s --no-print-directory -C rule-defining-plugin clean.plugins07'),
      expect_broken(10420)],
     run_command,
     ['$MAKE -s --no-print-directory plugins07'])