tests: remove extra_files.py (#12223)
[ghc.git] / testsuite / tests / profiling / should_run / all.T
1 # Test for #1227, #1418
2
3 test('heapprof002',
4      [extra_files(['heapprof001.hs']),
5       pre_cmd('cp heapprof001.hs heapprof002.hs'), extra_ways(['normal_h']),
6       extra_run_opts('7')],
7      compile_and_run, [''])
8
9 test('T11489', [req_profiling], run_command,
10      ['$MAKE -s --no-print-directory T11489'])
11
12 # Below this line, run tests only with profiling ways.
13 setTestOpts(req_profiling)
14 setTestOpts(extra_ways(['prof', 'ghci-ext-prof']))
15 setTestOpts(only_ways(prof_ways))
16 setTestOpts(keep_prof_callstacks)
17
18 extra_prof_ways = ['prof', 'prof_hc_hb', 'prof_hb', 'prof_hd', 'prof_hy', 'prof_hr']
19
20 expect_broken_for_10037 = expect_broken_for(
21   10037,
22   [w for w in prof_ways if w not in opt_ways and w != 'ghci-ext-prof'])
23      # e.g. prof and profllvm
24
25 test('heapprof001',
26      [when(have_profiling(), extra_ways(extra_prof_ways)), extra_run_opts('7')],
27      compile_and_run, [''])
28
29 test('T2592',
30      [only_ways(['profasm']), extra_run_opts('+RTS -M1m -RTS'), exit_code(251)],
31      compile_and_run, [''])
32
33 test('T3001', [only_ways(['prof_hb']), extra_ways(['prof_hb'])],
34      compile_and_run, [''])
35
36 test('T3001-2', [only_ways(['prof_hb']), extra_ways(['prof_hb'])],
37      compile_and_run, ['-package bytestring'])
38
39 # As with ioprof001, the unoptimised profile is different but
40 # not badly wrong (CAF attribution is different).
41 test('scc001', [], compile_and_run,
42      ['-fno-state-hack -fno-full-laziness']) # Note [consistent stacks]
43
44 test('scc002', [], compile_and_run, [''])
45
46 test('scc003', [], compile_and_run,
47      ['-fno-state-hack']) # Note [consistent stacks]
48
49 test('T5654-O0', [only_ways(['prof'])], compile_and_run, [''])
50
51 test('T5654-O1', [only_ways(['profasm'])], compile_and_run, [''])
52
53 test('T5654b-O0', [only_ways(['prof'])], compile_and_run, [''])
54
55 test('T5654b-O1', [only_ways(['profasm'])], compile_and_run, [''])
56
57 test('scc005', [], compile_and_run, [''])
58
59 test('T5314', [extra_ways(extra_prof_ways)], compile_and_run, [''])
60
61 test('T680', [], compile_and_run,
62      ['-fno-full-laziness']) # Note [consistent stacks]
63
64 test('T2552', [expect_broken_for_10037], compile_and_run, [''])
65
66 test('T949', [extra_ways(extra_prof_ways)], compile_and_run, [''])
67
68 # The results for 'prof' are fine, but the ordering changes.
69 # We care more about getting the optimised results right, so ignoring
70 # this for now.
71 test('ioprof',
72      [expect_broken_for_10037,
73       exit_code(1),
74       omit_ways(['ghci-ext-prof']) # doesn't work with exit_code(1)
75      ],
76      compile_and_run,
77      ['-fno-full-laziness -fno-state-hack']) # Note [consistent stacks]
78
79 # These two examples are from the User's Guide:
80
81 test('prof-doc-fib', [], compile_and_run, [''])
82
83 test('prof-doc-last', [], compile_and_run, ['-fno-full-laziness'])
84
85 # unicode in cost centre names
86 test('T5559', [], compile_and_run, [''])
87
88 # Note [consistent stacks]
89 #  Certain optimisations can change the stacks we get out of the
90 #  profiler.  These flags are necessary (but perhaps not sufficient)
91 #  to get consistent stacks:
92 #
93 #       -fno-state-hack
94 #       -fno-full-laziness
95
96 test('callstack001',
97      # unoptimised results are different w.r.t. CAF attribution
98      [ omit_ways(['ghci-ext-prof']), # produces a different stack
99      ], compile_and_run,
100      ['-fprof-auto-calls -fno-full-laziness -fno-state-hack'])
101
102 test('callstack002',
103      [ omit_ways(['ghci-ext-prof']), # produces a different stack
104      ],
105      compile_and_run,
106      ['-fprof-auto-calls -fno-full-laziness -fno-state-hack'])
107
108 # Should not stack overflow with -prof -fprof-auto
109 test('T5363', [], compile_and_run, [''])
110
111 test('profinline001', [], compile_and_run, [''])
112
113 test('T11627a', [extra_ways(extra_prof_ways)], compile_and_run, [''])
114
115 test('T11627b', [ extra_run_opts('+RTS -i0 -RTS')  # census after each GC
116                 , extra_ways(extra_prof_ways)
117                 , when(opsys('mingw32'),
118                        expect_broken_for(12236, ['prof_hc_hb']))
119                 ]
120                 , compile_and_run
121                 , [''])
122
123 test('T11978a',
124      [only_ways(['profthreaded']),
125       extra_run_opts('+RTS -hb -N10'),
126       expect_broken(12019)],
127      compile_and_run, [''])
128
129 test('toplevel_scc_1',
130      [extra_ways(['prof_no_auto']), only_ways(['prof_no_auto'])],
131      compile_and_run,
132      [''])