Richard W.M. Jones
2015-Oct-05 16:05 UTC
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
Roman Kagan
2015-Oct-06 14:24 UTC
Re: [Libguestfs] [PATCH 1/6] tests: use fake rhsrvany.exe
On Mon, Oct 05, 2015 at 05:05:32PM +0100, Richard W.M. Jones wrote:> 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: > > > 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-distI can't get past make dist: # make V=1 INSTALLDIRS=vendor dist make dist-gzip am__post_remove_distdir='@:' make[1]: Entering directory '/home/rkagan/work/git/libguestfs' if test -d "libguestfs-1.31.11"; then find "libguestfs-1.31.11" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "libguestfs-1.31.11" || { sleep 5 && rm -rf "libguestfs-1.31.11"; }; else :; fi test -d "libguestfs-1.31.11" || mkdir "libguestfs-1.31.11" (cd gnulib/lib && make top_distdir=../../libguestfs-1.31.11 distdir=../../libguestfs-1.31.11/gnulib/lib \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/home/rkagan/work/git/libguestfs/gnulib/lib' make[2]: Leaving directory '/home/rkagan/work/git/libguestfs/gnulib/lib' (cd gnulib/tests && make top_distdir=../../libguestfs-1.31.11 distdir=../../libguestfs-1.31.11/gnulib/tests \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/home/rkagan/work/git/libguestfs/gnulib/tests' make[2]: Leaving directory '/home/rkagan/work/git/libguestfs/gnulib/tests' (cd tests/data && make top_distdir=../../libguestfs-1.31.11 distdir=../../libguestfs-1.31.11/tests/data \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/home/rkagan/work/git/libguestfs/tests/data' make[2]: Leaving directory '/home/rkagan/work/git/libguestfs/tests/data' (cd generator && make top_distdir=../libguestfs-1.31.11 distdir=../libguestfs-1.31.11/generator \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/home/rkagan/work/git/libguestfs/generator' make[2]: Leaving directory '/home/rkagan/work/git/libguestfs/generator' (cd src && make top_distdir=../libguestfs-1.31.11 distdir=../libguestfs-1.31.11/src \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/home/rkagan/work/git/libguestfs/src' make[2]: Leaving directory '/home/rkagan/work/git/libguestfs/src' (cd examples && make top_distdir=../libguestfs-1.31.11 distdir=../libguestfs-1.31.11/examples \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/home/rkagan/work/git/libguestfs/examples' make[2]: Leaving directory '/home/rkagan/work/git/libguestfs/examples' (cd po && make top_distdir=../libguestfs-1.31.11 distdir=../libguestfs-1.31.11/po \ am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir) make[2]: Entering directory '/home/rkagan/work/git/libguestfs/po' rm -f uk.gmo uk.gmo-t /usr/bin/msgfmt -c -o uk.gmo-t ./uk.po ./uk.po:998: 'msgid' and 'msgstr' entries do not both end with '\n' ./uk.po:9426: format specifications in 'msgid' and 'msgstr' for argument 2 are not the same /usr/bin/msgfmt: found 2 fatal errors Makefile:1713: recipe for target 'uk.gmo' failed make[2]: *** [uk.gmo] Error 1 make[2]: Leaving directory '/home/rkagan/work/git/libguestfs/po' Makefile:2027: recipe for target 'distdir' failed make[1]: *** [distdir] Error 1 make[1]: Leaving directory '/home/rkagan/work/git/libguestfs' Makefile:2129: recipe for target 'dist' failed make: *** [dist] Error 2 Any suggestion on where to look?> > > 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.OK I'll try to cook up something like this. Is it OK to use v2v test stuff in, say, p2v? Or may be I just do this all under v2v and leave p2v alone? Roman.
Richard W.M. Jones
2015-Oct-06 14:39 UTC
Re: [Libguestfs] [PATCH 1/6] tests: use fake rhsrvany.exe
On Tue, Oct 06, 2015 at 05:24:41PM +0300, Roman Kagan wrote:> I can't get past make dist: > > # make V=1 INSTALLDIRS=vendor dist[...]> rm -f uk.gmo uk.gmo-t > /usr/bin/msgfmt -c -o uk.gmo-t ./uk.po > ./uk.po:998: 'msgid' and 'msgstr' entries do not both end with '\n' > ./uk.po:9426: format specifications in 'msgid' and 'msgstr' for argument 2 are not the same > /usr/bin/msgfmt: found 2 fatal errors > Makefile:1713: recipe for target 'uk.gmo' failed > make[2]: *** [uk.gmo] Error 1 > make[2]: Leaving directory '/home/rkagan/work/git/libguestfs/po' > Makefile:2027: recipe for target 'distdir' failed > make[1]: *** [distdir] Error 1 > make[1]: Leaving directory '/home/rkagan/work/git/libguestfs' > Makefile:2129: recipe for target 'dist' failed > make: *** [dist] Error 2 > > > Any suggestion on where to look?This is a bug I introduced yesterday (commit fe4630e0332fecec4482061054063f217daef265). Just reverting that commit should make it work for now.> OK I'll try to cook up something like this. Is it OK to use v2v test > stuff in, say, p2v? Or may be I just do this all under v2v and leave > p2v alone?Totally fine. Thanks, Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Seemingly Similar Threads
- Ovirt node-imge build error Failed build dependencies......
- Ovirt node-imge build error Bad exit status from /var/tmp/rpm-tmp.9bshdl (%build)
- Re: [PATCH 1/6] tests: use fake rhsrvany.exe
- Strange regression on FreeBSD buildslave regarding HP-UX scripts
- Strange regression on FreeBSD buildslave regarding HP-UX scripts