From b43616c96d344b4a11cd65f57b0c7b9c6c53c0b6 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Thu, 8 Oct 2020 14:20:04 -0400 Subject: [PATCH] package: Set LD_LIBRARY_PATH for tests to work against shared library When a shared library is built, we need to have the test suite attempt to use our newly built shared library. Without this, it fails with unresolved symbols. --- package/libsolv.spec.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/libsolv.spec.in b/package/libsolv.spec.in index 40d266a89..06ee4ca61 100644 --- a/package/libsolv.spec.in +++ b/package/libsolv.spec.in @@ -263,6 +263,11 @@ export NO_BRP_STRIP_DEBUG=true %endif %check +%if %{with shared} +# The test suite doesn't automatically know to look at the "built" +# library, so we force it by creating an LD_LIBRARY_PATH +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +%endif make ARGS=--output-on-failure test %if %{with shared}