[libvirt PATCH] run: set abs_builddir variables

Ján Tomko posted 1 patch 2 years, 8 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/da235f098a514affdcb91e9be2f331250d987ec2.1628667837.git.jtomko@redhat.com
meson.build | 1 +
run.in      | 3 +++
2 files changed, 4 insertions(+)
[libvirt PATCH] run: set abs_builddir variables
Posted by Ján Tomko 2 years, 8 months ago
test-lib.sh needs these to be set.

Export them so that the virsh-* tests can be run using:
  builddir$ ./run srcdir/tests/virsh-snapshot

Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
 meson.build | 1 +
 run.in      | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/meson.build b/meson.build
index 32ad688c9c..5af09d319a 100644
--- a/meson.build
+++ b/meson.build
@@ -2233,6 +2233,7 @@ configure_file(output: 'meson-config.h', configuration: conf)
 # generate run helper
 run_conf = configuration_data()
 run_conf.set('abs_builddir', meson.build_root())
+run_conf.set('abs_top_builddir', meson.build_root())
 configure_file(
   input: 'run.in',
   output: '@BASENAME@',
diff --git a/run.in b/run.in
index 9aae27a79e..64f99751fe 100644
--- a/run.in
+++ b/run.in
@@ -80,6 +80,9 @@ env["LIBVIRT_DIR_OVERRIDE"] = "1"
 # read problems when using glibc.
 env["MALLOC_PERTURB_"] = "%d" % random.randint(1, 255)
 
+env["abs_builddir"] = "@abs_builddir@"
+env["abs_top_builddir"] = "@abs_top_builddir@"
+
 modular_daemons = [
     "virtinterfaced",
     "virtlxcd",
-- 
2.31.1

Re: [libvirt PATCH] run: set abs_builddir variables
Posted by Andrea Bolognani 2 years, 8 months ago
On Wed, Aug 11, 2021 at 09:44:11AM +0200, Ján Tomko wrote:
> test-lib.sh needs these to be set.
>
> Export them so that the virsh-* tests can be run using:
>   builddir$ ./run srcdir/tests/virsh-snapshot
>
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> ---
>  meson.build | 1 +
>  run.in      | 3 +++
>  2 files changed, 4 insertions(+)

Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization