tests: remove extra_files.py (#12223)
[ghc.git] / libraries / base / tests / all.T
1
2 test('readFloat', exit_code(1), compile_and_run, [''])
3 test('enumDouble', normal, compile_and_run, [''])
4 test('enumRatio', normal, compile_and_run, [''])
5 test('tempfiles', normal, compile_and_run, [''])
6 test('fixed', normal, compile_and_run, [''])
7 test('quotOverflow', normal, compile_and_run, [''])
8 test('assert', exit_code(1), compile_and_run, ['-fno-ignore-asserts'])
9 test('CPUTime001', normal, compile_and_run, [''])
10 test('readLitChar',   normal, compile_and_run, [''])
11 test('unicode001',
12      when(platform('i386-unknown-openbsd'), expect_fail),
13      compile_and_run,
14      [''])
15 test('unicode002',
16      when(platform('i386-unknown-openbsd'), expect_fail),
17      compile_and_run,
18      [''])
19 test('data-fixed-show-read', normal, compile_and_run, [''])
20 test('showDouble', normal, compile_and_run, [''])
21 test('readDouble001', normal, compile_and_run, [''])
22 test('readInteger001', normal, compile_and_run, [''])
23 test('readFixed001', normal, compile_and_run, [''])
24 test('lex001', normal, compile_and_run, [''])
25 test('take001', extra_run_opts('1'), compile_and_run, [''])
26 test('inits', normal, compile_and_run, [''])
27 test('genericNegative001', extra_run_opts('-1'), compile_and_run, [''])
28 test('ix001', normal, compile_and_run, [''])
29
30 # need to add -K64m to the compiler opts, so that GHCi gets it too
31 test('ioref001',
32      [when(fast(), skip),extra_run_opts('+RTS -K64m -RTS')],
33      compile_and_run,
34      ['+RTS -K64m -RTS'])
35
36 test('echo001', set_stdin("echo001.hs"), compile_and_run, [''])
37
38 test('hTell001', normal, compile_and_run, [''])
39
40 test('hTell002', normal, compile_and_run, [''])
41
42 test('performGC001', normal, compile_and_run, [''])
43
44 # optimisation screws up this test because some of the traces get commoned up
45 test('trace001', normal, compile_and_run, [''])
46
47 test('hGetBuf002', normal, compile_and_run, [''])
48 test('hGetBuf003', normal, compile_and_run, [''])
49 test('hPutBuf001', normal, compile_and_run, [''])
50 test('hPutBuf002', [], compile_and_run, [''])
51
52 test('char001',         normal, compile_and_run, [''])
53 test('char002',         normal, compile_and_run, [''])
54
55 test('cstring001',      normal, compile_and_run, [''])
56
57 test('length001',
58      # length001 depends on a RULE being applied, and without -O takes
59      # excessive amounts of stack space. So we specifically set a low
60      # stack limit and mark it as failing under a few conditions.
61      [extra_run_opts('+RTS -K8m -RTS'),
62      expect_fail_for(['normal', 'threaded1', 'llvm'])],
63      compile_and_run, [''])
64
65 test('ratio001',        normal, compile_and_run, [''])
66
67 test('rand001',         reqlib('random'), compile_and_run, [''])
68 test('reads001',                normal, compile_and_run, [''])
69 test('show001',         normal, compile_and_run, [''])
70 test('text001',         normal, compile_and_run, [''])
71
72 test('tup001',          normal, compile_and_run, [''])
73
74 test('addr001',         normal, compile_and_run, [''])
75 test('dynamic001',      normal, compile_and_run, [''])
76 test('dynamic002',      normal, compile_and_run, [''])
77 test('dynamic003',      extra_run_opts('+RTS -K32m -RTS'), compile_and_run, [''])
78 test('dynamic004',      omit_ways(['normal', 'threaded1', 'ghci']), compile_and_run, [''])
79 test('dynamic005',      normal, compile_and_run, [''])
80
81 enum_setups = [when(fast(), skip)]
82 test('enum01',          [extra_files(['enum_processor.bat', 'enum_processor.py']),
83                          enum_setups], compile_and_run, [''])
84 test('enum02',          [extra_files(['enum_processor.bat', 'enum_processor.py']),
85                          enum_setups], compile_and_run, [''])
86 test('enum03',          [extra_files(['enum_processor.bat', 'enum_processor.py']),
87                          enum_setups], compile_and_run, [''])
88 test('enum04',          normal, compile_and_run, [''])
89
90 test('exceptionsrun001',        normal, compile_and_run, [''])
91 test('exceptionsrun002',        normal, compile_and_run, [''])
92 test('foldableArray',   normal, compile_and_run, [''])
93 test('list001'  ,       when(fast(), skip), compile_and_run, [''])
94 test('list002', when(fast(), skip), compile_and_run, [''])
95 test('list003', when(fast(), skip), compile_and_run, [''])
96 test('isSuffixOf', normal, compile_and_run, [''])
97
98 test('memo001', [extra_files(['Memo1.lhs']),
99                  extra_run_opts('+RTS -A10k -RTS')], multimod_compile_and_run,
100      ['memo001', ''])
101
102 test('memo002', [extra_files(['Memo2.lhs']),
103                  extra_run_opts('20')], multimod_compile_and_run,
104      ['memo002', ''])
105
106 test('stableptr001',
107      [when(fast(), skip), extra_run_opts('+RTS -K8m -RTS')],
108      compile_and_run, [''])
109 test('stableptr003', normal, compile_and_run, [''])
110 test('stableptr004', extra_run_opts('+RTS -K4m -RTS'), compile_and_run, [''])
111 test('stableptr005', normal, compile_and_run, [''])
112
113 test('weak001', normal, compile_and_run, [''])
114
115 test('T2528', normal, compile_and_run, [''])
116
117 # In the 65001 codepage, we can't even cat the expected output on msys:
118 #     $ cat 4006.stdout
119 #     It works here
120 #     cat: write error: Permission denied
121 # Seems to be a known problem, e.g.
122 #     http://mingw-users.1079350.n2.nabble.com/Bug-re-Unicode-on-the-console-td3121717.html
123 # May 2014: seems to work on msys2
124 test('T4006', normal, compile_and_run, [''])
125
126 test('T5943', normal, compile_and_run, [''])
127 test('T5962', normal, compile_and_run, [''])
128 test('T7034', normal, compile_and_run, [''])
129
130 test('qsem001', normal, compile_and_run, [''])
131 test('qsemn001', normal, compile_and_run, [''])
132
133 test('T7457', normal, compile_and_run, [''])
134
135 test('T7773', when(opsys('mingw32'), skip), compile_and_run, [''])
136 # Andreas says that T7773 will not (and should not) work on Windows
137
138 # Tests for kind-polymorphic Category
139 test('CatPairs', normal, compile, [''])
140 test('CatEntail', normal, compile, [''])
141
142 # When running with WAY=ghci, T7653 uses a lot of memory.
143 test('T7653', high_memory_usage, compile_and_run, [''])
144 test('T7787', normal, compile_and_run, [''])
145
146 test('topHandler01', when(opsys('mingw32'), skip), compile_and_run, [''])
147 test('topHandler02',
148      [when(opsys('mingw32'), skip),
149       omit_ways(['ghci']),
150       signal_exit_code(2)
151      ], compile_and_run, [''])
152 test('topHandler03',
153      [when(opsys('mingw32'), skip), ignore_stderr,
154       signal_exit_code(15)
155      ], compile_and_run, [''])
156 test('topHandler04',
157      [when(opsys('mingw32'), skip),
158       exit_code(1)
159      ], compile_and_run, [''])
160
161
162 test('T8766',
163         [ stats_num_field('bytes allocated',
164                           [ (wordsize(64), 16828144, 5)
165         # with GHC-7.6.3: 83937384 (but faster execution than the next line)
166         # before:         58771216 (without call-arity-analysis)
167         # expected value: 16828144 (2014-01-14)
168                           , (wordsize(32), 8433644, 5) ])
169         , only_ways(['normal'])],
170       compile_and_run,
171       ['-O'])
172
173 test('T9111', normal, compile, [''])
174 test('T9395', normal, compile_and_run, [''])
175 # Fails for debug way due to annotation linting timeout
176 test('T9532', omit_ways(['debug']), compile_and_run, [''])
177 test('T9586', normal, compile, [''])
178 test('T9681', normal, compile_fail, [''])
179 # Test no runtime crash. Report success and kill with `timeout` (exit code 99)
180 # after a few seconds. From https://phabricator.haskell.org/D1075:
181 #
182 #   "I used a fairly conservative timeout. IF there is a regression it will
183 #   crash as soon as the timeout's C call is done. The tricky bit is
184 #   guesstimating how much time it needs to run to guarantee it's reached the
185 #   C call.
186 #   Probably something like 1s is already enough, but I don't know enough to
187 #   make an educated guess how long it needs to be guaranteed to reach the C
188 #   call."
189 test('T8089',
190      [exit_code(99), run_timeout_multiplier(0.01)],
191      compile_and_run, [''])
192 test('T9826',normal, compile_and_run,[''])
193 test('T9848',
194         [ stats_num_field('bytes allocated',
195                           [ (wordsize(64), 51840, 20)
196                           , (wordsize(32), 47348, 20) ])
197         , only_ways(['normal'])],
198       compile_and_run,
199       ['-O'])
200 test('T10149', normal, compile_and_run, [''])
201 test('T11334a', normal, compile_and_run, [''])
202 test('T11555', normal, compile_and_run, [''])
203 test('T12852', when(opsys('mingw32'), skip), compile_and_run, [''])
204 test('lazySTexamples', normal, compile_and_run, [''])
205 test('T11760', normal, compile_and_run, ['-threaded -with-rtsopts=-N2'])
206 test('T13191',
207         [ stats_num_field('bytes allocated',
208                           [ (wordsize(64), 185943272, 5) ])
209         # with GHC-8.1 before liftA2 change: 325065128
210         # GHC-8.1 with custom liftA2:        185943272
211         , only_ways(['normal'])],
212       compile_and_run,
213       ['-O'])