test.mk 1.23 KB
Newer Older
1 2 3 4 5 6 7 8 9
# -----------------------------------------------------------------------------
# Examples of use:
#
# 	make		-- run all the tests in the current directory
# 	make verbose	-- as make test, but up the verbosity
# 	make accept	-- run the tests, accepting the current output
#
# The following variables may be set on the make command line:
#
10 11
#	TEST		-- specific test to run
#	TESTS		-- specific tests to run (same as $TEST really)
12 13 14 15 16 17
#	EXTRA_HC_OPTS	-- extra flags to send to the Haskell compiler
#	EXTRA_RUNTEST_OPTS -- extra flags to give the test driver
#	CONFIG		-- use a different configuration file
#
# -----------------------------------------------------------------------------

rrt's avatar
rrt committed
18
# ghastly hack, because the driver requires that $tool be an absolute path name.
19 20 21 22 23
GHC_INPLACE_ABS	= $(FPTOOLS_TOP_ABS)/ghc/compiler/ghc-inplace

RUNTESTS     = $(TOP)/driver/runtests
RUNTEST_OPTS =  --config=$(CONFIG) tool=$(GHC_INPLACE_ABS) extra_hc_flags="$(EXTRA_HC_OPTS)" $(EXTRA_RUNTEST_OPTS)
CONFIG       = $(TOP)/config/msrc/cam-02-unx.T
24

25
TESTS	     = 
26
TEST	     = 
27 28 29 30

all :: test

test:
31
	$(RUNTESTS) $(RUNTEST_OPTS) $(TEST) $(TESTS)
32 33

verbose:
34
	$(RUNTESTS) $(RUNTEST_OPTS) verbose= $(TEST) $(TESTS)
35 36

accept:
37
	$(RUNTESTS) $(RUNTEST_OPTS) accept= verbose= $(TEST) $(TESTS)
38