Pino Toscano
2018-Oct-01 11:47 UTC
[Libguestfs] [PATCH] v2v: -o rhv-upload: skip test-v2v-o-rhv-upload.sh w/o nbdkit
-o rhv-upload requires nbdkit, so skip this test if it is not installed. --- v2v/test-v2v-o-rhv-upload.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/v2v/test-v2v-o-rhv-upload.sh b/v2v/test-v2v-o-rhv-upload.sh index 8bda7cc0b..29214a9db 100755 --- a/v2v/test-v2v-o-rhv-upload.sh +++ b/v2v/test-v2v-o-rhv-upload.sh @@ -28,6 +28,7 @@ set -x $TEST_FUNCTIONS skip_if_skipped skip_if_backend uml +skip_unless nbdkit file --version skip_unless_phony_guest windows.img libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests.xml" -- 2.17.1
Richard W.M. Jones
2018-Oct-01 12:28 UTC
Re: [Libguestfs] [PATCH] v2v: -o rhv-upload: skip test-v2v-o-rhv-upload.sh w/o nbdkit
On Mon, Oct 01, 2018 at 01:47:06PM +0200, Pino Toscano wrote:> -o rhv-upload requires nbdkit, so skip this test if it is not installed. > --- > v2v/test-v2v-o-rhv-upload.sh | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/v2v/test-v2v-o-rhv-upload.sh b/v2v/test-v2v-o-rhv-upload.sh > index 8bda7cc0b..29214a9db 100755 > --- a/v2v/test-v2v-o-rhv-upload.sh > +++ b/v2v/test-v2v-o-rhv-upload.sh > @@ -28,6 +28,7 @@ set -x > $TEST_FUNCTIONS > skip_if_skipped > skip_if_backend uml > +skip_unless nbdkit file --version > skip_unless_phony_guest windows.img > > libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests.xml"ACK. We could also skip if Python is not available, or one of the Python modules like the HTTP server is not available. However getting a good skip check is tricky to get right. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Pino Toscano
2018-Oct-01 13:03 UTC
Re: [Libguestfs] [PATCH] v2v: -o rhv-upload: skip test-v2v-o-rhv-upload.sh w/o nbdkit
On Monday, 1 October 2018 14:28:02 CEST Richard W.M. Jones wrote:> On Mon, Oct 01, 2018 at 01:47:06PM +0200, Pino Toscano wrote: > > -o rhv-upload requires nbdkit, so skip this test if it is not installed. > > --- > > v2v/test-v2v-o-rhv-upload.sh | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/v2v/test-v2v-o-rhv-upload.sh b/v2v/test-v2v-o-rhv-upload.sh > > index 8bda7cc0b..29214a9db 100755 > > --- a/v2v/test-v2v-o-rhv-upload.sh > > +++ b/v2v/test-v2v-o-rhv-upload.sh > > @@ -28,6 +28,7 @@ set -x > > $TEST_FUNCTIONS > > skip_if_skipped > > skip_if_backend uml > > +skip_unless nbdkit file --versionOr I guess I can check for the python module, although nothing says whether it was built for Python 2 or 3...> > skip_unless_phony_guest windows.img > > > > libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests.xml" > > ACK. > > We could also skip if Python is not available,Good idea, I will amend send a v2 with this.> or one of the Python modules like the HTTP server is not available.http.server seems new in CPython 3, so no check is needed. -- Pino Toscano
Apparently Analagous Threads
- [PATCH v2] v2v: -o rhv-upload: test-v2v-o-rhv-upload.sh: add more skip checks
- [v2v PATCH 0/3] tests: simpler way to use configure results
- [PATCH 0/3] tests: Define common test functions.
- Re: [PATCH] v2v: -o rhv-upload: skip test-v2v-o-rhv-upload.sh w/o nbdkit
- [PATCH [WIP] 0/3] tests: Define common test functions.