Pino Toscano
2014-Feb-28 12:19 UTC
[Libguestfs] [PATCH] tests/luks: disable if luks is not available
--- tests/luks/test-luks-list.sh | 6 ++++++ tests/luks/test-luks.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/tests/luks/test-luks-list.sh b/tests/luks/test-luks-list.sh index 13e7655..bb8389c 100755 --- a/tests/luks/test-luks-list.sh +++ b/tests/luks/test-luks-list.sh @@ -25,6 +25,12 @@ set -e exit 77 } +# If luks is not available, bail. +if ! ../../fish/guestfish -a /dev/null run : available luks; then + echo "$0: skipping test because luks is not available" + exit 77 +fi + rm -f test-luks-list.img test-luks-list.out ../../fish/guestfish --keys-from-stdin > test-luks-list.out <<'EOF' diff --git a/tests/luks/test-luks.sh b/tests/luks/test-luks.sh index ceca810..5d8e8b2 100755 --- a/tests/luks/test-luks.sh +++ b/tests/luks/test-luks.sh @@ -25,6 +25,12 @@ set -e exit 77 } +# If luks is not available, bail. +if ! ../../fish/guestfish -a /dev/null run : available luks; then + echo "$0: skipping test because luks is not available" + exit 77 +fi + rm -f test-luks.img ../../fish/guestfish --keys-from-stdin <<EOF -- 1.8.3.1
Richard W.M. Jones
2014-Feb-28 14:00 UTC
Re: [Libguestfs] [PATCH] tests/luks: disable if luks is not available
On Fri, Feb 28, 2014 at 01:19:30PM +0100, Pino Toscano wrote:> --- > tests/luks/test-luks-list.sh | 6 ++++++ > tests/luks/test-luks.sh | 6 ++++++ > 2 files changed, 12 insertions(+) > > diff --git a/tests/luks/test-luks-list.sh b/tests/luks/test-luks-list.sh > index 13e7655..bb8389c 100755 > --- a/tests/luks/test-luks-list.sh > +++ b/tests/luks/test-luks-list.sh > @@ -25,6 +25,12 @@ set -e > exit 77 > } > > +# If luks is not available, bail. > +if ! ../../fish/guestfish -a /dev/null run : available luks; then > + echo "$0: skipping test because luks is not available" > + exit 77 > +fi > + > rm -f test-luks-list.img test-luks-list.out > > ../../fish/guestfish --keys-from-stdin > test-luks-list.out <<'EOF' > diff --git a/tests/luks/test-luks.sh b/tests/luks/test-luks.sh > index ceca810..5d8e8b2 100755 > --- a/tests/luks/test-luks.sh > +++ b/tests/luks/test-luks.sh > @@ -25,6 +25,12 @@ set -e > exit 77 > } > > +# If luks is not available, bail. > +if ! ../../fish/guestfish -a /dev/null run : available luks; then > + echo "$0: skipping test because luks is not available" > + exit 77 > +fi > + > rm -f test-luks.img > > ../../fish/guestfish --keys-from-stdin <<EOF > -- > 1.8.3.1ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#)