[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 06:12:03PM +0300, Roman Kagan wrote:
> 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,
> then.

Ah I see - in that case you can leave it as you had it before, or
change all of the tests, as you see fit.

> > > 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?

It's quite a common problem - we always forget it too.  Do this
command to see what gets included in the tarball:

  make dist
  tar ztf libguestfs-1.31.*.tar.gz | sort | less

Also you can use:

  make dist
  make maintainer-check-extra-dist

> > 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
> logic?

OK I see; probably still better for it to be under v2v/ or customize/ ..
in any case, not another directory under tests/.  Using tests/guests
was a mistake by us.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top


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