run_some: exit error if there were failed tests

Signed-off-by: Serge Hallyn <serge@hallyn.com>
This commit is contained in:
Serge Hallyn 2021-11-07 17:56:31 -06:00
parent f5a7404c7a
commit 4758641b1d

View File

@ -32,6 +32,8 @@ run_test()
[ -f /etc/group.lock ] && echo $1 /etc/group.lock || true [ -f /etc/group.lock ] && echo $1 /etc/group.lock || true
[ -f /etc/shadow.lock ] && echo $1 /etc/shadow.lock || true [ -f /etc/shadow.lock ] && echo $1 /etc/shadow.lock || true
[ -f /etc/gshadow.lock ] && echo $1 /etc/gshadow.lock || true [ -f /etc/gshadow.lock ] && echo $1 /etc/gshadow.lock || true
[ -f /etc/gshadow.lock ] && echo $1 /etc/gshadow.lock || true
rm -rf /tmp/test-uidmap
if [ "$(stat -c"%G" /etc/shadow)" != "shadow" ] if [ "$(stat -c"%G" /etc/shadow)" != "shadow" ]
then then
echo $1 echo $1
@ -137,4 +139,5 @@ if [ "$failed" != 0 ]
then then
echo "the following tests failed:" echo "the following tests failed:"
echo "$failed_tests" echo "$failed_tests"
exit 1
fi fi