diff --git a/tests/fork/test.T b/tests/fork/test.T index bd34cc2dfa28c0dbd0dc579680330cdb2f6b642c..40638fad641be65f5c78f05279d7a7beaeb5f513 100644 --- a/tests/fork/test.T +++ b/tests/fork/test.T @@ -2,7 +2,7 @@ setTestOpts([only_compiler_types(['ghc']), omit_ways(['ghci','threaded2']), when(fast(), skip)]) -hpc_prefix = "perl ../hpcrun.pl --clear --exeext=" + config.exeext + " --hpc='" + config.hpc + "'"; +hpc_prefix = "perl ../hpcrun.pl --clear --exeext={exeext} --hpc={hpc}" test('hpc_fork', [ when(opsys('mingw32'), skip), # no forkProcess on Windows cmd_prefix(hpc_prefix) ], compile_and_run, ['-fhpc']) diff --git a/tests/function/test.T b/tests/function/test.T index 2ff4d4be3534469fb27408dace6e34ae323be4a9..88bc6b1eb05b9a6dc067effc1f24c5ea5a9f04bc 100644 --- a/tests/function/test.T +++ b/tests/function/test.T @@ -2,7 +2,7 @@ setTestOpts([only_compiler_types(['ghc']), omit_ways(['ghci']), when(fast(), skip)]) -hpc_prefix = "perl ../hpcrun.pl --clear --exeext=" + config.exeext + " --hpc='" + config.hpc + "'"; +hpc_prefix = "perl ../hpcrun.pl --clear --exeext={exeext} --hpc={hpc}" test('tough', [cmd_prefix(hpc_prefix), diff --git a/tests/function2/test.T b/tests/function2/test.T index f646606726048682a99754bff1420a2adca05a98..b9362fdb0fe90664755b1a1f411cf840d9675626 100644 --- a/tests/function2/test.T +++ b/tests/function2/test.T @@ -2,7 +2,7 @@ setTestOpts([only_compiler_types(['ghc']), omit_ways(['ghci']), when(fast(), skip)]) -hpc_prefix = "perl ../hpcrun.pl --clear --exeext=" + config.exeext + " --hpc='" + config.hpc + "'"; +hpc_prefix = "perl ../hpcrun.pl --clear --exeext={exeext} --hpc={hpc}" # Test that -fhpc still works when (a) the source file is in a # subdirectory and (b) it is a literate file. We had a bug in this diff --git a/tests/raytrace/test.T b/tests/raytrace/test.T index a8c660114bbb91c06c06f575f83551776dd1b279..d56a000b38ca64a41c2e50f446f972e5ce88ea3f 100644 --- a/tests/raytrace/test.T +++ b/tests/raytrace/test.T @@ -2,7 +2,7 @@ setTestOpts([only_compiler_types(['ghc']), omit_ways(['ghci']), when(fast(), skip)]) -hpc_prefix = "perl ../hpcrun.pl --clear --exeext=" + config.exeext + " --hpc='" + config.hpc + "'"; +hpc_prefix = "perl ../hpcrun.pl --clear --exeext={exeext} --hpc={hpc}" test('hpc_raytrace', \ [ when(fast(), skip), cmd_prefix(hpc_prefix), reqlib('parsec') ], \ diff --git a/tests/raytrace/tixs/test.T b/tests/raytrace/tixs/test.T index d5614ab4c86ff53793f872ffec32ee9227a8ceee..f5587411e20d0eca5bef7acb89b3644e393ffa6c 100644 --- a/tests/raytrace/tixs/test.T +++ b/tests/raytrace/tixs/test.T @@ -2,26 +2,24 @@ setTestOpts([only_compiler_types(['ghc']), omit_ways(['ghci']), when(fast(), skip)]) -hpcsample = 'hpc_sample' +test('hpc_report_multi_001', normal, run_command, + ["{hpc} report hpc_sample --include=Geometry --per-module"]) +test('hpc_report_multi_002', normal, run_command, + ["{hpc} report hpc_sample --exclude=Geometry --per-module"]) +test('hpc_report_multi_003', normal, run_command, + ["{hpc} report hpc_sample --include=Geometry --per-module --decl-list"]) -test('hpc_report_multi_001', normal, run_command, \ - ["'" + config.hpc + "' report " + hpcsample + " --include=Geometry --per-module"]) -test('hpc_report_multi_002', normal, run_command, \ - ["'" + config.hpc + "' report " + hpcsample + " --exclude=Geometry --per-module"]) -test('hpc_report_multi_003', normal, run_command, \ - ["'" + config.hpc + "' report " + hpcsample + " --include=Geometry --per-module --decl-list"]) - -test('hpc_markup_multi_001', normal, run_command, \ - ["'" + config.hpc + "' markup --srcdir=.. --hpcdir=tixs/.hpc " + hpcsample + " --include=Geometry"]) -test('hpc_markup_multi_002', normal, run_command, \ - ["'" + config.hpc + "' markup --srcdir=.. --hpcdir=tixs/.hpc " + hpcsample + " --exclude=Geometry"]) -test('hpc_markup_multi_003', normal, run_command, \ - ["'" + config.hpc + "' markup --srcdir=.. --hpcdir=tixs/.hpc " + hpcsample + " --fun-entry-count"]) +test('hpc_markup_multi_001', normal, run_command, + ["{hpc} markup --srcdir=.. --hpcdir=tixs/.hpc hpc_sample --include=Geometry"]) +test('hpc_markup_multi_002', normal, run_command, + ["{hpc} markup --srcdir=.. --hpcdir=tixs/.hpc hpc_sample --exclude=Geometry"]) +test('hpc_markup_multi_003', normal, run_command, + ["{hpc} markup --srcdir=.. --hpcdir=tixs/.hpc hpc_sample --fun-entry-count"]) test('hpc_show_multi_001', normal, run_command, - ["'" + config.hpc + "' show " + hpcsample]) + ["{hpc} show hpc_sample"]) test('hpc_show_multi_002', normal, run_command, - ["'" + config.hpc + "' show " + hpcsample + " --include=Geometry"]) + ["{hpc} show hpc_sample --include=Geometry"]) # XXX We used to do clean_o_hi(), but that doesn't work any more # Fix cleaning properly diff --git a/tests/simple/test.T b/tests/simple/test.T index ac4466b7c7f7fbcb2eca3844e9527624da2dddd5..f416a6360d2e39fd8d9621b254f8f34f9cad241a 100644 --- a/tests/simple/test.T +++ b/tests/simple/test.T @@ -2,7 +2,7 @@ setTestOpts([only_compiler_types(['ghc']), omit_ways(['ghci']), when(fast(), skip)]) -hpc_prefix = "perl ../hpcrun.pl --clear --exeext=" + config.exeext + " --hpc='" + config.hpc + "'"; +hpc_prefix = "perl ../hpcrun.pl --clear --exeext={exeext} --hpc={hpc}" test('hpc001', cmd_prefix(hpc_prefix), compile_and_run, ['-fhpc']) diff --git a/tests/simple/tixs/test.T b/tests/simple/tixs/test.T index 47da6458d29394f5724b1dde4a585228ca4664bd..48ca67f60a3d889cfb419e7edabbe69f55a1abbd 100644 --- a/tests/simple/tixs/test.T +++ b/tests/simple/tixs/test.T @@ -2,61 +2,68 @@ setTestOpts([only_compiler_types(['ghc']), omit_ways(['ghci']), when(fast(), skip)]) -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', [ extra_clean(['sample_overlay1.tix', 'total1.tix']) ], - run_command, - [ "'" + config.hpc + "' overlay sample_overlay.ovr > sample_overlay1.tix" + - "; cat sample_overlay1.tix " + - ";'" + config.hpc + "' combine " + hpcsample + ".tix sample_overlay1.tix > total1.tix" + - ";'" + config.hpc + "' report total1.tix"]); - -test('hpc_overlay2', [ extra_clean(['sample_overlay2.tix', 'total2.tix']) ], - run_command, - [ "'" + config.hpc + "' overlay sample_overlay.ovr --output=sample_overlay2.tix" + - "; cat sample_overlay2.tix " + - ";'" + config.hpc + "' combine " + hpcsample + ".tix sample_overlay2.tix --output=total2.tix" + - ";'" + config.hpc + "' report total2.tix"]); - -test('hpc_hand_overlay', [ extra_clean(['sample_overlay3.tix', 'total3.tix']) ], - run_command, - [ "'" + config.hpc + "' overlay hand_overlay.ovr --output=sample_overlay3.tix" + - "; cat sample_overlay3.tix " + - ";'" + config.hpc + "' combine " + hpcsample + ".tix sample_overlay3.tix --output=total3.tix" + - ";'" + config.hpc + "' report total3.tix"]); - -test('hpc_bad_001', exit_code(1), run_command, ["'" + config.hpc + "' bad arguments"]) +test('hpc_help', normal, run_command, ["{hpc} help"]) +test('hpc_help_help', normal, run_command, ["{hpc} help help"]) + +test('hpc_help_report', normal, run_command, ["{hpc} help report"]) +test('hpc_report_001', normal, run_command, + ["{hpc} report hpc_sample.tix --xml-output"]) +test('hpc_report_002', normal, run_command, + ["{hpc} report hpc_sample.tix --xml-output --per-module"]) +test('hpc_report_003', normal, run_command, + ["{hpc} report hpc_sample.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 + +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_markup_001', normal, run_command, + ["{hpc} markup hpc_sample.tix --highlight-covered; cat Main.hs.html"]) +test('hpc_markup_002', normal, run_command, + ["{hpc} markup hpc_sample.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 hpc_sample.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_version', normal, run_command, ["{hpc} help version"]) +test('hpc_version', normal, run_command, ["{hpc} version"]) + +test('hpc_help_draft', normal, run_command, ["{hpc} help draft"]) +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'])], + run_command, + ["{hpc} overlay sample_overlay.ovr > sample_overlay1.tix; " + "cat sample_overlay1.tix; " + "{hpc} combine hpc_sample.tix sample_overlay1.tix > total1.tix; " + "{hpc} report total1.tix"]) + +test('hpc_overlay2', + [extra_clean(['sample_overlay2.tix', 'total2.tix'])], + run_command, + ["{hpc} overlay sample_overlay.ovr --output=sample_overlay2.tix; " + "cat sample_overlay2.tix; " + "{hpc} combine hpc_sample.tix sample_overlay2.tix --output=total2.tix; " + "{hpc} report total2.tix"]) + +test('hpc_hand_overlay', + [extra_clean(['sample_overlay3.tix', 'total3.tix'])], + run_command, + ["{hpc} overlay hand_overlay.ovr --output=sample_overlay3.tix; " + "cat sample_overlay3.tix; " + "{hpc} combine hpc_sample.tix sample_overlay3.tix --output=total3.tix; " + "{hpc} report total3.tix"]) + +test('hpc_bad_001', exit_code(1), run_command, ["{hpc} bad arguments"])