Skip to content
Snippets Groups Projects
Commit cb27dd99 authored by Thomas Miedema's avatar Thomas Miedema
Browse files

Cleanup test.T files using PEP8 style guide

https://www.python.org/dev/peps/pep-0008
 * 80 character max

Use new config friendly formatting strings.
parent a071321d
No related branches found
No related tags found
No related merge requests found
......@@ -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'])
......
......@@ -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),
......
......@@ -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
......
......@@ -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') ], \
......
......@@ -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
......
......@@ -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'])
......@@ -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"])
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