[X2Go-Commits] [x2go-keyring] 12/47: runtests: rework counters and exit status.
git-admin at x2go.org
git-admin at x2go.org
Sun Aug 4 16:28:14 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2go-keyring.
commit 4bbb41e4fa762eba13ce0c010b3940edbdcbb1e6
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sun Aug 4 10:50:53 2019 +0200
runtests: rework counters and exit status.
---
debian/changelog | 1 +
runtests | 13 ++++++-------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index cf37e05..3c1069d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,7 @@ x2go-keyring (2014.07.09) UNRELEASED; urgency=medium
* runtests: use trap and explicit exit statement while switching to using
the mktemp command.
* runtests: switch to bash.
+ * runtests: rework counters and exit status.
* debian/control:
- Change maintainer to the mailing list.
- Add the old package maintainer to the Uploaders field and myself.
diff --git a/runtests b/runtests
index ebb4d45..224258e 100755
--- a/runtests
+++ b/runtests
@@ -1,8 +1,8 @@
#!/bin/bash
set -e
-fail="0"
-total="0"
+typeset -i fail='0'
+typeset -i total='0'
for keyring in "x2go-maintainers-gpg" "x2go-keyring-gpg"; do
if [ ! -e "output/keyrings/${keyring}" ]; then
@@ -16,20 +16,19 @@ trap "rm -rf -- '${GNUPGHOME}'" ERR EXIT SIGTERM SIGINT SIGHUP SIGPIPE SIGALRM S
chmod 700 "${GNUPGHOME}"
for t in t/*.t; do
- total=`expr $total + 1`
+ total="$((total + 1))"
if ! "${t}"; then
echo "test ${t} failed" >&2
- fail=`expr "${fail}" + 1`
+ fail="$((fail + 1))"
fi
done
rm -r "${GNUPGHOME}"
-if [ "${fail}" -gt 0 ]; then
+if [ "${fail}" -gt '0' ]; then
echo "** failed ${fail}/${total} tests" >&2
- exit "1"
else
echo "** all tests succeeded"
fi
-exit "0"
+exit "${fail}"
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2go-keyring.git
More information about the x2go-commits
mailing list