plugins10 no longer broken
[ghc.git] / testsuite / tests / plugins / all.T
1 setTestOpts(req_interp)
2
3 # The implementation of ghc-pkg doesn't seem to be multi-concurrent process safe
4 # on windows. These tests which mutate the package db need to be run
5 # sequentially until this is fixed.  This likely means that #13194 isn't fully
6 # solved.  See also #15313.
7
8 test('plugins01',
9      [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]),
10      when(opsys('mingw32'), multi_cpu_race),
11       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins01 TOP={top}')],
12      run_command, ['$MAKE -s --no-print-directory plugins01'])
13
14 test('plugins02',
15      [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]),
16      when(opsys('mingw32'), multi_cpu_race),
17       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins02 TOP={top}')],
18      compile_fail,
19      ['-package-db simple-plugin/pkg.plugins02/local.package.conf -fplugin Simple.BadlyTypedPlugin -package simple-plugin ' + config.plugin_way_flags])
20
21 test('plugins03',
22      [extra_files(['simple-plugin/']), only_ways([config.ghc_plugin_way]),
23      when(opsys('mingw32'), multi_cpu_race),
24       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins03 TOP={top}')],
25      compile_fail,
26      ['-package-db simple-plugin/pkg.plugins03/local.package.conf -fplugin Simple.NonExistentPlugin -package simple-plugin'])
27
28 test('plugins04', [extra_files(['HomePackagePlugin.hs']),
29                    only_ways([config.ghc_plugin_way]),
30                    when(opsys('mingw32'), multi_cpu_race)],
31      multimod_compile_fail,
32      ['plugins04', '-package ghc -fplugin HomePackagePlugin'])
33
34 test('plugins05', [extra_files(['HomePackagePlugin.hs']),
35                    when(opsys('mingw32'), multi_cpu_race),
36                    only_ways([config.ghc_plugin_way])],
37      multimod_compile_and_run, ['plugins05', '-package ghc'])
38
39 test('plugins06',
40      [extra_files(['LinkerTicklingPlugin.hs']),
41       when(opsys('mingw32'), multi_cpu_race),
42       unless(have_dynamic(), skip),
43       only_ways([config.ghc_plugin_way])],
44      multimod_compile_and_run, ['plugins06', '-package ghc'])
45
46 test('plugins07',
47      [extra_files(['rule-defining-plugin/']),
48       when(opsys('mingw32'), multi_cpu_race),
49       only_ways([config.ghc_plugin_way]),
50       pre_cmd('$MAKE -s --no-print-directory -C rule-defining-plugin package.plugins07 TOP={top}')],
51      run_command, ['$MAKE -s --no-print-directory plugins07'])
52
53 test('plugins08',
54      [extra_files(['simple-plugin/']),
55       when(opsys('mingw32'), multi_cpu_race),
56       only_ways([config.ghc_plugin_way]),
57       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins08 TOP={top}')],
58      run_command, ['$MAKE -s --no-print-directory plugins08'])
59
60 test('plugins09',
61      [extra_files(['simple-plugin/']),
62       when(opsys('mingw32'), multi_cpu_race),
63       only_ways([config.ghc_plugin_way]),
64       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins09 TOP={top}')],
65      run_command, ['$MAKE -s --no-print-directory plugins09'])
66
67 test('plugins10',
68      [extra_files(['simple-plugin/', 'QuasiQuotation.hs']),
69       when(opsys('mingw32'), multi_cpu_race),
70       only_ways([config.ghc_plugin_way]),
71       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins10 TOP={top}')],
72      run_command, ['$MAKE -s --no-print-directory plugins10'])
73
74 test('plugins11',
75      [extra_files(['simple-plugin/']),
76       when(opsys('mingw32'), multi_cpu_race),
77       only_ways([config.ghc_plugin_way]),
78       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins11 TOP={top}')],
79      run_command, ['$MAKE -s --no-print-directory plugins11'])
80
81 test('plugins12',
82      [extra_files(['simple-plugin/']),
83       when(opsys('mingw32'), multi_cpu_race),
84       only_ways([config.ghc_plugin_way]),
85       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins12 TOP={top}')],
86      run_command, ['$MAKE -s --no-print-directory plugins12'])
87
88 test('plugins13',
89      [extra_files(['simple-plugin/', 'PluginFilteredExport.hs']),
90       when(opsys('mingw32'), multi_cpu_race),
91       only_ways([config.ghc_plugin_way]),
92       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins13 TOP={top}')],
93      run_command, ['$MAKE -s --no-print-directory plugins13'])
94
95 test('plugins14',
96      [extra_files(['simple-plugin/']),
97       when(opsys('mingw32'), multi_cpu_race),
98       only_ways([config.ghc_plugin_way]),
99       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins14 TOP={top}')],
100      run_command, ['$MAKE -s --no-print-directory plugins14'])
101
102 test('plugins15',
103      [extra_files(['simple-plugin/', 'MetaRemoveHelper.hs']),
104       when(opsys('mingw32'), multi_cpu_race),
105       only_ways([config.ghc_plugin_way]),
106       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins15 TOP={top}')],
107      run_command, ['$MAKE -s --no-print-directory plugins15'])
108
109 test('T10420',
110      [extra_files(['rule-defining-plugin/']),
111       when(opsys('mingw32'), multi_cpu_race),
112       only_ways([config.ghc_plugin_way]),
113       pre_cmd('$MAKE -s --no-print-directory -C rule-defining-plugin package.T10420 TOP={top}')],
114      run_command, ['$MAKE -s --no-print-directory T10420'])
115
116 test('T10294',
117      [extra_files(['annotation-plugin/']),
118       when(opsys('mingw32'), multi_cpu_race),
119       only_ways([config.ghc_plugin_way]),
120       pre_cmd('$MAKE -s --no-print-directory -C annotation-plugin package.T10294 TOP={top}')],
121      run_command, ['$MAKE -s --no-print-directory T10294'])
122
123 test('T10294a',
124      [extra_files(['annotation-plugin/']),
125       when(opsys('mingw32'), multi_cpu_race),
126       only_ways([config.ghc_plugin_way]),
127       pre_cmd('$MAKE -s --no-print-directory -C annotation-plugin package.T10294a TOP={top}')],
128      run_command, ['$MAKE -s --no-print-directory T10294a'])
129
130 test('frontend01', [extra_files(['FrontendPlugin.hs']),
131                     only_ways([config.ghc_plugin_way]),
132                     when(opsys('mingw32'), multi_cpu_race),
133                     unless(have_dynamic(), expect_broken(10301))], run_command,
134      ['$MAKE -s --no-print-directory frontend01'])
135
136 test('T11244',
137      [extra_files(['rule-defining-plugin/']),
138       only_ways([config.ghc_plugin_way]),
139       pre_cmd('$MAKE -s --no-print-directory -C rule-defining-plugin package.T11244 TOP={top}')],
140      run_command, ['$MAKE -s --no-print-directory T11244'])
141
142 test('T12567a',
143      [extra_files(['T12567b.hs', 'simple-plugin/']),
144       when(opsys('mingw32'), multi_cpu_race),
145       only_ways([config.ghc_plugin_way]),
146       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.T12567a TOP={top}')],
147      run_command, ['$MAKE -s --no-print-directory T12567a'])
148
149 test('T14335',
150      [extra_files(['simple-plugin/', 'plugins01.hs']),
151       when(opsys('mingw32'), multi_cpu_race),
152       only_ways([config.ghc_plugin_way]),
153       pre_cmd('$MAKE -s --no-print-directory -C simple-plugin package.plugins01 TOP={top}')],
154      compile_fail,
155      ['-package-db simple-plugin/pkg.plugins01/local.package.conf -fplugin Simple.Plugin \
156        -fexternal-interpreter -package simple-plugin ' + config.plugin_way_flags])
157
158 test('plugin-recomp-pure',
159      [extra_files(['plugin-recomp/', 'plugin-recomp-test.hs']),
160       when(opsys('mingw32'), multi_cpu_race),
161       only_ways([config.ghc_plugin_way]),
162       pre_cmd('$MAKE -s --no-print-directory -C plugin-recomp package.plugins01 TOP={top}')
163       ],
164      run_command, ['$MAKE -s --no-print-directory plugin-recomp-pure'])
165
166 test('plugin-recomp-impure',
167      [extra_files(['plugin-recomp/', 'plugin-recomp-test.hs']),
168       when(opsys('mingw32'), multi_cpu_race),
169       only_ways([config.ghc_plugin_way]),
170       pre_cmd('$MAKE -s --no-print-directory -C plugin-recomp package.plugins01 TOP={top}')
171       ],
172      run_command, ['$MAKE -s --no-print-directory plugin-recomp-impure'])
173
174 test('plugin-recomp-flags',
175      [extra_files(['plugin-recomp/', 'plugin-recomp-test.hs']),
176       when(opsys('mingw32'), multi_cpu_race),
177       only_ways([config.ghc_plugin_way]),
178       pre_cmd('$MAKE -s --no-print-directory -C plugin-recomp package.plugins01 TOP={top}')
179       ],
180      run_command, ['$MAKE -s --no-print-directory plugin-recomp-flags'])
181
182 test('plugin-recomp-change',
183      [extra_files(['plugin-recomp/', 'plugin-recomp-test.hs']),
184       only_ways([config.ghc_plugin_way]),
185       pre_cmd('$MAKE -s --no-print-directory -C plugin-recomp package.plugins01 TOP={top}')
186       ],
187      run_command, ['$MAKE -s --no-print-directory plugin-recomp-change'])
188
189 test('plugin-recomp-change-prof',
190      [extra_files(['plugin-recomp/', 'plugin-recomp-test.hs']),
191       only_ways([config.ghc_plugin_way]),
192       pre_cmd('$MAKE -s --no-print-directory -C plugin-recomp package.plugins01 TOP={top}'),
193       when(not config.have_profiling,skip)
194       ],
195      run_command, ['$MAKE -s --no-print-directory plugin-recomp-change-prof'])