summaryrefslogtreecommitdiff
path: root/testsuite/tests/rts/flags/all.T
blob: 04c2907fce3323d87c8ad104faf62fb99f747b8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# We ignore ways which depend on passing RTS arguments for simplicity and only
# run in normal way.

# Standard handling of RTS arguments
test('T12870a',
    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs']),
        only_ways(['normal'])],
    multimod_compile_and_run,
    ['T12870', '-rtsopts'])

test('T12870b',
    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs']),
        exit_code(1), ignore_stderr, only_ways(['normal'])],
    multimod_compile_and_run,
    ['T12870', '-rtsopts=none'])

test('T12870c',
    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs']),
        exit_code(1), only_ways(['normal'])],
    multimod_compile_and_run,
    ['T12870', '-rtsopts=some'])

test('T12870d',
    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs']),
        only_ways(['normal'])],
    multimod_compile_and_run,
    ['T12870', ''])

# RTS options should be passed along to the program
test('T12870e',
    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs']),
        only_ways(['normal'])],
    multimod_compile_and_run,
    ['T12870', '-rtsopts=ignore'])

test('T12870f',
    [extra_run_opts('+RTS -G2 -RTS arg1 --RTS +RTS arg2'), extra_files(['T12870.hs']),
        only_ways(['normal'])],
    multimod_compile_and_run,
    ['T12870', '-rtsopts=ignoreAll'])

# Check handling of env variables
test('T12870g',
    [extra_files(['T12870g.hs']), cmd_prefix('GHCRTS=-G7 '), extra_files(['T12870g.hs']),
        only_ways(['normal'])],
    multimod_compile_and_run,
    ['T12870g', '-rtsopts -with-rtsopts="-G3"'])

test('T12870h',
    [extra_files(['T12870g.hs']), cmd_prefix('GHCRTS=-G7 '), extra_files(['T12870g.hs']),
        only_ways(['normal'])],
    multimod_compile_and_run,
    ['T12870g', '-rtsopts=ignoreAll -with-rtsopts="-G3"'])

test('T20006', [extra_run_opts('+RTS --eventlog-flush-interval=1')],
    compile_and_run,
    ['-eventlog'])