[PATCH] rpm: fix setting of VIR_TEST_DEBUG

Daniel P. Berrangé posted 1 patch 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20240605110346.336038-1-berrange@redhat.com
libvirt.spec.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[PATCH] rpm: fix setting of VIR_TEST_DEBUG
Posted by Daniel P. Berrangé 3 months ago
The %meson_test macro expands to have a newline at the start, so
rather than expanding to

  VIR_TEST_DEBUG=1 meson test ....

we get

  VIR_TEST_DEBUG=1
  meson test ....

which has no effect, since VIR_TEST_DEBUG isn't exported.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 libvirt.spec.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 5ca7b95e6c..0f3c882f05 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1592,7 +1592,8 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-guests.sh
 %if %{with_native}
 # Building on slow archs, like emulated s390x in Fedora copr, requires
 # raising the test timeout
-VIR_TEST_DEBUG=1 %meson_test --no-suite syntax-check --timeout-multiplier 10
+export VIR_TEST_DEBUG=1
+%meson_test --no-suite syntax-check --timeout-multiplier 10
 %endif
 
 %define libvirt_rpmstatedir %{_localstatedir}/lib/rpm-state/libvirt
-- 
2.45.1
Re: [PATCH] rpm: fix setting of VIR_TEST_DEBUG
Posted by Peter Krempa 3 months ago
On Wed, Jun 05, 2024 at 12:03:46 +0100, Daniel P. Berrangé wrote:
> The %meson_test macro expands to have a newline at the start, so
> rather than expanding to
> 
>   VIR_TEST_DEBUG=1 meson test ....
> 
> we get
> 
>   VIR_TEST_DEBUG=1
>   meson test ....
> 
> which has no effect, since VIR_TEST_DEBUG isn't exported.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  libvirt.spec.in | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Peter Krempa <pkrempa@redhat.com>