make test and fulltest targets in the main Makefile; fixes #4297
authorIan Lynagh <igloo@earth.li>
Thu, 30 Sep 2010 22:47:41 +0000 (22:47 +0000)
committerIan Lynagh <igloo@earth.li>
Thu, 30 Sep 2010 22:47:41 +0000 (22:47 +0000)
You can now run "make test" in the root, and the fast testsuite will be
run with cleaning enabled. It will also put the summary in
testsuite_summary.txt.

Makefile
validate

index de5ee8a..93ee7bc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@ endif
 include mk/custom-settings.mk
 
 # No need to update makefiles for these targets:
-REALGOALS=$(filter-out binary-dist binary-dist-prep bootstrapping-files framework-pkg clean clean_% distclean maintainer-clean show help install-docs,$(MAKECMDGOALS))
+REALGOALS=$(filter-out binary-dist binary-dist-prep bootstrapping-files framework-pkg clean clean_% distclean maintainer-clean show help install-docs test fulltest,$(MAKECMDGOALS))
 
 # configure touches certain files even if they haven't changed.  This
 # can mean a lot of unnecessary recompilation after a re-configure, so
@@ -119,3 +119,12 @@ install-docs:
 .NOTPARALLEL:
 
 endif
+
+.PHONY: test
+test:
+       $(MAKE) -C testsuite/tests/ghc-regress CLEANUP=1 OUTPUT_SUMMARY=../../../testsuite_summary.txt fast
+
+.PHONY: fulltest
+fulltest:
+       $(MAKE) -C testsuite/tests/ghc-regress CLEANUP=1 OUTPUT_SUMMARY=../../../testsuite_summary.txt
+
index 5becd3f..245d0bd 100644 (file)
--- a/validate
+++ b/validate
@@ -98,7 +98,7 @@ then
     rm -f $HPCTIXFILE
 fi
 
-$make -C testsuite/tests/ghc-regress fast stage=2 CLEANUP=1 BINDIST=YES THREADS=$threads 2>&1 | tee testlog
+$make test stage=2 BINDIST=YES THREADS=$threads 2>&1 | tee testlog
 
 if [ "$hpc" = YES ]
 then