mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
- support make check V=1 to run the checks in verbose mode
- pass verbose from runtest to testing.sh
This commit is contained in:
parent
cf95e0b2d5
commit
e34e8782a9
12
Makefile
12
Makefile
@ -216,9 +216,19 @@ uninstall: busybox.links
|
|||||||
install-hardlinks: $(top_srcdir)/applets/install.sh busybox busybox.links
|
install-hardlinks: $(top_srcdir)/applets/install.sh busybox busybox.links
|
||||||
$(SHELL) $< $(PREFIX) --hardlinks
|
$(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
|
check test: busybox
|
||||||
bindir=$(top_builddir) srcdir=$(top_srcdir)/testsuite \
|
bindir=$(top_builddir) srcdir=$(top_srcdir)/testsuite \
|
||||||
$(top_srcdir)/testsuite/runtest
|
$(top_srcdir)/testsuite/runtest $(CHECK_VERBOSE)
|
||||||
|
|
||||||
sizes:
|
sizes:
|
||||||
-rm -f busybox
|
-rm -f busybox
|
||||||
|
@ -37,7 +37,7 @@ run_applet_testcase ()
|
|||||||
|
|
||||||
if [ $? != 0 ] ; then
|
if [ $? != 0 ] ; then
|
||||||
echo FAIL: $testname
|
echo FAIL: $testname
|
||||||
if [ "$verbose" = 1 ]; then
|
if [ $verbose -gt 0 ]; then
|
||||||
cat .logfile.txt
|
cat .logfile.txt
|
||||||
#exit 1;
|
#exit 1;
|
||||||
fi;
|
fi;
|
||||||
@ -77,14 +77,16 @@ run_applet_tests ()
|
|||||||
|
|
||||||
|
|
||||||
status=0
|
status=0
|
||||||
|
verbose=0
|
||||||
|
|
||||||
if [ x"$1" = x"-v" ]; then
|
if [ x"$1" = x"-v" ]; then
|
||||||
verbose=1
|
verbose=1
|
||||||
|
export VERBOSE=$verbose
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $# -ne 0 ]; then
|
if [ $# -ne 0 ]; then
|
||||||
applets="$@"
|
applets=$(cd $srcdir ; for i in $@; do ls ${i}* ; done)
|
||||||
else
|
else
|
||||||
applets=$(ls $srcdir)
|
applets=$(ls $srcdir)
|
||||||
fi
|
fi
|
||||||
|
@ -54,7 +54,7 @@ config_is_set ()
|
|||||||
|
|
||||||
# The testing function
|
# The testing function
|
||||||
|
|
||||||
testing()
|
testing ()
|
||||||
{
|
{
|
||||||
if [ $# -ne 5 ]
|
if [ $# -ne 5 ]
|
||||||
then
|
then
|
||||||
@ -62,11 +62,11 @@ testing()
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$debug" = "1" ] ; then
|
if [ $debug -eq 1 ] ; then
|
||||||
set -x
|
set -x
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$_BB_CONFIG_DEP" ] && [ "${force}" = "0" ]
|
if [ -n "$_BB_CONFIG_DEP" ] && [ ${force} -eq 0 ]
|
||||||
then
|
then
|
||||||
if ! config_is_set "$_BB_CONFIG_DEP"
|
if ! config_is_set "$_BB_CONFIG_DEP"
|
||||||
then
|
then
|
||||||
@ -85,7 +85,7 @@ testing()
|
|||||||
then
|
then
|
||||||
((FAILCOUNT++))
|
((FAILCOUNT++))
|
||||||
echo "FAIL: $1"
|
echo "FAIL: $1"
|
||||||
if [ "$verbose" = "1" ]
|
if [ $verbose -eq 1 ]
|
||||||
then
|
then
|
||||||
diff -u expected actual
|
diff -u expected actual
|
||||||
fi
|
fi
|
||||||
@ -94,7 +94,7 @@ testing()
|
|||||||
fi
|
fi
|
||||||
rm -f input expected actual
|
rm -f input expected actual
|
||||||
|
|
||||||
if [ "$debug" = "1" ] ; then
|
if [ $debug -eq 1 ] ; then
|
||||||
set +x
|
set +x
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user