[Logging-commits] r46 - pkg/inst/unitTest

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Oct 4 09:36:12 CEST 2010


Author: mariotomo
Date: 2010-10-04 09:36:11 +0200 (Mon, 04 Oct 2010)
New Revision: 46

Added:
   pkg/inst/unitTest/Makefile
Log:
moving to svUnit


Added: pkg/inst/unitTest/Makefile
===================================================================
--- pkg/inst/unitTest/Makefile	                        (rev 0)
+++ pkg/inst/unitTest/Makefile	2010-10-04 07:36:11 UTC (rev 46)
@@ -0,0 +1,30 @@
+# $Id: Makefile 32 2010-08-12 13:15:21Z mariotomo $
+
+TOP=../..
+PKG=${shell cd ${TOP};pwd}
+SUITE=doSvUnit.R
+R=R
+
+all: inst xtest
+
+xtest: inst test ## produces an output that can be used in emacs compilation buffer
+	egrep "\*\*(FAILS|ERROR)\*\* in [^:]*" ${TOP}/tests/.output -o | cut -d\  -f 3- | xargs -I {} -n 1 grep -nF "{}" *.R
+
+inst: # Install package
+	cd ${TOP}/..;\
+	${R} CMD INSTALL ${PKG}
+
+test: # Run unit tests
+	export RCMDCHECK=FALSE;\
+	cd ${TOP}/tests;\
+	${R} --vanilla --slave < ${SUITE} | grep . | tee .output;
+
+cover: # compute unit tests coverage
+	export RCMDCHECK=FALSE;\
+	cd ${TOP}/tests;\
+	${R} --vanilla --slave < ${SUITE}
+
+## useful oneliner for quickly finding the testcases.
+##
+## for i in $(make 2>&1 | egrep "FAILURE in ([^:]*)" -o | cut -b 12-); do grep -n $i *.R ; done
+##



More information about the Logging-commits mailing list