diff --git a/tests/Makefile b/tests/Makefile index 7ffc1a9bc56c509fb70eadf84824937d7d45804f..8f4b3065f8d241fba05a140c31599b78c1397d8a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -6,9 +6,6 @@ TOP=../../../testsuite include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/test.mk -HPCDIR=$(TOP)/../utils/hpc -HPC = $(HPCDIR)/hpc-std - # # This is measuring coverage of the hpc tool itself. # In the hpc directory @@ -31,13 +28,13 @@ hpc-tool-coverage-clean:: find . -name 'hpc.tix' -print | xargs rm -f hpc-tool-coverage:: - $(HPC) overlay hpc.ovr --output=$(HPC_EXC_TIX) --srcdir=$(HPCDIR) + $(HPC) overlay hpc.ovr --output=$(HPC_EXC_TIX) $(HPC) sum $(shell find . -name 'hpc-inplace.tix' -print) $(HPC_EXC_TIX) \ --output=$(HPC_ALL_TIX) --union date >> $(COVERAGE_OUT) - $(HPC) report $(HPC_ALL_TIX) --srcdir=$(HPCDIR) --xml-output >> $(COVERAGE_OUT) + $(HPC) report $(HPC_ALL_TIX) --xml-output >> $(COVERAGE_OUT) echo OMIT: $(HPCTOOLS_BORING) >> $(COVERAGE_OUT) - $(HPC) report $(HPC_ALL_TIX) --srcdir=$(HPCDIR) --xml-output $(BORING_FLAGS) \ + $(HPC) report $(HPC_ALL_TIX) --xml-output $(BORING_FLAGS) \ >> $(COVERAGE_OUT) - $(HPC) markup $(HPC_ALL_TIX) --srcdir=$(HPCDIR) $(BORING_FLAGS) --destdir=html + $(HPC) markup $(HPC_ALL_TIX) $(BORING_FLAGS) --destdir=html diff --git a/tests/fork/Makefile b/tests/fork/Makefile index 3f4f799bc196c50b79badcb7dc3c9c071ccdcf9c..12924c2a082c0f84519915079791439d43729eb9 100644 --- a/tests/fork/Makefile +++ b/tests/fork/Makefile @@ -6,6 +6,3 @@ TOP=../../../../testsuite include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/test.mk -HPCDIR=$(TOP)/../utils/hpc -HPC = $(HPCDIR)/hpc-std - diff --git a/tests/fork/test.T b/tests/fork/test.T index 35db9b66e48eae1756b7b78d170540c9559f7483..c881102e9bf42dcf79e8d4489d0f05cc16f9e368 100644 --- a/tests/fork/test.T +++ b/tests/fork/test.T @@ -2,10 +2,7 @@ setTestOpts(compose(only_compiler_types(['ghc']), compose(omit_ways(['ghci','threaded2']), skip_if_fast))) -# Set up the hpc common variable(s). -hpc = config.top + '/../utils/hpc/install-inplace/bin/hpc' - -hpc_prefix = 'perl ../hpcrun.pl --clear --exeext=' + config.exeext + ' --hpc=' + hpc; +hpc_prefix = 'perl ../hpcrun.pl --clear --exeext=' + config.exeext + ' --hpc=' + config.hpc; test('hpc_fork', cmd_prefix(hpc_prefix), compile_and_run, ['-fhpc']) diff --git a/tests/function/Makefile b/tests/function/Makefile index 4a6ea3452c8a92e2fa92bafef331523f775ef7d1..474197bc78bcd9048fab5ce63e4d4e130c1cd850 100644 --- a/tests/function/Makefile +++ b/tests/function/Makefile @@ -6,9 +6,6 @@ TOP=../../../../testsuite include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/test.mk -HPCDIR=$(TOP)/../utils/hpc -HPC = $(HPCDIR)/hpc-std - build-tix-tar:: rm -Rf .hpc hpc001.o a.out $(TOP)/../compiler/ghc-inplace -fhpc hpc001.hs diff --git a/tests/function/test.T b/tests/function/test.T index d0498850009aa0d58c9a70b260b67cef7f091556..d86da6fb93464e2e495b1fe8a10db3ce5e29cc77 100644 --- a/tests/function/test.T +++ b/tests/function/test.T @@ -2,10 +2,7 @@ setTestOpts(compose(only_compiler_types(['ghc']), compose(omit_ways(['ghci']), skip_if_fast))) -# Set up the hpc common variable(s). -hpc = config.top + '/../utils/hpc/install-inplace/bin/hpc' - -hpc_prefix = 'perl ../hpcrun.pl --clear --exeext=' + config.exeext + ' --hpc=' + hpc; +hpc_prefix = 'perl ../hpcrun.pl --clear --exeext=' + config.exeext + ' --hpc=' + config.hpc; test('tough', cmd_prefix(hpc_prefix), compile_and_run, ['-fhpc']) diff --git a/tests/raytrace/test.T b/tests/raytrace/test.T index ae7a23d8103632e7d515dc56a4dd8b4c8f126e83..0853a74600495e7b1ca488cb1d48703598f977fa 100644 --- a/tests/raytrace/test.T +++ b/tests/raytrace/test.T @@ -2,8 +2,7 @@ setTestOpts(compose(only_compiler_types(['ghc']), compose(omit_ways(['ghci']), skip_if_fast))) -hpc = config.top + '/../utils/hpc/install-inplace/bin/hpc' -hpc_prefix = 'perl ../hpcrun.pl --clear --exeext=' + config.exeext + ' --hpc=' + hpc; +hpc_prefix = 'perl ../hpcrun.pl --clear --exeext=' + config.exeext + ' --hpc=' + config.hpc; test('hpc_raytrace', \ [ skip_if_fast, cmd_prefix(hpc_prefix), reqlib('parsec') ], \ @@ -15,20 +14,22 @@ runCmd("cd " + getTestDir() + " && tar xf tixs.tar") hpcsample = 'hpc_sample' test('hpc_report_multi_001', normal, run_command, \ - [hpc + ' report ' + hpcsample + ' --include=Geometry --per-module']) + [config.hpc + ' report ' + hpcsample + ' --include=Geometry --per-module']) test('hpc_report_multi_002', normal, run_command, \ - [hpc + ' report ' + hpcsample + ' --exclude=Geometry --per-module']) + [config.hpc + ' report ' + hpcsample + ' --exclude=Geometry --per-module']) test('hpc_report_multi_003', normal, run_command, \ - [hpc + ' report ' + hpcsample + ' --include=Geometry --per-module --decl-list']) + [config.hpc + ' report ' + hpcsample + ' --include=Geometry --per-module --decl-list']) test('hpc_markup_multi_001', normal, run_command, \ - [hpc + ' markup ' + hpcsample + ' --include=Geometry']) + [config.hpc + ' markup ' + hpcsample + ' --include=Geometry']) test('hpc_markup_multi_002', normal, run_command, \ - [hpc + ' markup ' + hpcsample + ' --exclude=Geometry']) + [config.hpc + ' markup ' + hpcsample + ' --exclude=Geometry']) test('hpc_markup_multi_003', normal, run_command, \ - [hpc + ' markup ' + hpcsample + ' --fun-entry-count']) + [config.hpc + ' markup ' + hpcsample + ' --fun-entry-count']) -test('hpc_show_multi_001', normal, run_command, [hpc + ' show ' + hpcsample + '']) -test('hpc_show_multi_002', normal, run_command, [hpc + ' show ' + hpcsample + ' --include=Geometry']) +test('hpc_show_multi_001', normal, run_command, + [config.hpc + ' show ' + hpcsample + '']) +test('hpc_show_multi_002', normal, run_command, + [config.hpc + ' show ' + hpcsample + ' --include=Geometry']) clean_o_hi() diff --git a/tests/simple/Makefile b/tests/simple/Makefile index 4a6ea3452c8a92e2fa92bafef331523f775ef7d1..474197bc78bcd9048fab5ce63e4d4e130c1cd850 100644 --- a/tests/simple/Makefile +++ b/tests/simple/Makefile @@ -6,9 +6,6 @@ TOP=../../../../testsuite include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/test.mk -HPCDIR=$(TOP)/../utils/hpc -HPC = $(HPCDIR)/hpc-std - build-tix-tar:: rm -Rf .hpc hpc001.o a.out $(TOP)/../compiler/ghc-inplace -fhpc hpc001.hs diff --git a/tests/simple/test.T b/tests/simple/test.T index c996b6f467aebe3a6bc589d884d1e6f1c82ab8eb..e4fe9dc09a2051d74075a47d859bba3367823524 100644 --- a/tests/simple/test.T +++ b/tests/simple/test.T @@ -2,10 +2,7 @@ setTestOpts(compose(only_compiler_types(['ghc']), compose(omit_ways(['ghci']), skip_if_fast))) -# Set up the hpc common variable(s). -hpc = config.top + '/../utils/hpc/install-inplace/bin/hpc' - -hpc_prefix = 'perl ../hpcrun.pl --clear --exeext=' + config.exeext + ' --hpc=' + hpc; +hpc_prefix = 'perl ../hpcrun.pl --clear --exeext=' + config.exeext + ' --hpc=' + config.hpc; test('hpc001', cmd_prefix(hpc_prefix), compile_and_run, ['-fhpc']) @@ -16,56 +13,56 @@ runCmd("cd " + getTestDir() + " && tar xf tixs.tar") hpcsample = 'hpc_sample' -test('hpc_help', normal, run_command, [hpc + ' help']) -test('hpc_help_help', normal, run_command, [hpc + ' help help']) +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, [hpc + ' help report']) +test('hpc_help_report', normal, run_command, [config.hpc + ' help report']) test('hpc_report_001', normal, run_command, \ - [hpc + ' report ' + hpcsample + '.tix --xml-output']) + [config.hpc + ' report ' + hpcsample + '.tix --xml-output']) test('hpc_report_002', normal, run_command, \ - [hpc + ' report ' + hpcsample + '.tix --xml-output --per-module']) + [config.hpc + ' report ' + hpcsample + '.tix --xml-output --per-module']) test('hpc_report_003', normal, run_command, \ - [hpc + ' report ' + hpcsample + '.tix --per-module --decl-list']) -test('hpc_report_error_001', exit_code(1), run_command, [hpc + ' report']) # no .tix file -test('hpc_report_error_002', exit_code(1), run_command, [hpc + ' report hpc001.hs']) # bad .tix file + [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, [hpc + ' help markup']) -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_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, \ - ['(' + hpc + ' markup ' + hpcsample + '.tix --highlight-covered ; cat Main.hs.html )']) + ['(' + config.hpc + ' markup ' + hpcsample + '.tix --highlight-covered ; cat Main.hs.html )']) test('hpc_markup_002', normal, run_command, \ - ['(' + hpc + ' markup ' + hpcsample + '.tix --fun-entry-count ; cat Main.hs.html )']) + ['(' + config.hpc + ' markup ' + hpcsample + '.tix --fun-entry-count ; cat Main.hs.html )']) -test('hpc_help_show', normal, run_command, [hpc + ' help show']) -test('hpc_show', normal, run_command, [hpc + ' show ' + hpcsample + '.tix']) -test('hpc_show_error_001', exit_code(1), run_command, [hpc + ' show']) # no .tix file -test('hpc_show_error_002', exit_code(1), run_command, [hpc + ' show hpc001.hs']) # bad .tix file +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, [hpc + ' help version']) -test('hpc_version', normal, run_command, [hpc + ' version']) +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, [hpc + ' help draft']) -test('hpc_draft', normal, run_command, [hpc + ' draft ' + hpcsample + '.tix']) +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, [hpc + ' help overlay']) +test('hpc_help_overlay', normal, run_command, [config.hpc + ' help overlay']) test('hpc_overlay', normal, run_command, - [ hpc + ' overlay sample_overlay.ovr > sample_overlay.tix' + + [ config.hpc + ' overlay sample_overlay.ovr > sample_overlay.tix' + '; cat sample_overlay.tix ' + - ';' + hpc + ' combine ' + hpcsample + '.tix sample_overlay.tix > total.tix' + - ';' + hpc + ' report total.tix' + + ';' + config.hpc + ' combine ' + hpcsample + '.tix sample_overlay.tix > total.tix' + + ';' + config.hpc + ' report total.tix' + '']); test('hpc_overlay2', normal, run_command, - [ hpc + ' overlay sample_overlay.ovr --output=sample_overlay.tix' + + [ config.hpc + ' overlay sample_overlay.ovr --output=sample_overlay.tix' + '; cat sample_overlay.tix ' + - ';' + hpc + ' combine ' + hpcsample + '.tix sample_overlay.tix --output=total.tix' + - ';' + hpc + ' report total.tix' + + ';' + config.hpc + ' combine ' + hpcsample + '.tix sample_overlay.tix --output=total.tix' + + ';' + config.hpc + ' report total.tix' + '']); test('hpc_hand_overlay', normal, run_command, - [ hpc + ' overlay hand_overlay.ovr --output=sample_overlay.tix' + + [ config.hpc + ' overlay hand_overlay.ovr --output=sample_overlay.tix' + '; cat sample_overlay.tix ' + - ';' + hpc + ' combine ' + hpcsample + '.tix sample_overlay.tix --output=total.tix' + - ';' + hpc + ' report total.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, [hpc + ' bad arguments']) +test('hpc_bad_001', exit_code(1), run_command, [config.hpc + ' bad arguments'])