1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

run.in: Include tools directory on $PATH.

You normally want to run the locally compiled copy of virsh.  Trying
to run the installed version with the locally compiled library is a
recipe for problems with missing symbols and so on.  By adding tools
to the path we can ensure that (eg) the libguestfs test suite will use
compatible copies of the library and virsh.

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Richard W.M. Jones 2020-01-16 17:15:42 +00:00 committed by Erik Skultety
parent ae428ca723
commit a5b1b1fa48

13
run.in
View File

@ -21,12 +21,10 @@
# With this script you can run libvirt programs without needing to # With this script you can run libvirt programs without needing to
# install them first. You just have to do for example: # install them first. You just have to do for example:
# #
# ./run ./tools/virsh [args ...] # ./run virsh [args ...]
# #
# If you are already in the tools/ subdirectory, then the following # Note that this runs the locally compiled copy of virsh which
# command will also work: # is usually want you want.
#
# ../run ./virsh [...]
# #
# You can also run the C programs under valgrind like this: # You can also run the C programs under valgrind like this:
# #
@ -38,7 +36,7 @@
# #
# This also works with sudo (eg. if you need root access for libvirt): # This also works with sudo (eg. if you need root access for libvirt):
# #
# sudo ./run ./tools/virsh list --all # sudo ./run virsh list --all
# #
#---------------------------------------------------------------------- #----------------------------------------------------------------------
@ -58,6 +56,9 @@ export LD_LIBRARY_PATH
prepend PKG_CONFIG_PATH "$b/src" prepend PKG_CONFIG_PATH "$b/src"
export PKG_CONFIG_PATH export PKG_CONFIG_PATH
prepend PATH "$b/tools"
export PATH
# Ensure that any 3rd party apps using libvirt.so from the build tree get # Ensure that any 3rd party apps using libvirt.so from the build tree get
# files resolved to the build/source tree too. Typically useful for language # files resolved to the build/source tree too. Typically useful for language
# bindings running tests against non-installed libvirt. # bindings running tests against non-installed libvirt.