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