[commit: packages/hpc] master: tests: manual extra_files, extra_clean cleanup (5caceac)

git at git.haskell.org git at git.haskell.org
Sun Feb 26 23:14:59 UTC 2017


Repository : ssh://git@git.haskell.org/hpc

On branch  : master
Link       : http://git.haskell.org/packages/hpc.git/commitdiff/5caceac7a05741f87f970e1d3f572b1fd8f10cec

>---------------------------------------------------------------

commit 5caceac7a05741f87f970e1d3f572b1fd8f10cec
Author: Reid Barton <rwbarton at gmail.com>
Date:   Fri Feb 24 20:53:31 2017 -0500

    tests: manual extra_files, extra_clean cleanup


>---------------------------------------------------------------

5caceac7a05741f87f970e1d3f572b1fd8f10cec
 tests/function/test.T      |  4 +---
 tests/function2/test.T     |  3 ---
 tests/ghc_ghci/test.T      |  3 +--
 tests/raytrace/tixs/test.T |  6 +++---
 tests/simple/test.T        |  3 ++-
 tests/simple/tixs/test.T   | 19 +++++++++++--------
 6 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/tests/function/test.T b/tests/function/test.T
index a5515d9..0ba3edd 100644
--- a/tests/function/test.T
+++ b/tests/function/test.T
@@ -3,8 +3,6 @@ setTestOpts([omit_ways(['ghci']), when(fast(), skip)])
 hpc_prefix = "perl hpcrun.pl --clear --exeext={exeext} --hpc={hpc}"
 
 test('tough',
-     [cmd_prefix(hpc_prefix),
-      extra_clean(['Main.hs.html', 'hpc_index.html', 'hpc_index_alt.html',
-                   'hpc_index_exp.html', 'hpc_index_fun.html', 'tough.tix'])],
+     [cmd_prefix(hpc_prefix)],
      compile_and_run, ['-fhpc'])
 
diff --git a/tests/function2/test.T b/tests/function2/test.T
index b37cc40..6f0a2d7 100644
--- a/tests/function2/test.T
+++ b/tests/function2/test.T
@@ -8,9 +8,6 @@ hpc_prefix = "perl hpcrun.pl --clear --exeext={exeext} --hpc={hpc}"
 # source file.
 test('tough2',
      [ literate,
-       extra_clean(['Main.hs.html', 'hpc_index.html', 'hpc_index_alt.html',
-                    'hpc_index_exp.html', 'hpc_index_fun.html',
-                    'subdir/tough2.hi', 'subdir/tough2.o', 'tough2.tix']),
        cmd_prefix(hpc_prefix),
        omit_ways(['ghci'] + prof_ways) ], # profile goes in the wrong place
      multimod_compile_and_run, ['subdir/tough2.lhs', '-fhpc'])
diff --git a/tests/ghc_ghci/test.T b/tests/ghc_ghci/test.T
index 28b658e..fe2a552 100644
--- a/tests/ghc_ghci/test.T
+++ b/tests/ghc_ghci/test.T
@@ -1,5 +1,4 @@
 
 test('hpc_ghc_ghci',
-     [extra_clean(['A.hi', 'A.o', '.hpc/A.mix', '.hpc/']),
-      only_ways(['normal']), when(compiler_profiled(), skip), req_interp],
+     [only_ways(['normal']), when(compiler_profiled(), skip), req_interp],
      run_command, ['$MAKE -s --no-print-directory hpc_ghc_ghci'])
diff --git a/tests/raytrace/tixs/test.T b/tests/raytrace/tixs/test.T
index 9df587f..9895612 100644
--- a/tests/raytrace/tixs/test.T
+++ b/tests/raytrace/tixs/test.T
@@ -7,13 +7,13 @@ test('hpc_report_multi_002', normal, run_command,
 test('hpc_report_multi_003', normal, run_command,
      ["{hpc} report hpc_sample --include=Geometry --per-module --decl-list"])
 
-test('hpc_markup_multi_001', extra_clean(['markup_multi_001/*']), run_command,
+test('hpc_markup_multi_001', normal, run_command,
      ["{hpc} markup --hpcdir=tixs/.hpc --hpcdir=hpc_markup_multi_001/.hpc --destdir=markup_multi_001"
       " hpc_sample --include=Geometry"])
-test('hpc_markup_multi_002', extra_clean(['markup_multi_002/*']), run_command,
+test('hpc_markup_multi_002', normal, run_command,
      ["{hpc} markup --hpcdir=tixs/.hpc --hpcdir=hpc_markup_multi_002/.hpc --destdir=markup_multi_002"
       " hpc_sample --exclude=Geometry"])
-test('hpc_markup_multi_003', extra_clean(['markup_multi_003/*']), run_command,
+test('hpc_markup_multi_003', normal, run_command,
      ["{hpc} markup --hpcdir=tixs/.hpc --hpcdir=hpc_markup_multi_003/.hpc --destdir=markup_multi_003"
       " hpc_sample --fun-entry-count"])
 
diff --git a/tests/simple/test.T b/tests/simple/test.T
index 375a97a..a2c2241 100644
--- a/tests/simple/test.T
+++ b/tests/simple/test.T
@@ -2,5 +2,6 @@ setTestOpts([omit_ways(['ghci']), when(fast(), skip)])
 
 hpc_prefix = "perl hpcrun.pl --clear --exeext={exeext} --hpc={hpc}"
 
-test('hpc001', cmd_prefix(hpc_prefix), compile_and_run, ['-fhpc'])
+test('hpc001', [extra_files(['../hpcrun.pl']), cmd_prefix(hpc_prefix)],
+     compile_and_run, ['-fhpc'])
 
diff --git a/tests/simple/tixs/test.T b/tests/simple/tixs/test.T
index 19fae7e..554d779 100644
--- a/tests/simple/tixs/test.T
+++ b/tests/simple/tixs/test.T
@@ -20,10 +20,10 @@ 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', extra_clean(['markup_001/*']), run_command,
+test('hpc_markup_001', normal, run_command,
      ["{hpc} markup --verbosity=0 --destdir=markup_001"
       " hpc_sample.tix --highlight-covered; cat markup_001/Main.hs.html"])
-test('hpc_markup_002', extra_clean(['markup_002/*']), run_command,
+test('hpc_markup_002', normal, run_command,
      ["{hpc} markup --verbosity=0 --destdir=markup_002"
       " hpc_sample.tix --fun-entry-count; cat markup_002/Main.hs.html"])
 
@@ -43,7 +43,7 @@ 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'])],
+     normal,
      run_command,
      ["({hpc} overlay sample_overlay.ovr > sample_overlay1.tix; "
       "cat sample_overlay1.tix; echo; "
@@ -51,7 +51,7 @@ test('hpc_overlay',
       "{hpc} report total1.tix)"])
 
 test('hpc_overlay2',
-     [extra_clean(['sample_overlay2.tix', 'total2.tix'])],
+     normal,
      run_command,
      ["({hpc} overlay sample_overlay.ovr --output=sample_overlay2.tix; "
       "cat sample_overlay2.tix; echo; "
@@ -59,7 +59,7 @@ test('hpc_overlay2',
       "{hpc} report total2.tix)"])
 
 test('hpc_hand_overlay',
-     [extra_clean(['sample_overlay3.tix', 'total3.tix'])],
+     normal,
      run_command,
      ["({hpc} overlay hand_overlay.ovr --output=sample_overlay3.tix; "
       "cat sample_overlay3.tix; echo; "
@@ -73,9 +73,12 @@ test('T9619', ignore_stdout, run_command,
      ["{hpc} report hpc_sample.tix --hpcdir=.hpc --hpcdir=.hpc.copy"])
 
 # Show different error messages for different types of failures.
-test('T10529a', exit_code(1), run_command,
+test('T10529a', [extra_files(['hpc_sample_non_existing_module.tix']),
+                 exit_code(1)], run_command,
      ["{hpc} report hpc_sample_non_existing_module.tix"])
-test('T10529b', exit_code(1), run_command,
+test('T10529b', [extra_files(['.hpc/', 'hpc_sample_incompatible_hash.tix']),
+                 exit_code(1)], run_command,
      ["{hpc} report hpc_sample_incompatible_hash.tix"])
-test('T10529c', exit_code(1), run_command,
+test('T10529c', [extra_files(['.hpc/', 'hpc_sample_no_parse.tix']),
+                 exit_code(1)], run_command,
      ["{hpc} report hpc_sample_no_parse.tix"])



More information about the ghc-commits mailing list