Skip to content
Snippets Groups Projects
Commit a7a4e2e3 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Fix some hpc tests

parent 214f2d69
No related branches found
No related tags found
No related merge requests found
Showing
with 16 additions and 60 deletions
......@@ -6,63 +6,3 @@ hpc_prefix = 'perl ../hpcrun.pl --clear --exeext=' + config.exeext + ' --hpc=' +
test('hpc001', cmd_prefix(hpc_prefix), compile_and_run, ['-fhpc'])
# a prepackaged version of .hpc/*mix and hpc-sample.tix files.
# This is created using 'make build-tix-tar', in this directory.
runCmd("cd " + in_testdir('') + " && tar xf tixs.tar")
hpcsample = 'hpc_sample'
test('hpc_help', normal, run_command, [config.hpc + ' help'])
test('hpc_help_help', normal, run_command, [config.hpc + ' help help'])
test('hpc_help_report', normal, run_command, [config.hpc + ' help report'])
test('hpc_report_001', normal, run_command, \
[config.hpc + ' report ' + hpcsample + '.tix --xml-output'])
test('hpc_report_002', normal, run_command, \
[config.hpc + ' report ' + hpcsample + '.tix --xml-output --per-module'])
test('hpc_report_003', normal, run_command, \
[config.hpc + ' report ' + hpcsample + '.tix --per-module --decl-list'])
test('hpc_report_error_001', exit_code(1), run_command, [config.hpc + ' report']) # no .tix file
test('hpc_report_error_002', exit_code(1), run_command, [config.hpc + ' report hpc001.hs']) # bad .tix file
test('hpc_help_markup', normal, run_command, [config.hpc + ' help markup'])
test('hpc_markup_error_001', exit_code(1), run_command, [config.hpc + ' markup']) # no .tix file
test('hpc_markup_error_002', exit_code(1), run_command, [config.hpc + ' markup hpc001.hs']) # bad .tix file
test('hpc_markup_001', normal, run_command, \
['(' + config.hpc + ' markup ' + hpcsample + '.tix --highlight-covered ; cat Main.hs.html )'])
test('hpc_markup_002', normal, run_command, \
['(' + config.hpc + ' markup ' + hpcsample + '.tix --fun-entry-count ; cat Main.hs.html )'])
test('hpc_help_show', normal, run_command, [config.hpc + ' help show'])
test('hpc_show', normal, run_command, [config.hpc + ' show ' + hpcsample + '.tix'])
test('hpc_show_error_001', exit_code(1), run_command, [config.hpc + ' show']) # no .tix file
test('hpc_show_error_002', exit_code(1), run_command, [config.hpc + ' show hpc001.hs']) # bad .tix file
test('hpc_help_version', normal, run_command, [config.hpc + ' help version'])
test('hpc_version', normal, run_command, [config.hpc + ' version'])
test('hpc_help_draft', normal, run_command, [config.hpc + ' help draft'])
test('hpc_draft', normal, run_command, [config.hpc + ' draft ' + hpcsample + '.tix'])
test('hpc_help_overlay', normal, run_command, [config.hpc + ' help overlay'])
test('hpc_overlay', normal, run_command,
[ config.hpc + ' overlay sample_overlay.ovr > sample_overlay.tix' +
'; cat sample_overlay.tix ' +
';' + config.hpc + ' combine ' + hpcsample + '.tix sample_overlay.tix > total.tix' +
';' + config.hpc + ' report total.tix' +
'']);
test('hpc_overlay2', normal, run_command,
[ config.hpc + ' overlay sample_overlay.ovr --output=sample_overlay.tix' +
'; cat sample_overlay.tix ' +
';' + config.hpc + ' combine ' + hpcsample + '.tix sample_overlay.tix --output=total.tix' +
';' + config.hpc + ' report total.tix' +
'']);
test('hpc_hand_overlay', normal, run_command,
[ config.hpc + ' overlay hand_overlay.ovr --output=sample_overlay.tix' +
'; cat sample_overlay.tix ' +
';' + config.hpc + ' combine ' + hpcsample + '.tix sample_overlay.tix --output=total.tix' +
';' + config.hpc + ' report total.tix' +
'']);
test('hpc_bad_001', exit_code(1), run_command, [config.hpc + ' bad arguments'])
File deleted
Mix "hpc001.hs" 1188355554 601114699 1 [(1:21-1:27,ExpBox False),(1:29-1:35,ExpBox False),(1:14-1:36,ExpBox False),(1:8-1:36,ExpBox False),(1:1-1:36,TopLevelBox ["main"])]
\ No newline at end of file
# This Makefile runs the tests using GHC's testsuite framework. It
# assumes the package is part of a GHC build tree with the testsuite
# installed in ../../../testsuite.
TOP=../../../../../testsuite
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
build-tix:
rm -Rf .hpc hpc001.o a.out
'$(TEST_HC)' -fhpc hpc001.hs
./a.out
mv a.out.tix hpc_sample.tix
File moved
main = print (const "Hello" "World")
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment