svn commit: trunk/busybox: testsuite

aldot at busybox.net aldot at busybox.net
Thu Oct 6 12:48:06 UTC 2005


Author: aldot
Date: 2005-10-06 05:48:03 -0700 (Thu, 06 Oct 2005)
New Revision: 11787

Log:
- support make check V=1 to run the checks in verbose mode
- pass verbose from runtest to testing.sh 


Modified:
   trunk/busybox/Makefile
   trunk/busybox/testsuite/runtest
   trunk/busybox/testsuite/testing.sh


Changeset:
Modified: trunk/busybox/Makefile
===================================================================
--- trunk/busybox/Makefile	2005-10-06 12:12:51 UTC (rev 11786)
+++ trunk/busybox/Makefile	2005-10-06 12:48:03 UTC (rev 11787)
@@ -216,9 +216,19 @@
 install-hardlinks: $(top_srcdir)/applets/install.sh busybox busybox.links
 	$(SHELL) $< $(PREFIX) --hardlinks
 
+# see if we are in verbose mode
+KBUILD_VERBOSE :=
+ifdef V
+  ifeq ("$(origin V)", "command line")
+    KBUILD_VERBOSE := $(V)
+  endif
+endif
+ifneq ($(strip $(KBUILD_VERBOSE)),)
+  CHECK_VERBOSE := -v
+endif
 check test: busybox
 	bindir=$(top_builddir) srcdir=$(top_srcdir)/testsuite \
-	$(top_srcdir)/testsuite/runtest
+	$(top_srcdir)/testsuite/runtest $(CHECK_VERBOSE)
 
 sizes:
 	-rm -f busybox

Modified: trunk/busybox/testsuite/runtest
===================================================================
--- trunk/busybox/testsuite/runtest	2005-10-06 12:12:51 UTC (rev 11786)
+++ trunk/busybox/testsuite/runtest	2005-10-06 12:48:03 UTC (rev 11787)
@@ -37,7 +37,7 @@
 
 	if [ $? != 0 ] ; then
 		echo FAIL: $testname
-		if [ "$verbose" = 1 ]; then
+		if [ $verbose -gt 0 ]; then
 			cat .logfile.txt
 			#exit 1;
 		fi;
@@ -77,14 +77,16 @@
 
 
 status=0
+verbose=0
 
 if [ x"$1" = x"-v" ]; then
 	verbose=1
+	export VERBOSE=$verbose
 	shift
 fi
 
 if [ $# -ne 0 ]; then
-	applets="$@"
+	applets=$(cd $srcdir ; for i in $@; do ls ${i}* ; done)
 else
 	applets=$(ls $srcdir)
 fi

Modified: trunk/busybox/testsuite/testing.sh
===================================================================
--- trunk/busybox/testsuite/testing.sh	2005-10-06 12:12:51 UTC (rev 11786)
+++ trunk/busybox/testsuite/testing.sh	2005-10-06 12:48:03 UTC (rev 11787)
@@ -54,7 +54,7 @@
 
 # The testing function
 
-testing()
+testing ()
 {
   if [ $# -ne 5 ]
   then
@@ -62,11 +62,11 @@
     exit
   fi
 
-  if [ "$debug" = "1" ] ; then
+  if [ $debug -eq 1 ] ; then
     set -x
   fi
 
-  if [ -n "$_BB_CONFIG_DEP" ] && [ "${force}" = "0" ]
+  if [ -n "$_BB_CONFIG_DEP" ] && [ ${force} -eq 0 ]
   then
     if ! config_is_set "$_BB_CONFIG_DEP"
     then
@@ -85,7 +85,7 @@
   then
 	((FAILCOUNT++))
 	echo "FAIL: $1"
-	if [ "$verbose" = "1" ]
+	if [ $verbose -eq 1 ]
 	then
 		diff -u expected actual
 	fi
@@ -94,7 +94,7 @@
   fi
   rm -f input expected actual
 
-  if [ "$debug" = "1" ] ; then
+  if [ $debug -eq 1 ] ; then
     set +x
   fi
 




More information about the busybox-cvs mailing list