aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2005-10-06 12:48:03 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2005-10-06 12:48:03 +0000
commite34e8782a979b372c521d460511d82d87f5a3646 (patch)
tree149d7c0dc3bc772a93d8ae96bf39a0e357452a62
parentcf95e0b2d5f5dd0b0682bd4cc5959cf32427134f (diff)
downloadbusybox-w32-e34e8782a979b372c521d460511d82d87f5a3646.tar.gz
busybox-w32-e34e8782a979b372c521d460511d82d87f5a3646.tar.bz2
busybox-w32-e34e8782a979b372c521d460511d82d87f5a3646.zip
- support make check V=1 to run the checks in verbose mode
- pass verbose from runtest to testing.sh
-rw-r--r--Makefile12
-rwxr-xr-xtestsuite/runtest6
-rwxr-xr-xtestsuite/testing.sh10
3 files changed, 20 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 4f052ff1f..e38e3e253 100644
--- a/Makefile
+++ b/Makefile
@@ -216,9 +216,19 @@ uninstall: busybox.links
216install-hardlinks: $(top_srcdir)/applets/install.sh busybox busybox.links 216install-hardlinks: $(top_srcdir)/applets/install.sh busybox busybox.links
217 $(SHELL) $< $(PREFIX) --hardlinks 217 $(SHELL) $< $(PREFIX) --hardlinks
218 218
219# see if we are in verbose mode
220KBUILD_VERBOSE :=
221ifdef V
222 ifeq ("$(origin V)", "command line")
223 KBUILD_VERBOSE := $(V)
224 endif
225endif
226ifneq ($(strip $(KBUILD_VERBOSE)),)
227 CHECK_VERBOSE := -v
228endif
219check test: busybox 229check test: busybox
220 bindir=$(top_builddir) srcdir=$(top_srcdir)/testsuite \ 230 bindir=$(top_builddir) srcdir=$(top_srcdir)/testsuite \
221 $(top_srcdir)/testsuite/runtest 231 $(top_srcdir)/testsuite/runtest $(CHECK_VERBOSE)
222 232
223sizes: 233sizes:
224 -rm -f busybox 234 -rm -f busybox
diff --git a/testsuite/runtest b/testsuite/runtest
index 4ac1d3bfe..9fd2d0f13 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -37,7 +37,7 @@ run_applet_testcase ()
37 37
38 if [ $? != 0 ] ; then 38 if [ $? != 0 ] ; then
39 echo FAIL: $testname 39 echo FAIL: $testname
40 if [ "$verbose" = 1 ]; then 40 if [ $verbose -gt 0 ]; then
41 cat .logfile.txt 41 cat .logfile.txt
42 #exit 1; 42 #exit 1;
43 fi; 43 fi;
@@ -77,14 +77,16 @@ run_applet_tests ()
77 77
78 78
79status=0 79status=0
80verbose=0
80 81
81if [ x"$1" = x"-v" ]; then 82if [ x"$1" = x"-v" ]; then
82 verbose=1 83 verbose=1
84 export VERBOSE=$verbose
83 shift 85 shift
84fi 86fi
85 87
86if [ $# -ne 0 ]; then 88if [ $# -ne 0 ]; then
87 applets="$@" 89 applets=$(cd $srcdir ; for i in $@; do ls ${i}* ; done)
88else 90else
89 applets=$(ls $srcdir) 91 applets=$(ls $srcdir)
90fi 92fi
diff --git a/testsuite/testing.sh b/testsuite/testing.sh
index b7c85c227..83727f6d3 100755
--- a/testsuite/testing.sh
+++ b/testsuite/testing.sh
@@ -54,7 +54,7 @@ config_is_set ()
54 54
55# The testing function 55# The testing function
56 56
57testing() 57testing ()
58{ 58{
59 if [ $# -ne 5 ] 59 if [ $# -ne 5 ]
60 then 60 then
@@ -62,11 +62,11 @@ testing()
62 exit 62 exit
63 fi 63 fi
64 64
65 if [ "$debug" = "1" ] ; then 65 if [ $debug -eq 1 ] ; then
66 set -x 66 set -x
67 fi 67 fi
68 68
69 if [ -n "$_BB_CONFIG_DEP" ] && [ "${force}" = "0" ] 69 if [ -n "$_BB_CONFIG_DEP" ] && [ ${force} -eq 0 ]
70 then 70 then
71 if ! config_is_set "$_BB_CONFIG_DEP" 71 if ! config_is_set "$_BB_CONFIG_DEP"
72 then 72 then
@@ -85,7 +85,7 @@ testing()
85 then 85 then
86 ((FAILCOUNT++)) 86 ((FAILCOUNT++))
87 echo "FAIL: $1" 87 echo "FAIL: $1"
88 if [ "$verbose" = "1" ] 88 if [ $verbose -eq 1 ]
89 then 89 then
90 diff -u expected actual 90 diff -u expected actual
91 fi 91 fi
@@ -94,7 +94,7 @@ testing()
94 fi 94 fi
95 rm -f input expected actual 95 rm -f input expected actual
96 96
97 if [ "$debug" = "1" ] ; then 97 if [ $debug -eq 1 ] ; then
98 set +x 98 set +x
99 fi 99 fi
100 100