[libvirt] [dbus PATCH 2/3] tests: Don't loop up abs_top_builddir in the environment

Andrea Bolognani posted 3 patches 7 years, 7 months ago
There is a newer version of this series
[libvirt] [dbus PATCH 2/3] tests: Don't loop up abs_top_builddir in the environment
Posted by Andrea Bolognani 7 years, 7 months ago
This only works if the caller has prepared the environment
accordingly; however, there is already a fallback path in
place and it works just fine, so much so that when test
cases are executed manually through the 'run' script
that's the only one being involved.

Drop environment handling entirely and rely on path
manipulation instead.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 tests/Makefile.am    | 1 -
 tests/libvirttest.py | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 10d2935..81cb263 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -37,5 +37,4 @@ EXTRA_DIST = \
 TESTS = $(test_programs)
 
 TESTS_ENVIRONMENT = \
-	abs_top_builddir=$(abs_top_builddir) \
 	VIRT_DBUS_INTERFACES_DIR=$(abs_top_builddir)/data
diff --git a/tests/libvirttest.py b/tests/libvirttest.py
index 06e52c0..c1543e8 100644
--- a/tests/libvirttest.py
+++ b/tests/libvirttest.py
@@ -10,7 +10,7 @@ import time
 import xmldata
 
 
-root = os.environ.get('abs_top_builddir', os.path.dirname(os.path.dirname(__file__)))
+root = os.path.dirname(os.path.dirname(__file__))
 exe = os.path.join(root, 'src', 'libvirt-dbus')
 
 DBusGMainLoop(set_as_default=True)
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [dbus PATCH 2/3] tests: Don't loop up abs_top_builddir in the environment
Posted by Pavel Hrdina 7 years, 7 months ago
On Wed, Jun 20, 2018 at 02:20:28PM +0200, Andrea Bolognani wrote:
> This only works if the caller has prepared the environment
> accordingly; however, there is already a fallback path in
> place and it works just fine, so much so that when test
> cases are executed manually through the 'run' script
> that's the only one being involved.
> 
> Drop environment handling entirely and rely on path
> manipulation instead.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  tests/Makefile.am    | 1 -
>  tests/libvirttest.py | 2 +-
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 10d2935..81cb263 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -37,5 +37,4 @@ EXTRA_DIST = \
>  TESTS = $(test_programs)
>  
>  TESTS_ENVIRONMENT = \
> -	abs_top_builddir=$(abs_top_builddir) \
>  	VIRT_DBUS_INTERFACES_DIR=$(abs_top_builddir)/data
> diff --git a/tests/libvirttest.py b/tests/libvirttest.py
> index 06e52c0..c1543e8 100644
> --- a/tests/libvirttest.py
> +++ b/tests/libvirttest.py
> @@ -10,7 +10,7 @@ import time
>  import xmldata
>  
>  
> -root = os.environ.get('abs_top_builddir', os.path.dirname(os.path.dirname(__file__)))
> +root = os.path.dirname(os.path.dirname(__file__))
>  exe = os.path.join(root, 'src', 'libvirt-dbus')

NACK, this is essential for VPATH build.

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