build: Add ./configure --disable-fuse option.
[libguestfs.git] / regressions / test-copy.sh
index 31785cc..6cfb3f1 100755 (executable)
 
 # Test guestfish copy-in and copy-out commands.
 
+# This test fails on some versions of mock which lack /dev/fd
+# directory.  Skip this test in that case.
+
+test -d /dev/fd || {
+    echo "$0: Skipping this test because /dev/fd is missing."
+    exit 0
+}
+
 set -e
 
 rm -f test1.img
@@ -55,12 +63,13 @@ mkdir copy
 copy-out /data/images copy
 EOF
 
-if [ ! -f copy/images/known-1 -o \
-     ! -f copy/images/known-3 -o \
-     ! -f copy/images/known-5 -o \
-     ! -L copy/images/abssymlink -o \
-     -f copy/known-1 -o \
-     -f known-1 ]; then
+if test ! -f copy/images/known-1 || \
+   test ! -f copy/images/known-3 || \
+   test ! -f copy/images/known-5 || \
+   test ! -L copy/images/abssymlink || \
+   test -f copy/known-1 || \
+   test -f known-1
+then
     echo "$0: error: copy-out command failed"
     exit 1
 fi