[PATCH libvirt] tests: run virshtest independent of current pwd

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

 



virshtest execves the virsh binary. Make sure that it finds the binary's
location independent of the current working directory by specifying the
absolute path as determined by the build environment.

Reviewed-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx>
---
 tests/virshtest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/virshtest.c b/tests/virshtest.c
index 67453bd9..94548a82 100644
--- a/tests/virshtest.c
+++ b/tests/virshtest.c
@@ -84,13 +84,13 @@ testCompareOutputLit(const char *expectData,
     return result;
 }
 
-# define VIRSH_DEFAULT     "../tools/virsh", \
+# define VIRSH_DEFAULT abs_topbuilddir "/tools/virsh", \
     "--connect", \
     "test:///default"
 
 static char *custom_uri;
 
-# define VIRSH_CUSTOM     "../tools/virsh", \
+# define VIRSH_CUSTOM  abs_topbuilddir "/tools/virsh", \
     "--connect", \
     custom_uri
 
-- 
2.13.4

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

  Powered by Linux