]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: run virshtest independent of current pwd
authorBjoern Walk <bwalk@linux.vnet.ibm.com>
Thu, 8 Feb 2018 12:38:25 +0000 (13:38 +0100)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 13 Feb 2018 15:27:32 +0000 (10:27 -0500)
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@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
tests/virshtest.c

index 67453bd95261ac2d4f3be823a6f6e34f3b122b91..94548a82d1cf6e9f8a1367c9d4622997fa528710 100644 (file)
@@ -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