Make sure the compat -cpp.so doesn't leak into the test run

Resolves: rhbz#2118319
This commit is contained in:
Timm Bäder 2022-10-14 18:06:44 +02:00 committed by Konrad Kleine
parent 47482714be
commit 56de744e4a

View File

@ -3,7 +3,7 @@
%global toolchain clang
%bcond_with compat_build
%bcond_with bundle_compat_lib
%bcond_without bundle_compat_lib
%bcond_without check
%global maj_ver 15
@ -526,6 +526,12 @@ sed -i -e "s/'ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH'/'ASAN_SYMBOLIZER_PAT
%if %{without compat_build}
%if %{with check}
# Move the compat -cpp.so out of the way so it's not picked up
# by the LD_LIBRARY_PATH below.
compat_lib=$(find %{buildroot}%{_libdir} -name libclang-cpp.so.%{compat_maj_ver})
mv "$compat_lib" .
# requires lit.py from LLVM utilities
# FIXME: Fix failing ARM tests
SOURCE_DATA_EPOCH=1629181597 LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{__cmake_builddir} || \
@ -534,6 +540,9 @@ SOURCE_DATA_EPOCH=1629181597 LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja}
%else
false
%endif
mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib"
%endif
%endif