mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
python: Improve harness for running Python tests.
It now understands exit code 77 == skip, amongst other improvements.
This commit is contained in:
@@ -16,8 +16,23 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
set -e
|
||||
errors=0
|
||||
|
||||
for f in $srcdir/t/*.py; do
|
||||
$PYTHON $f
|
||||
r=$?
|
||||
case $r in
|
||||
0) ;;
|
||||
77)
|
||||
echo "$f: test skipped"
|
||||
;;
|
||||
*)
|
||||
echo "FAIL: $f"
|
||||
((errors++))
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $errors -gt 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user