From 0926c9b752cb93cdce8657441a0d03b3788a4a75 Mon Sep 17 00:00:00 2001 From: FrancisANDRE Date: Fri, 21 Aug 2015 14:16:45 +0200 Subject: [PATCH] add command line arguments as [component] [test] for unit testing a single test. Signed-off-by: FrancisANDRE --- build/script/runtests.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/build/script/runtests.sh b/build/script/runtests.sh index 501a2340b..5a1bc1787 100755 --- a/build/script/runtests.sh +++ b/build/script/runtests.sh @@ -4,17 +4,31 @@ # # A script for running the POCO testsuites. # -# usage: runtests +# usage: runtests [component] [test] # # If the environment variable EXCLUDE_TESTS is set, containing # a space-separated list of project names (as found in the # components file), these tests will be skipped. # -TESTRUNNER=./testrunner -TESTRUNNERARGS=-all +if [ "$POCO_BASE" = "" ] ; then + POCO_BASE=`pwd` +fi + +TESTRUNNER=./testrunner + +if [ "$1" = "" ] ; then + components=`cat $POCO_BASE/components` +else + components=$1 +fi + +if [ "$2" = "" ] ; then + TESTRUNNERARGS=-all +else + TESTRUNNERARGS=$2 +fi -components=`cat $POCO_BASE/components` if [ "$OSNAME" = "" ] ; then OSNAME=`uname`