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

In the tests, get the hpc location from the driver rather than trying to find it ourselves

parent 56d6f567
No related branches found
Tags 2009-06-25
No related merge requests found
......@@ -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
......@@ -6,6 +6,3 @@ TOP=../../../../testsuite
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
HPCDIR=$(TOP)/../utils/hpc
HPC = $(HPCDIR)/hpc-std
......@@ -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'])
......@@ -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
......
......@@ -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'])
......@@ -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()
......@@ -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
......
......@@ -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'])
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