[Pkg-libvirt-commits] [libguestfs] 06/26: fuse: Add more consistent SKIP_* environment variables.
Hilko Bengen
bengen at moszumanska.debian.org
Sun Nov 1 17:11:25 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag upstream/1.28.12
in repository libguestfs.
commit 94af2975beb8d11f090a665c1a53d450f8e157f0
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Tue May 12 11:48:44 2015 +0100
fuse: Add more consistent SKIP_* environment variables.
The new behaviour is as follows:
Skip all of the fuse tests:
SKIP_TEST_FUSE_SH=1
Individual tests can be skipped by setting:
SKIP_TEST_FUSE_UMOUNT_RACE_SH=1
SKIP_TEST_GUESTMOUNT_FD=1
SKIP_TEST_GUESTUNMOUNT_FD=1
SKIP_TEST_GUESTUNMOUNT_NOT_MOUNTED_SH=1
(cherry picked from commit 96a02f08648f81a741269a34de0352ff3fcb140a)
---
fuse/test-fuse-umount-race.sh | 5 +++++
fuse/test-guestmount-fd.c | 7 +++++++
fuse/test-guestunmount-fd.c | 16 ++++++++++++++++
fuse/test-guestunmount-not-mounted.sh | 5 +++++
4 files changed, 33 insertions(+)
diff --git a/fuse/test-fuse-umount-race.sh b/fuse/test-fuse-umount-race.sh
index 687845e..a1f21ae 100755
--- a/fuse/test-fuse-umount-race.sh
+++ b/fuse/test-fuse-umount-race.sh
@@ -28,6 +28,11 @@ if [ -n "$SKIP_TEST_FUSE_SH" ]; then
exit 77
fi
+if [ -n "$SKIP_TEST_FUSE_UMOUNT_RACE_SH" ]; then
+ echo "$0: test skipped because environment variable is set."
+ exit 77
+fi
+
if [ ! -w /dev/fuse ]; then
echo "$0: test skipped because there is no /dev/fuse."
exit 77
diff --git a/fuse/test-guestmount-fd.c b/fuse/test-guestmount-fd.c
index 241e47d..53a7a72 100644
--- a/fuse/test-guestmount-fd.c
+++ b/fuse/test-guestmount-fd.c
@@ -49,6 +49,13 @@ main (int argc, char *argv[])
int r, status;
/* Allow the test to be skipped. */
+ skip = getenv ("SKIP_TEST_FUSE");
+ if (skip && guestfs_int_is_true (skip) > 0) {
+ fprintf (stderr, "%s: test skipped because environment variable set.\n",
+ guestfs_int_program_name);
+ exit (77);
+ }
+
skip = getenv ("SKIP_TEST_GUESTMOUNT_FD");
if (skip && STREQ (skip, "1")) {
fprintf (stderr, "%s: test skipped because environment variable set.\n",
diff --git a/fuse/test-guestunmount-fd.c b/fuse/test-guestunmount-fd.c
index 9ddc842..18f9655 100644
--- a/fuse/test-guestunmount-fd.c
+++ b/fuse/test-guestunmount-fd.c
@@ -39,10 +39,26 @@
int
main (int argc, char *argv[])
{
+ char *skip;
int pipefd[2];
pid_t pid;
int r, status;
+ /* Allow the test to be skipped. */
+ skip = getenv ("SKIP_TEST_FUSE");
+ if (skip && guestfs_int_is_true (skip) > 0) {
+ fprintf (stderr, "%s: test skipped because environment variable set.\n",
+ guestfs_int_program_name);
+ exit (77);
+ }
+
+ skip = getenv ("SKIP_TEST_GUESTUNMOUNT_FD");
+ if (skip && guestfs_int_is_true (skip) > 0) {
+ fprintf (stderr, "%s: test skipped because environment variable set.\n",
+ guestfs_int_program_name);
+ exit (77);
+ }
+
/* Create the pipe. */
if (pipe (pipefd) == -1) {
perror ("pipe");
diff --git a/fuse/test-guestunmount-not-mounted.sh b/fuse/test-guestunmount-not-mounted.sh
index aa41a4c..5e1febe 100755
--- a/fuse/test-guestunmount-not-mounted.sh
+++ b/fuse/test-guestunmount-not-mounted.sh
@@ -24,6 +24,11 @@ unset CDPATH
#set -e
#set -v
+if [ -n "$SKIP_TEST_FUSE_SH" ]; then
+ echo "$0: test skipped because environment variable is set."
+ exit 77
+fi
+
if [ -n "$SKIP_TEST_GUESTUNMOUNT_NOT_MOUNTED_SH" ]; then
echo "$0: test skipped because environment variable is set."
exit 77
--
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