Re: [libvirt] [PATCH] Fix up "make check"

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

 



Daniel P. Berrange wrote:
> On Wed, Sep 23, 2009 at 09:33:58AM +0200, Chris Lalancette wrote:
>> While running make check, I noticed that it was actually using
>> the virsh binary from my system, in /usr/bin/virsh, and not the
>> one that was just compiled.  This doesn't seem to be the intent,
>> so I changed all of the test scripts to point to the one built
>> in-tree, not the system one.
>>
>> Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx>
> 
> Oh that's because the 'path_add' variable in tests/Makefile.am
> needs updating, though its not a bad idea ot make it explicit
> in each test like you've done too. Can you use the relative
> paths like  $srcdir/../tools/   instead though, because
> abs_* do not exist on RHEL-5 vintage automake - also each
> of these shell scripts should be setting

Hm, actually, it looks like we are already accounting for that in the Makefile:

# NB, automake < 1.10 does not provide the real
# abs_top_{src/build}dir variables, so don't rely
# on them here. Fake them with 'pwd'
TESTS_ENVIRONMENT =				\
  abs_top_builddir=`cd '$(top_builddir)'; pwd`	\
  abs_top_srcdir=`cd '$(top_srcdir)'; pwd`	\
  abs_builddir=`cd '$(builddir)'; pwd`		\
  abs_srcdir=`cd '$(srcdir)'; pwd`		\

So I think we should actually be OK.  At least, make check seems to be happy
enough running the tests on a RHEL-5 machine.

As for using $srcdir, the problem with it is that test-lib.sh makes each test
run from a temporary subdirectory, so I'd have to do $srcdir/../../tools/virsh.
 While that would work, it's totally non-obvious to the casual reader why you
need the ../..  Also, it wouldn't work if you were using a separated source and
build directory.  My upcoming patch re-defines abs_top_builddir and
abs_top_srcdir the same way as the Makefile does if they are not defined.

-- 
Chris Lalancette

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]