- support make check V=1 to run the checks in verbose mode
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 6 Oct 2005 12:48:03 +0000 (12:48 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 6 Oct 2005 12:48:03 +0000 (12:48 -0000)
- pass verbose from runtest to testing.sh

Makefile
testsuite/runtest
testsuite/testing.sh

index 4f052ff1f846ad8fd340418c1d64e7421dad6c6e..e38e3e2538827687e1722e89a10e2c9b997e2312 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -216,9 +216,19 @@ uninstall: busybox.links
 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
index 4ac1d3bfed0b637ab5fe61383c26e2145446dc8c..9fd2d0f13dabb5c1151d3bc03512461b93abd900 100755 (executable)
@@ -37,7 +37,7 @@ run_applet_testcase ()
 
        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 @@ run_applet_tests ()
 
 
 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
index b7c85c227ba009c1c0399e9015d7ae16a4c1159b..83727f6d3259eec3d304846e731b2b0c8915d124 100755 (executable)
@@ -54,7 +54,7 @@ config_is_set ()
 
 # The testing function
 
-testing()
+testing ()
 {
   if [ $# -ne 5 ]
   then
@@ -62,11 +62,11 @@ testing()
     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 @@ testing()
   then
        ((FAILCOUNT++))
        echo "FAIL: $1"
-       if [ "$verbose" = "1" ]
+       if [ $verbose -eq 1 ]
        then
                diff -u expected actual
        fi
@@ -94,7 +94,7 @@ testing()
   fi
   rm -f input expected actual
 
-  if [ "$debug" = "1" ] ; then
+  if [ $debug -eq 1 ] ; then
     set +x
   fi