[Initscripts-ng-commits] r617 - in /trunk/src/insserv/debian: changelog testsuite-common
pere at users.alioth.debian.org
pere at users.alioth.debian.org
Sun Feb 17 12:40:01 UTC 2008
Author: pere
Date: Sun Feb 17 12:40:00 2008
New Revision: 617
URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=617
Log:
* Extended test suite to report status at the end.
Modified:
trunk/src/insserv/debian/changelog
trunk/src/insserv/debian/testsuite-common
Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=617&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Sun Feb 17 12:40:00 2008
@@ -16,6 +16,7 @@
* New patch 50_sign_warning getting rid of some signed/unsigned
compare issues.
* Update test suite to the one provided by Werner Fink.
+ * Extended test suite to report status at the end.
* New patch 32_debug_option to add new option -D to print debug
output.
* New patch 33_nosuse_scripts to disable some SUSE specific settings.
Modified: trunk/src/insserv/debian/testsuite-common
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/testsuite-common?rev=617&op=diff
==============================================================================
--- trunk/src/insserv/debian/testsuite-common (original)
+++ trunk/src/insserv/debian/testsuite-common Sun Feb 17 12:40:00 2008
@@ -15,12 +15,15 @@
: ${debug:=""}
declare -i retval=0
+declare -i checkfailed=0
+declare -i testcount=0
+declare -i testfailed=0
finish_test ()
{
if test 0 -ne $retval ; then
- echo "error: one or more test failed."
+ echo "error: $testcount test executed, $checkfailed fatal tests failed, $testfailed nonfatal test failed."
else
- echo "success: no test failed."
+ echo "success: $testcount test executed, $testfailed nonfatal tests failed."
fi
rm -rf ${tmpdir}
return $retval
@@ -172,15 +175,22 @@
echo "$path"
}
+counttest ()
+{
+ testcount=$(expr $testcount + 1)
+}
+
error ()
{
echo error: $@
+ checkfailed=$(expr $checkfailed + 1)
retval=1
}
warning ()
{
echo warning: $@
+ testfailed=$(expr $testfailed + 1)
}
addscript ()
@@ -204,6 +214,7 @@
local script=$1; shift
local ret=0
test -L ${rcdpath}/[KS][0-9][0-9]$script || ret=1
+ counttest
return $ret
}
@@ -271,6 +282,7 @@
fi
popd &> /dev/null
test "$order" = "$script1 $script2" || ret=1
+ counttest
return $ret
}
More information about the Initscripts-ng-commits
mailing list