diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2005-10-06 12:48:03 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2005-10-06 12:48:03 +0000 |
commit | e34e8782a979b372c521d460511d82d87f5a3646 (patch) | |
tree | 149d7c0dc3bc772a93d8ae96bf39a0e357452a62 | |
parent | cf95e0b2d5f5dd0b0682bd4cc5959cf32427134f (diff) | |
download | busybox-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-- | Makefile | 12 | ||||
-rwxr-xr-x | testsuite/runtest | 6 | ||||
-rwxr-xr-x | testsuite/testing.sh | 10 |
3 files changed, 20 insertions, 8 deletions
@@ -216,9 +216,19 @@ uninstall: busybox.links | |||
216 | install-hardlinks: $(top_srcdir)/applets/install.sh busybox busybox.links | 216 | install-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 | ||
220 | KBUILD_VERBOSE := | ||
221 | ifdef V | ||
222 | ifeq ("$(origin V)", "command line") | ||
223 | KBUILD_VERBOSE := $(V) | ||
224 | endif | ||
225 | endif | ||
226 | ifneq ($(strip $(KBUILD_VERBOSE)),) | ||
227 | CHECK_VERBOSE := -v | ||
228 | endif | ||
219 | check test: busybox | 229 | check 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 | ||
223 | sizes: | 233 | sizes: |
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 | ||
79 | status=0 | 79 | status=0 |
80 | verbose=0 | ||
80 | 81 | ||
81 | if [ x"$1" = x"-v" ]; then | 82 | if [ x"$1" = x"-v" ]; then |
82 | verbose=1 | 83 | verbose=1 |
84 | export VERBOSE=$verbose | ||
83 | shift | 85 | shift |
84 | fi | 86 | fi |
85 | 87 | ||
86 | if [ $# -ne 0 ]; then | 88 | if [ $# -ne 0 ]; then |
87 | applets="$@" | 89 | applets=$(cd $srcdir ; for i in $@; do ls ${i}* ; done) |
88 | else | 90 | else |
89 | applets=$(ls $srcdir) | 91 | applets=$(ls $srcdir) |
90 | fi | 92 | fi |
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 | ||
57 | testing() | 57 | testing () |
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 | ||