[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 1/6] tests: use fake rhsrvany.exe

On Mon, Oct 05, 2015 at 02:17:52PM +0100, Richard W.M. Jones wrote:
> On Mon, Oct 05, 2015 at 03:40:01PM +0300, Roman Kagan wrote:
> > -guestsdir="$(cd ../tests/guests && pwd)"
> > -f="$guestsdir/windows.img"
> > +abs_top_builddir="$(cd ..; pwd)"
> You don't need to define abs_top_builddir, as it should already be
> defined.  However it won't be exported to the test scripts unless you
> change v2v/Makefile.am: TESTS_ENVIRONMENT to include it, something
> like this:
> -TESTS_ENVIRONMENT = $(top_builddir)/run --test
> +TESTS_ENVIRONMENT = abs_top_builddir="$(abs_top_builddir)" $(top_builddir)/run --test

This wasn't my invention: somehow *all* 15 tests under v2v which used
$abs_top_builddir or $abs_builddir obtained them exactly like I did in
the patch.  Want me to fix them all?  Will probably be another patch,

> > diff --git a/tests/fake-virt-tools/rhsrvany.exe b/tests/fake-virt-tools/rhsrvany.exe
> > new file mode 100644
> > index 0000000..b474349
> > --- /dev/null
> > +++ b/tests/fake-virt-tools/rhsrvany.exe
> > @@ -0,0 +1 @@
> > +This is a fake rhsrvany.exe, used for testing only
> > diff --git a/tests/regressions/rhbz1232192.sh b/tests/regressions/rhbz1232192.sh
> This doesn't appear in EXTRA_DIST, so it won't be copied to the tarball.

Didn't know that.  How is the tarball generated, so that I can test it
before the next submission?

> TBH I'd prefer if the fake-virt-tools directory was a subdir of v2v/
> so you can just add fake-virt-tools/rhsrvany.exe to EXTRA_DIST that is
> already defined in v2v/Makefile.am.

rhsrvany.exe is used outside v2v, too (customize, sysprep, etc.).  So I
thought the fake stuff would be generally useful, not limited to v2v.

Moreover the tests in p2v already have the same logic, which I patch
here, too; should I drop them from the patch and revert to the original


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]