Hi all,
As hello world is several megs on arches without object splitting, a
testsuite tree can get quite large. As such, this patch makes it clean
up as it goes. Add "CLEANUP=1" to the make command line to activate it.
On the one hand, because it doesn't clean only tests it performs,
make TEST=no_such_test CLEANUP=1 can be used to clean a tree without
actually doing anything.
On the other hand, because I was keeping my options open, a number of
extra cases could be removed by having *.o *.hi automatically cleaned.
Then again, there are some tests which rely on files generated by
previous tests, I think (although they might regenerate them if absent -
I don't remember).
Thanks
Ian
--- ghc-cvs-20040725.orig/testsuite/README
+++ ghc-cvs-20040725/testsuite/README
@@ -177,6 +177,7 @@
set_stdin(file) use a different file for stdin
exit_code(n) expect an exit code of 'n' from the prog
extra_run_opts(opts) pass some extra opts to the prog
+ no_clean don't clean up after this test
you can compose two of these functions together by
saying compose(f,g). For example, to expect an exit
--- ghc-cvs-20040725.orig/testsuite/driver/testlib.py
+++ ghc-cvs-20040725/testsuite/driver/testlib.py
@@ -8,6 +8,7 @@
import re
import traceback
import copy
+import glob
from string import join
from testutil import *
@@ -134,6 +135,10 @@
# expected exit code
self.exit_code = 0
+ # should we clean up after ourselves?
+ self.cleanup = ''
+
+
# The default set of options
global default_testopts
@@ -243,6 +248,9 @@
def _extra_run_opts( opts, v ):
opts.extra_run_opts = v
+def no_clean( opts ):
+ opts.cleanup = '';
+
# ----
# Function for composing two opt-fns together
@@ -291,6 +299,24 @@
for way in ways:
do_test( name, way, setup, func, args )
+ clean(map (lambda suff: name + suff,
+ ['', '.genscript', '.run.stderr', '.run.stdout',
+ '.comp.stderr', '.comp.stdout',
+ '.interp.stderr', '.interp.stdout',
+ '.hi', '.o', '.prof', '.hc', '_stub.h', '_stub.c',
+ '_stub.o']))
+
+def clean(names):
+ clean_full_paths(map (lambda name: in_testdir(name), names))
+
+def clean_o_hi():
+ clean_full_paths(glob.glob(in_testdir('*.o')) + glob.glob(in_testdir('*.hi')))
+
+def clean_full_paths(names):
+ if testopts.cleanup != '':
+ for name in names:
+ if os.access(name, os.F_OK) :
+ os.remove(name)
def do_test(name, way, setup, func, args):
full_name = name + '(' + way + ')'
--- ghc-cvs-20040725.orig/testsuite/mk/test.mk
+++ ghc-cvs-20040725/testsuite/mk/test.mk
@@ -67,6 +67,7 @@
-e config.compiler_always_flags.append"(\"$(EXTRA_HC_OPTS)\")" \
-e config.platform=\"$(TARGETPLATFORM)\" \
-e config.wordsize=\"$(WORDSIZE)\" \
+ -e default_testopts.cleanup=\"$(CLEANUP)\" \
$(EXTRA_RUNTEST_OPTS)
TESTS =
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/ccall/should_run/all.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/ccall/should_run/all.T
@@ -23,6 +23,7 @@
# Omit GHCi for these two, as they use foreign export
test('ffi001', omit_ways(['ghci']), compile_and_run, [''])
test('ffi002', omit_ways(['ghci']), compile_and_run, ['ffi002_c.c -no-hs-main'])
+clean(['ffi002_c.o'])
if config.platform == 'alpha-dec-osf3':
f = skip
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/cpranal/should_compile/all.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/cpranal/should_compile/all.T
@@ -4,5 +4,6 @@
setTestOpts(f)
-test('Cpr001_imp', normal, compile, [''])
+test('Cpr001_imp', no_clean, compile, [''])
test('Cpr001', normal, compile, [''])
+clean(['Cpr001_imp.hi', 'Cpr001_imp.o', 'Cpr001_imp.comp.stderr'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/driver/all.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/driver/all.T
@@ -23,3 +23,9 @@
test('driver061', normal, run_command_ignore_output, ['$MAKE test061'])
test('driver062', normal, run_command_ignore_output, ['$MAKE test062'])
test('driver063', normal, run_command, ['$MAKE -s test063'])
+clean(['B/C.hi', 'B/C.o', 'B/C.ooo', 'B/C.xhi', 'd1/P/Q.o', 'd2/R/S.o',
+ 'A.ooo', 'A.xhi', 'Hello.hi', 'Hello.o', 'hello'])
+
+if default_testopts.cleanup != '':
+ os.spawnlp(os.P_WAIT, 'rm', 'rm', '-rf', in_testdir('obj'))
+ os.spawnlp(os.P_WAIT, 'rm', 'rm', '-rf', in_testdir('hi'))
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/ghci/prog001/prog001.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/ghci/prog001/prog001.T
@@ -1 +1,3 @@
test('prog001', normal, ghci_script, ['prog001.script'])
+clean(['D.hi', 'D.o'])
+
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/ghci/prog002/prog002.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/ghci/prog002/prog002.T
@@ -1 +1,3 @@
test('prog002', normal, ghci_script, ['prog002.script'])
+clean(['A.hi'])
+
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/ghci/prog003/prog003.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/ghci/prog003/prog003.T
@@ -1 +1,3 @@
test('prog003', normal, ghci_script, ['prog003.script'])
+clean(['D.hi', 'C.hi', 'C.o', 'B.hi', 'B.o', 'A.hi', 'A.o', 'a.out'])
+
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/Generics/bits/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/Generics/bits/test.T
@@ -3,3 +3,4 @@
multimod_compile_and_run,
['Main','']
)
+clean(['CompanyDatatypes.hi', 'CompanyDatatypes.o', 'Main.hi', 'Main.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/Generics/ext1/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/Generics/ext1/test.T
@@ -3,3 +3,4 @@
multimod_compile_and_run,
['Main','']
)
+clean(['Main.hi', 'Main.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/Generics/freeNames/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/Generics/freeNames/test.T
@@ -3,3 +3,4 @@
multimod_compile_and_run,
['Main','']
)
+clean(['FunDatatypes.hi', 'FunDatatypes.o', 'Main.hi', 'Main.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/Generics/genUpTo/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/Generics/genUpTo/test.T
@@ -3,3 +3,4 @@
multimod_compile_and_run,
['Main','']
)
+clean(['LittleLanguage.hi', 'LittleLanguage.o', 'Main.hi', 'Main.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/Generics/geq/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/Generics/geq/test.T
@@ -3,3 +3,4 @@
multimod_compile_and_run,
['Main','']
)
+clean(['CompanyDatatypes.hi', 'CompanyDatatypes.o', 'Main.hi', 'Main.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/Generics/gshow/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/Generics/gshow/test.T
@@ -3,3 +3,4 @@
multimod_compile_and_run,
['Main','']
)
+clean(['CompanyDatatypes.hi', 'CompanyDatatypes.o', 'Main.hi', 'Main.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/Generics/gzip/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/Generics/gzip/test.T
@@ -3,3 +3,4 @@
multimod_compile_and_run,
['Main','']
)
+clean(['CompanyDatatypes.hi', 'CompanyDatatypes.o', 'Main.hi', 'Main.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/Generics/paradise/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/Generics/paradise/test.T
@@ -3,3 +3,4 @@
multimod_compile_and_run,
['Main','']
)
+clean(['CompanyDatatypes.hi', 'CompanyDatatypes.o', 'Main.hi', 'Main.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/Generics/reify/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/Generics/reify/test.T
@@ -3,3 +3,4 @@
multimod_compile_and_run,
['Main','']
)
+clean(['CompanyDatatypes.hi', 'CompanyDatatypes.o', 'Main.hi', 'Main.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/Generics/strings/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/Generics/strings/test.T
@@ -3,3 +3,4 @@
multimod_compile_and_run,
['Main','']
)
+clean(['CompanyDatatypes.hi', 'CompanyDatatypes.o', 'Main.hi', 'Main.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/Generics/tree/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/Generics/tree/test.T
@@ -3,3 +3,4 @@
multimod_compile_and_run,
['Main','']
)
+clean(['CompanyDatatypes.hi', 'CompanyDatatypes.o', 'Main.hi', 'Main.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/Generics/xmlish/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/Generics/xmlish/test.T
@@ -3,3 +3,4 @@
multimod_compile_and_run,
['Main','']
)
+clean(['CompanyDatatypes.hi', 'CompanyDatatypes.o', 'Main.hi', 'Main.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/IO/all.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/IO/all.T
@@ -8,9 +8,12 @@
test('IOError002', normal, compile_and_run, [''])
test('finalization001', normal, compile_and_run, [''])
test('hClose001', normal, compile_and_run, [''])
+clean(['hClose001.tmp'])
test('hFileSize001', normal, compile_and_run, [''])
test('hFileSize002', omit_ways(['ghci']), compile_and_run, [''])
+clean(['hFileSize002.out'])
test('hFlush001', normal, compile_and_run, [''])
+clean(['hFlush001.out'])
test('hGetBuffering001',
compose(omit_ways(['ghci']), set_stdin('hGetBuffering001.hs')),
@@ -21,8 +24,10 @@
test('hGetLine002', normal, compile_and_run, [''])
test('hGetLine003', normal, compile_and_run, [''])
test('hGetPosn001', normal, compile_and_run, ['-cpp'])
+clean(['hGetPosn001.out'])
test('hIsEOF001', normal, compile_and_run, [''])
test('hIsEOF002', normal, compile_and_run, ['-cpp'])
+clean(['hIsEOF002.out'])
# hReady doesn't work at the end of a file in GHC
test('hReady001', expect_fail, compile_and_run, ['-cpp'])
@@ -31,6 +36,7 @@
test('hSeek002', normal, compile_and_run, ['-cpp'])
test('hSeek003', normal, compile_and_run, ['-cpp'])
test('hSeek004', normal, compile_and_run, ['-cpp'])
+clean(['hSeek004.out'])
test('hSetBuffering002', set_stdin('hSetBuffering002.hs'), compile_and_run, [''])
@@ -45,19 +51,27 @@
test('misc001', extra_run_opts('misc001.hs misc001.out'), \
compile_and_run, [''])
+clean(['misc001.out'])
test('openFile001', normal, compile_and_run, [''])
test('openFile002', exit_code(1), compile_and_run, [''])
test('openFile003', normal, compile_and_run, [''])
test('openFile004', normal, compile_and_run, [''])
+clean(['openFile004.out'])
test('openFile005', expect_fail_if_windows, compile_and_run, [''])
+clean(['openFile005.out1', 'openFile005.out2'])
test('openFile006', normal, compile_and_run, [''])
+clean(['openFile006.out'])
test('openFile007', expect_fail_if_windows, compile_and_run, [''])
+clean(['openFile007.out'])
test('putStr001', normal, compile_and_run, [''])
test('readFile001', expect_fail_if_windows, compile_and_run, [''])
+clean(['readFile001.out'])
test('readwrite001', normal, compile_and_run, ['-cpp'])
+clean(['readwrite001.inout'])
test('readwrite002', compose(omit_ways(['ghci']), set_stdin('readwrite002.hs')),
compile_and_run, ['-cpp'])
+clean(['readwrite002.inout'])
test('hGetBuf001', expect_fail_if_windows, compile_and_run, ['-package unix'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/lib/IOExts/all.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/lib/IOExts/all.T
@@ -19,3 +19,4 @@
test('hGetBuf001', normal, compile_and_run, [''])
test('hPutBuf001', normal, compile_and_run, [''])
test('hPutBuf002', normal, compile_and_run, [''])
+clean(['hPutBuf002.out'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/module/all.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/module/all.T
@@ -120,7 +120,9 @@
test('mod99', normal, compile, [''])
test('mod100', normal, compile, [''])
test('mod101', normal, multimod_compile_fail, ['mod101', '-v0'])
+clean(['Mod101_AuxA.hi', 'Mod101_AuxA.o', 'Mod101_AuxB.hi', 'Mod101_AuxB.o'])
test('mod102', normal, multimod_compile_fail, ['mod102', '-v0'])
+clean(['Mod102_AuxA.hi', 'Mod102_AuxA.o', 'Mod102_AuxB.hi', 'Mod102_AuxB.o'])
test('mod103', normal, compile, [''])
test('mod104', normal, compile, [''])
test('mod105', normal, compile, [''])
@@ -133,24 +135,40 @@
test('mod112', normal, compile, [''])
test('mod113', normal, compile, [''])
test('mod114', normal, multimod_compile_fail, ['mod114', '-v0'])
+clean(['Mod114_Help.hi', 'Mod114_Help.o'])
test('mod115', normal, multimod_compile, ['mod115', '-v0'])
+clean(['Mod115_A.hi', 'Mod115_A.o', 'Mod115_B.hi', 'Mod115_B.o'])
test('mod116', normal, compile_fail, [''])
test('mod117', normal, multimod_compile, ['mod117', '-v0'])
+clean(['Mod117_A.hi', 'Mod117_A.o', 'Mod117_B.hi', 'Mod117_B.o'])
test('mod118', normal, multimod_compile, ['mod118', '-v0'])
+clean(['Mod118_A.hi', 'Mod118_A.o', 'Mod118_B.hi', 'Mod118_B.o'])
test('mod119', normal, multimod_compile, ['mod119', '-v0'])
+clean(['Mod119_A.hi', 'Mod119_A.o', 'Mod119_B.hi', 'Mod119_B.o'])
test('mod120', normal, multimod_compile_fail, ['mod120', '-v0'])
+clean(['Mod120_A.hi', 'Mod120_A.o'])
test('mod121', normal, multimod_compile_fail, ['mod121', '-v0'])
+clean(['Mod121_A.hi', 'Mod121_A.o'])
test('mod122', normal, multimod_compile_fail, ['mod122', '-v0'])
+clean(['Mod122_A.hi', 'Mod122_A.o'])
test('mod123', normal, multimod_compile_fail, ['mod123', '-v0'])
+clean(['Mod123_A.hi', 'Mod123_A.o'])
test('mod124', normal, multimod_compile_fail, ['mod124', '-v0'])
+clean(['Mod124_A.hi', 'Mod124_A.o'])
test('mod125', normal, multimod_compile_fail, ['mod125', '-v0'])
+clean(['Mod124_A.hi', 'Mod124_A.o'])
test('mod126', normal, multimod_compile_fail, ['mod126', '-v0'])
+clean(['Mod126_A.hi', 'Mod126_A.o'])
test('mod127', normal, multimod_compile_fail, ['mod127', '-v0'])
+clean(['Mod126_A.hi', 'Mod126_A.o'])
test('mod128', normal, multimod_compile, ['mod128', '-v0'])
+clean(['Mod128_A.hi', 'Mod128_A.o'])
test('mod129', normal, compile, [''])
test('mod130', normal, compile_fail, [''])
test('mod131', normal, multimod_compile_fail, ['mod131', '-v0'])
+clean(['Mod131_A.hi', 'Mod131_A.o', 'Mod131_B.hi', 'Mod131_B.o'])
test('mod132', normal, multimod_compile_fail, ['mod132', '-v0'])
+clean(['Mod132_A.hi', 'Mod132_A.o', 'Mod132_B.hi', 'Mod132_B.o'])
test('mod133', normal, compile, [''])
test('mod134', normal, compile_fail, [''])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/parser/prog001/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/parser/prog001/test.T
@@ -1,2 +1,3 @@
test('parser.prog001', normal, multimod_compile, \
['Read007', '-v0'])
+clean(['Read006.hi', 'Read006.o', 'Read007.hi', 'Read007.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/10queens/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/10queens/test.T
@@ -1,2 +1,3 @@
test('10queens', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/andre_monad/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/andre_monad/test.T
@@ -1,3 +1,4 @@
test('andre_monad', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/andy_cherry/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/andy_cherry/test.T
@@ -1,4 +1,5 @@
test('andy_cherry', extra_run_opts('.'), multimod_compile_and_run, \
['Main', '-cpp'])
+clean_o_hi()
---
ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/barton-mangler-bug/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/barton-mangler-bug/test.T
@@ -1,3 +1,4 @@
# Expect failure when running the optasm way, due to floating-point
# differences.
test('barton-mangler-bug', expect_fail_for(['optasm']), multimod_compile_and_run,
['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/cholewo-eval/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/cholewo-eval/test.T
@@ -1,3 +1,4 @@
# Expect failure when running the optasm way, due to floating-point
# differences.
test('cholewo-eval', expect_fail_for(['optasm']), multimod_compile_and_run, ['Main',
''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/cvh_unboxing/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/cvh_unboxing/test.T
@@ -1,4 +1,5 @@
test('cvh_unboxing', normal, multimod_compile_and_run, \
['Main', '-fglasgow-exts'])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/fast2haskell/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/fast2haskell/test.T
@@ -1,4 +1,5 @@
test('fast2haskell', normal, multimod_compile_and_run, \
['Main', '-fglasgow-exts -package lang'])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/fun_insts/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/fun_insts/test.T
@@ -1,3 +1,4 @@
test('fun_insts', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/galois_raytrace/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/galois_raytrace/test.T
@@ -6,4 +6,5 @@
compose(omit_ways(['normal']), expect_fail_for(['optasm'])), \
multimod_compile_and_run, \
['Main', '-O -package lang -package text'])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/jl_defaults/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/jl_defaults/test.T
@@ -1,3 +1,4 @@
test('jl_defaults', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/joao-circular/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/joao-circular/test.T
@@ -1 +1,2 @@
test('joao-circular', extra_run_opts('inp 40'), multimod_compile_and_run, ['Main',
'-O'])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/jq_readsPrec/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/jq_readsPrec/test.T
@@ -1,3 +1,4 @@
test('jq_readsPrec', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/jtod_circint/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/jtod_circint/test.T
@@ -1,3 +1,4 @@
test('jtod_circint', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/jules_xref/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/jules_xref/test.T
@@ -1,3 +1,4 @@
test('jules_xref', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/jules_xref2/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/jules_xref2/test.T
@@ -1,3 +1,4 @@
test('jules_xref2', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/launchbury/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/launchbury/test.T
@@ -1,3 +1,4 @@
test('launchbury', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/lennart_range/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/lennart_range/test.T
@@ -1,3 +1,4 @@
test('lennart_range', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/lex/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/lex/test.T
@@ -1,3 +1,4 @@
test('lex', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/life_space_leak/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/life_space_leak/test.T
@@ -1,3 +1,4 @@
test('life_space_leak', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/north_array/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/north_array/test.T
@@ -1,3 +1,4 @@
test('north_array', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/record_upd/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/record_upd/test.T
@@ -1,3 +1,4 @@
test('record_upd', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/rittri/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/rittri/test.T
@@ -1,3 +1,4 @@
test('rittri', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/sanders_array/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/sanders_array/test.T
@@ -1,3 +1,4 @@
test('sanders_array', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/seward-space-leak/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/seward-space-leak/test.T
@@ -1,3 +1,4 @@
test('seward-space-leak', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/strict_anns/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/strict_anns/test.T
@@ -1,3 +1,4 @@
test('strict_anns', normal, multimod_compile_and_run, ['Main', ''])
+clean_o_hi()
---
ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/programs/thurston-modular-arith/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/programs/thurston-modular-arith/test.T
@@ -1,3 +1,4 @@
test('thurston-modular-arith', normal, multimod_compile_and_run, \
['Main', ''])
+clean_o_hi()
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/rename/prog001/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/rename/prog001/test.T
@@ -1,2 +1,3 @@
test('rename.prog001', normal, multimod_compile, \
['rn037', '-v0'])
+clean(['Rn037Help.hi', 'Rn037Help.o', 'rn037.hi', 'rn037.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/rename/prog002/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/rename/prog002/test.T
@@ -1,2 +1,3 @@
test('rename.prog002', normal, multimod_compile_fail, \
['rnfail037', '-v0'])
+clean(['Rn037Help.hi', 'Rn037Help.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/rename/prog003/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/rename/prog003/test.T
@@ -1,2 +1,3 @@
test('rename.prog003', normal, multimod_compile_fail, \
['B', '-v0'])
+clean(['A.hi', 'A.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/rename/prog004/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/rename/prog004/test.T
@@ -1,2 +1,3 @@
test('rename.prog004', normal, multimod_compile, \
['C', '-v0'])
+clean(['A.hi', 'A.o', 'B.hi', 'B.o', 'C.hi', 'C.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/rename/should_compile/all.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/rename/should_compile/all.T
@@ -34,8 +34,11 @@
test('rn040', normal, compile, ['-fwarn-unused-binds -fwarn-unused-matches'])
test('rn041', normal, compile, [''])
test('rn042', normal, multimod_compile, ['rn042', '-v0'])
-test('rn043', normal, multimod_compile, ['rn042', '-v0'])
-test('rn044', normal, multimod_compile, ['rn042', '-v0'])
+clean(['Rn042_A.hi', 'Rn042_A.o'])
+test('rn043', normal, multimod_compile, ['rn043', '-v0'])
+clean(['Rn043_A.hi', 'Rn043_A.o', 'Rn043_B.hi', 'Rn043_B.o'])
+test('rn044', normal, multimod_compile, ['rn044', '-v0'])
+clean(['Rn043_A.hi', 'Rn043_A.o', 'Rn043_B.hi', 'Rn043_B.o'])
test('rn045', normal, compile, [''])
test('rn046', normal, compile, ['-W'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/rename/should_fail/all.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/rename/should_fail/all.T
@@ -40,5 +40,6 @@
test('rnfail039', normal, compile_fail, [''])
test('rnfail040', normal, multimod_compile_fail, ['rnfail040', '-v0'])
+clean(['Rnfail040_A.hi', 'Rnfail040_A.o'])
test('rnfail041', normal, compile_fail, [''])
test('rnfail042', normal, compile_fail, [''])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/simplCore/prog001/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/simplCore/prog001/test.T
@@ -1 +1,2 @@
test('simplCore.prog001', normal, multimod_compile, ['simpl006', '-v0'])
+clean(['Simpl006Help.hi', 'Simpl006Help.o', 'simpl006.hi', 'simpl006.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/simplCore/prog002/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/simplCore/prog002/test.T
@@ -1,2 +1,3 @@
test('simplCore.prog002', normal, multimod_compile, \
['simpl009', '-v0'])
+clean(['Simpl009Help.hi', 'Simpl009Help.o', 'simpl009.hi', 'simpl009.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/th/all.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/th/all.T
@@ -21,6 +21,7 @@
test('TH_spliceDecl1', normal, compile, ['-v0'])
test('TH_spliceDecl2', normal, compile, ['-v0'])
test('TH_spliceDecl3', normal, multimod_compile, ['TH_spliceDecl3', '-v0'])
+clean(['TH_spliceDecl3_Lib.hi', 'TH_spliceDecl3_Lib.o'])
test('TH_spliceE1', normal, compile_and_run, [''])
test('TH_spliceExpr1', normal, compile, ['-v0'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/typecheck/prog001/test.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/typecheck/prog001/test.T
@@ -1,3 +1,4 @@
test('typecheck.prog001', normal, multimod_compile, \
['C', '-v0 -fglasgow-exts'])
+clean(['A.hi', 'A.o', 'B.hi', 'B.o', 'C.hi', 'C.o'])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/typecheck/should_compile/all.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/typecheck/should_compile/all.T
@@ -172,14 +172,16 @@
# which we do by steam here, with a pair of tests. Make sure
# we run one way only, so we can be sure to have the right kind
# of interface file for the second part of the test.
-test('Tc170_Aux', only_ways(['opt']), compile, [''])
+test('Tc170_Aux', compose(no_clean, only_ways(['opt'])), compile, [''])
test('tc170', only_ways(['opt']), compile, [''])
+clean(['Tc170_Aux.comp.stderr', 'Tc170_Aux.hi', 'Tc170_Aux.o'])
test('tc171', normal, compile, [''])
test('tc172', normal, compile, [''])
# The point about this test is that it compiles Tc173a and Tc173b *separately*
test('tc173', normal, run_command_ignore_output, ['make tc173'])
+clean(['Tc173a.hi', 'Tc173a.o', 'Tc173b.hi', 'Tc173b.o'])
test('tc174', normal, compile, [''])
test('tc175', expect_fail, compile, [''])
--- ghc-cvs-20040725.orig/testsuite/tests/ghc-regress/typecheck/should_run/all.T
+++ ghc-cvs-20040725/testsuite/tests/ghc-regress/typecheck/should_run/all.T
@@ -29,6 +29,7 @@
test('tcrun023', normal, compile_and_run, ['-O'])
test('tcrun024', normal, compile_and_run, ['-O'])
test('tcrun025', normal, multimod_compile_and_run, ['tcrun025',''])
+clean(['TcRun025_B.hi', 'TcRun025_B.o'])
test('tcrun026', normal, compile_and_run, [''])
test('tcrun027', normal, compile_and_run, [''])
# Doesn't work with External Core due to datatype with no constructors
_______________________________________________
Cvs-fptools mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-fptools