Commit 3ff21bd7 authored by Ian Lynagh's avatar Ian Lynagh

Don't clean tests that we aren't running

This can make it a lot faster to run a single test.

You can run
    make CLEANUP=1 CLEAN_ONLY=YES
to clean everything without running any tests.
parent 04fd366e
......@@ -59,6 +59,7 @@ if (ghc_with_llvm == 1):
config.run_ways.append('optllvm')
config.in_tree_compiler = in_tree_compiler
config.clean_only = clean_only
config.way_flags = {
'normal' : [],
......
......@@ -562,15 +562,16 @@ def test_common_work (name, opts, func, args):
if config.fast and len(do_ways) > 0:
do_ways = [do_ways[0]]
# Run the required tests...
for way in do_ways:
do_test (name, way, func, args)
if not config.clean_only:
# Run the required tests...
for way in do_ways:
do_test (name, way, func, args)
for way in all_ways:
if way not in do_ways:
skiptest (name,way)
for way in all_ways:
if way not in do_ways:
skiptest (name,way)
if getTestOpts().cleanup != '':
if getTestOpts().cleanup != '' and (config.clean_only or do_ways != []):
clean(map (lambda suff: name + suff,
['', '.exe', '.exe.manifest', '.genscript',
'.stderr.normalised', '.stdout.normalised',
......
......@@ -121,6 +121,12 @@ ifneq "$(THREADS)" ""
RUNTEST_OPTS += --threads=$(THREADS)
endif
ifneq "$(CLEAN_ONLY)" ""
RUNTEST_OPTS += -e clean_only=True
else
RUNTEST_OPTS += -e clean_only=False
endif
ifneq "$(CHECK_FILES_WRITTEN)" ""
RUNTEST_OPTS += --check-files-written
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment