mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
build: Return 77 from skipped tests.
(cherry picked from commit fc86db3b3b)
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
test -d /dev/fd || {
|
||||
echo "$0: Skipping this test because /dev/fd is missing."
|
||||
exit 0
|
||||
exit 77
|
||||
}
|
||||
|
||||
set -e
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
test -d /dev/fd || {
|
||||
echo "$0: Skipping this test because /dev/fd is missing."
|
||||
exit 0
|
||||
exit 77
|
||||
}
|
||||
|
||||
set -e
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
if [ -n "$SKIP_TEST_MOUNT_LOCAL_SH" ]; then
|
||||
echo "$0: skipping test because SKIP_TEST_MOUNT_LOCAL_SH is set."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
# Skip if no FUSE.
|
||||
@@ -28,7 +28,7 @@ fi
|
||||
test -w /dev/fuse || {
|
||||
echo "$0: Skipping this test"
|
||||
echo " because /dev/fuse is missing or not writable by the current user."
|
||||
exit 0
|
||||
exit 77
|
||||
}
|
||||
|
||||
set -e
|
||||
|
||||
@@ -25,12 +25,12 @@ set -e
|
||||
|
||||
if [ -n "$SKIP_TEST_FUSE_SH" ]; then
|
||||
echo "$0: test skipped because environment variable is set."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
if [ ! -w /dev/fuse ]; then
|
||||
echo "SKIPPING guestmount test, because there is no /dev/fuse."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
if [ -z "$top_builddir" ]; then
|
||||
|
||||
@@ -22,17 +22,17 @@ set -e
|
||||
|
||||
if [ -n "$SKIP_TEST_FUSE_SH" ]; then
|
||||
echo "$0: test skipped because environment variable is set."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
if [ ! -w /dev/fuse ]; then
|
||||
echo "SKIPPING guestmount test, because there is no /dev/fuse."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
if ! setfacl --help >/dev/null 2>&1; then
|
||||
echo "SKIPPING guestmount test, because setfacl is not installed."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
if [ -z "$top_builddir" ]; then
|
||||
|
||||
@@ -20,7 +20,7 @@ set -e
|
||||
|
||||
if [ -z "$GJS" ]; then
|
||||
echo "GObject bind tests skipped: gjs is missing"
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
../run $GJS $srcdir/tests-misc.js 2>/dev/null
|
||||
|
||||
@@ -20,7 +20,7 @@ set -e
|
||||
|
||||
if [ -z "$GJS" ]; then
|
||||
echo "GObject bind tests skipped: gjs is missing"
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
../run $GJS $srcdir/bindtests.js > bindtests.tmp
|
||||
|
||||
@@ -39,7 +39,7 @@ let rec main () =
|
||||
if value <> "" then (
|
||||
printf "%s: test skipped because %s is set.\n"
|
||||
Sys.executable_name name;
|
||||
exit 0
|
||||
exit 77
|
||||
)
|
||||
in
|
||||
|
||||
|
||||
@@ -22,12 +22,12 @@ set -e
|
||||
|
||||
if [ -n "$SKIP_TEST_VIRT_SYSPREP_SCRIPT_SH" ]; then
|
||||
echo "$0: test skipped because environment variable is set."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
if [ ! -w /dev/fuse ]; then
|
||||
echo "$0: SKIPPING test, because there is no /dev/fuse."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
# Check that multiple scripts can run.
|
||||
|
||||
@@ -27,7 +27,7 @@ set -e
|
||||
# XXX Not a very good test.
|
||||
if ! btrfs --help >/dev/null 2>&1; then
|
||||
echo "$0: test skipped because no 'btrfs' utility"
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
rm -f test[1234].img
|
||||
|
||||
@@ -39,7 +39,7 @@ $g->launch ();
|
||||
# If btrfs is not available, bail.
|
||||
unless (feature_available ($g, "btrfs")) {
|
||||
warn "$0: skipping test because btrfs is not available\n";
|
||||
exit 0;
|
||||
exit 77;
|
||||
}
|
||||
|
||||
$g->part_disk ("/dev/sda", "mbr");
|
||||
|
||||
@@ -20,13 +20,13 @@ set -e
|
||||
|
||||
if [ ! -d "$QEMUDIR" ]; then
|
||||
echo "$0: \$QEMUDIR not a directory, tests against upstream qemu skipped"
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
QEMU="$QEMUDIR/x86_64-softmmu/qemu-system-x86_64"
|
||||
if ! "$QEMU" --help >/dev/null 2>&1; then
|
||||
echo "$0: $QEMU not executable, tests against upstream qemu skipped"
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
"$QEMU" --version
|
||||
|
||||
@@ -22,7 +22,7 @@ set -e
|
||||
|
||||
[ -n "$SKIP_TEST_LUKS_SH" ] && {
|
||||
echo "test-luks-list.sh skipped (environment variable set)"
|
||||
exit 0
|
||||
exit 77
|
||||
}
|
||||
|
||||
rm -f test1.img test.output
|
||||
|
||||
@@ -22,7 +22,7 @@ set -e
|
||||
|
||||
[ -n "$SKIP_TEST_LUKS_SH" ] && {
|
||||
echo "test-luks.sh skipped (environment variable set)"
|
||||
exit 0
|
||||
exit 77
|
||||
}
|
||||
|
||||
rm -f test1.img
|
||||
|
||||
@@ -23,7 +23,7 @@ export LANG=C
|
||||
|
||||
if [ -n "$SKIP_TEST_INSPECT_FSTAB_MD_SH" ]; then
|
||||
echo "$0: test skipped because environment variable is set."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
# The first test requires a new Augeas lens for parsing mdadm.conf.
|
||||
@@ -32,7 +32,7 @@ fi
|
||||
f=$(grep mdadm_conf.aug ../../appliance/supermin.d/hostfiles | head -1)
|
||||
if [ -z "$f" -o ! -f "$f" ]; then
|
||||
echo "$0: test skipped because Augeas mdadm.conf lens is not available."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
guestfish=../../fish/guestfish
|
||||
|
||||
@@ -22,7 +22,7 @@ set -e
|
||||
|
||||
if [ -n "$SKIP_TEST_LIST_FILESYSTEMS_SH" ]; then
|
||||
echo "$0: test skipped because environment variable is set."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
rm -f test.output
|
||||
|
||||
@@ -22,7 +22,7 @@ set -e
|
||||
|
||||
if [ -n "$SKIP_TEST_MDADM_SH" ]; then
|
||||
echo "$0: test skipped because environment variable is set."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
rm -f md-test1.img md-test2.img md-test3.img md-test4.img
|
||||
|
||||
@@ -22,7 +22,7 @@ set -e
|
||||
|
||||
if [ -n "$SKIP_TEST_NTFSCLONE_SH" ]; then
|
||||
echo "$0: test skipped because environment variable is set."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
rm -f test1.img backup1 backup2
|
||||
@@ -32,7 +32,7 @@ guestfish=../../fish/guestfish
|
||||
# Skip if ntfs-3g is not supported by the appliance.
|
||||
if ! $guestfish add /dev/null : run : available "ntfs3g"; then
|
||||
echo "$0: skipped because ntfs-3g is not supported by the appliance"
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
# Export the filesystems to the backup file.
|
||||
|
||||
@@ -26,7 +26,7 @@ use POSIX;
|
||||
use Sys::Guestfs;
|
||||
|
||||
# Allow this test to be skipped.
|
||||
exit 0 if $ENV{SKIP_TEST_LAUNCH_RACE_PL};
|
||||
exit 77 if $ENV{SKIP_TEST_LAUNCH_RACE_PL};
|
||||
|
||||
# Use a temporary TMPDIR to ensure it's clean
|
||||
my $tmpdir = tempdir (CLEANUP => 1);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
# the mkfs fails. It's not clear how to solve this cleanly. XXX
|
||||
[ -n "$SKIP_TEST_RHBZ690819_SH" ] && {
|
||||
echo "$0 skipped (environment variable set)"
|
||||
exit 0
|
||||
exit 77
|
||||
}
|
||||
|
||||
set -e
|
||||
@@ -37,7 +37,7 @@ export LANG=C
|
||||
|
||||
if [ -n "$SKIP_TEST_RHBZ690819_SH" ]; then
|
||||
echo "$0: test skipped because environment variable is set."
|
||||
exit 0
|
||||
exit 77
|
||||
fi
|
||||
|
||||
rm -f test.img
|
||||
|
||||
Reference in New Issue
Block a user