X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=regressions%2Ftest-copy.sh;h=6cfb3f12938e281fb61ab829c9fc9042340cf2d4;hp=31785ccd4cd03f09c864d942e0ae1bcbcb650595;hb=6590e04bdcc3038312cb0a5f5545f1f0924907b2;hpb=b033b55558503a1920c5b7cc1a7e1365749585e0 diff --git a/regressions/test-copy.sh b/regressions/test-copy.sh index 31785cc..6cfb3f1 100755 --- a/regressions/test-copy.sh +++ b/regressions/test-copy.sh @@ -18,6 +18,14 @@ # 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