Version 1.11.17.
[libguestfs.git] / autobuild.sh
index a0b288c..77068c8 100755 (executable)
@@ -3,18 +3,19 @@
 PROJECT=libguestfs
 FEBOOTSTRAP_PATH=$HOME/d/febootstrap
 MAILTO=libguestfs@redhat.com
+HOSTNAME="$(hostname -s)"
 
 #----------------------------------------------------------------------
 # Helper functions.
 
 failed ()
 {
-    mail -s "$(hostname -s) $PROJECT FAILED $1 $gitsha" $MAILTO < local-log
+    mail -s "$HOSTNAME $PROJECT FAILED $1 $gitsha" $MAILTO < local-log
 }
 
 ok ()
 {
-    mail -s "$(hostname -s) $PROJECT success $gitsha" $MAILTO < local-log
+    mail -s "$HOSTNAME $PROJECT success $gitsha" $MAILTO < local-log
 }
 
 #----------------------------------------------------------------------
@@ -32,7 +33,7 @@ rm -f local-log
 cat > local-log <<EOF
 
 This is an automatic message generated by the builder on
-$(hostname -s) for $PROJECT.  Log files from the build
+$HOSTNAME for $PROJECT.  Log files from the build
 follow below.
 
 $(uname -a)
@@ -57,12 +58,35 @@ gitsha=$(git log|head -1|awk '{print $2}')
     exit 1
 }
 
+make clean ||:
+
 # Do the build step.
 make || {
     failed "build step"
     exit 1
 }
 
+# Tests that are skipped (note that these tests should be fixed).
+case "$HOSTNAME" in
+    builder-ubuntu)
+        # get_e2uuid: /dev/vdc: [no error message]
+        # get_e2label: /dev/vda1: [no error message]
+        # Diagnosis: either mkjournal is not writing a UUID or blkid is
+        # unable to pick it up.
+        export SKIP_TEST_GET_E2UUID=1
+        export SKIP_TEST_SET_E2UUID=1
+        export SKIP_TEST_SET_E2LABEL=1
+
+       # Avoids:
+       # device-mapper: ioctl: unable to remove open device temporary-cryptsetup-661
+       # device-mapper: remove ioctl failed: Device or resource busy
+       # guestfsd: error: Device lukstest is busy.
+       # Diagnosis: appears to be a bug in cryptsetup on Ubuntu.
+       # https://bugzilla.redhat.com/show_bug.cgi?id=527056
+       export SKIP_TEST_LUKS_SH=1
+       ;;
+esac
+
 # Run the tests.
 make check || {
     failed "tests"