Commit 5caceac7 authored by rwbarton's avatar rwbarton

tests: manual extra_files, extra_clean cleanup

parent c23cad32
......@@ -3,8 +3,6 @@ setTestOpts([omit_ways(['ghci']), when(fast(), skip)])
hpc_prefix = "perl hpcrun.pl --clear --exeext={exeext} --hpc={hpc}"
test('tough',
[cmd_prefix(hpc_prefix),
extra_clean(['Main.hs.html', 'hpc_index.html', 'hpc_index_alt.html',
'hpc_index_exp.html', 'hpc_index_fun.html', 'tough.tix'])],
[cmd_prefix(hpc_prefix)],
compile_and_run, ['-fhpc'])
......@@ -8,9 +8,6 @@ hpc_prefix = "perl hpcrun.pl --clear --exeext={exeext} --hpc={hpc}"
# source file.
test('tough2',
[ literate,
extra_clean(['Main.hs.html', 'hpc_index.html', 'hpc_index_alt.html',
'hpc_index_exp.html', 'hpc_index_fun.html',
'subdir/tough2.hi', 'subdir/tough2.o', 'tough2.tix']),
cmd_prefix(hpc_prefix),
omit_ways(['ghci'] + prof_ways) ], # profile goes in the wrong place
multimod_compile_and_run, ['subdir/tough2.lhs', '-fhpc'])
test('hpc_ghc_ghci',
[extra_clean(['A.hi', 'A.o', '.hpc/A.mix', '.hpc/']),
only_ways(['normal']), when(compiler_profiled(), skip), req_interp],
[only_ways(['normal']), when(compiler_profiled(), skip), req_interp],
run_command, ['$MAKE -s --no-print-directory hpc_ghc_ghci'])
......@@ -7,13 +7,13 @@ test('hpc_report_multi_002', normal, run_command,
test('hpc_report_multi_003', normal, run_command,
["{hpc} report hpc_sample --include=Geometry --per-module --decl-list"])
test('hpc_markup_multi_001', extra_clean(['markup_multi_001/*']), run_command,
test('hpc_markup_multi_001', normal, run_command,
["{hpc} markup --hpcdir=tixs/.hpc --hpcdir=hpc_markup_multi_001/.hpc --destdir=markup_multi_001"
" hpc_sample --include=Geometry"])
test('hpc_markup_multi_002', extra_clean(['markup_multi_002/*']), run_command,
test('hpc_markup_multi_002', normal, run_command,
["{hpc} markup --hpcdir=tixs/.hpc --hpcdir=hpc_markup_multi_002/.hpc --destdir=markup_multi_002"
" hpc_sample --exclude=Geometry"])
test('hpc_markup_multi_003', extra_clean(['markup_multi_003/*']), run_command,
test('hpc_markup_multi_003', normal, run_command,
["{hpc} markup --hpcdir=tixs/.hpc --hpcdir=hpc_markup_multi_003/.hpc --destdir=markup_multi_003"
" hpc_sample --fun-entry-count"])
......
......@@ -2,5 +2,6 @@ setTestOpts([omit_ways(['ghci']), when(fast(), skip)])
hpc_prefix = "perl hpcrun.pl --clear --exeext={exeext} --hpc={hpc}"
test('hpc001', cmd_prefix(hpc_prefix), compile_and_run, ['-fhpc'])
test('hpc001', [extra_files(['../hpcrun.pl']), cmd_prefix(hpc_prefix)],
compile_and_run, ['-fhpc'])
......@@ -20,10 +20,10 @@ test('hpc_markup_error_001', exit_code(1), run_command,
["{hpc} markup"]) # no .tix file
test('hpc_markup_error_002', exit_code(1), run_command,
["{hpc} markup hpc001.hs"]) # bad .tix file
test('hpc_markup_001', extra_clean(['markup_001/*']), run_command,
test('hpc_markup_001', normal, run_command,
["{hpc} markup --verbosity=0 --destdir=markup_001"
" hpc_sample.tix --highlight-covered; cat markup_001/Main.hs.html"])
test('hpc_markup_002', extra_clean(['markup_002/*']), run_command,
test('hpc_markup_002', normal, run_command,
["{hpc} markup --verbosity=0 --destdir=markup_002"
" hpc_sample.tix --fun-entry-count; cat markup_002/Main.hs.html"])
......@@ -43,7 +43,7 @@ test('hpc_draft', normal, run_command, ["{hpc} draft hpc_sample.tix"])
test('hpc_help_overlay', normal, run_command, ["{hpc} help overlay"])
test('hpc_overlay',
[extra_clean(['sample_overlay1.tix', 'total1.tix'])],
normal,
run_command,
["({hpc} overlay sample_overlay.ovr > sample_overlay1.tix; "
"cat sample_overlay1.tix; echo; "
......@@ -51,7 +51,7 @@ test('hpc_overlay',
"{hpc} report total1.tix)"])
test('hpc_overlay2',
[extra_clean(['sample_overlay2.tix', 'total2.tix'])],
normal,
run_command,
["({hpc} overlay sample_overlay.ovr --output=sample_overlay2.tix; "
"cat sample_overlay2.tix; echo; "
......@@ -59,7 +59,7 @@ test('hpc_overlay2',
"{hpc} report total2.tix)"])
test('hpc_hand_overlay',
[extra_clean(['sample_overlay3.tix', 'total3.tix'])],
normal,
run_command,
["({hpc} overlay hand_overlay.ovr --output=sample_overlay3.tix; "
"cat sample_overlay3.tix; echo; "
......@@ -73,9 +73,12 @@ test('T9619', ignore_stdout, run_command,
["{hpc} report hpc_sample.tix --hpcdir=.hpc --hpcdir=.hpc.copy"])
# Show different error messages for different types of failures.
test('T10529a', exit_code(1), run_command,
test('T10529a', [extra_files(['hpc_sample_non_existing_module.tix']),
exit_code(1)], run_command,
["{hpc} report hpc_sample_non_existing_module.tix"])
test('T10529b', exit_code(1), run_command,
test('T10529b', [extra_files(['.hpc/', 'hpc_sample_incompatible_hash.tix']),
exit_code(1)], run_command,
["{hpc} report hpc_sample_incompatible_hash.tix"])
test('T10529c', exit_code(1), run_command,
test('T10529c', [extra_files(['.hpc/', 'hpc_sample_no_parse.tix']),
exit_code(1)], run_command,
["{hpc} report hpc_sample_no_parse.tix"])
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment