[Pkg-libvirt-commits] [libguestfs] 69/384: python: Improve harness for running Python tests.

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 16:55:32 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit db1c8a6436c12b4a7f2e29bd4b926c5b064048b7
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Dec 10 21:33:24 2014 +0000

    python: Improve harness for running Python tests.
    
    It now understands exit code 77 == skip, amongst other improvements.
---
 python/run-python-tests | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/python/run-python-tests b/python/run-python-tests
index bcc40d8..af849c7 100755
--- a/python/run-python-tests
+++ b/python/run-python-tests
@@ -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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list