mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00

utils/test/runtests-py*.sh always exits with $? = 1 even if there is no error. This is caused by the last executed command, test -n This patch changes it to test -z so that we'll get $? = 0 if all tests succeed. Acked-by: Seth Arnold <seth.arnold@canonical.com>
33 lines
823 B
Bash
Executable file
33 lines
823 B
Bash
Executable file
#!/bin/sh
|
|
# ------------------------------------------------------------------
|
|
#
|
|
# Copyright (C) 2014 Christian Boltz
|
|
#
|
|
# This program is free software; you can redistribute it and/or
|
|
# modify it under the terms of version 2 of the GNU General Public
|
|
# License published by the Free Software Foundation.
|
|
#
|
|
# ------------------------------------------------------------------
|
|
|
|
test -z "$RUNTESTS_PY__PYTHON_BINARY" && RUNTESTS_PY__PYTHON_BINARY=python3
|
|
|
|
export PYTHONPATH=..
|
|
|
|
failed=""
|
|
for file in *.py ; do
|
|
echo "running $file..."
|
|
"$RUNTESTS_PY__PYTHON_BINARY" $file || {
|
|
failed="$failed $file"
|
|
echo "*** test $file failed - giving you some time to read the output... ***"
|
|
sleep 10
|
|
}
|
|
echo
|
|
done
|
|
|
|
test -z "$failed" || {
|
|
echo
|
|
echo "*** The following tests failed:"
|
|
echo "*** $failed"
|
|
exit 1
|
|
}
|
|
|