From 5f75e69cbd8cdeed499c8a411ac44bf2812c6d62 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Thu, 20 Feb 2025 09:19:52 +0100 Subject: [PATCH] libllvm-size: Add compat package support Detect libLLVM path using llvm-config to make the script reusable with compat packages. --- tests/libllvm-size/main.fmf | 4 ++-- tests/libllvm-size/test.sh | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/libllvm-size/main.fmf b/tests/libllvm-size/main.fmf index 7ca6945..cd36335 100644 --- a/tests/libllvm-size/main.fmf +++ b/tests/libllvm-size/main.fmf @@ -2,5 +2,5 @@ summary: Check that libLLVM.so has been properly stripped tier: 1 duration: 1m -environment: - LIBLLVM_PATH: /usr/lib64/libLLVM.so +require+: + - llvm-devel diff --git a/tests/libllvm-size/test.sh b/tests/libllvm-size/test.sh index fdc575a..1b31ec6 100755 --- a/tests/libllvm-size/test.sh +++ b/tests/libllvm-size/test.sh @@ -1,5 +1,10 @@ #!/bin/bash -eux +# Retrieve libLLVM path if not set via environment variable. This is necessary +# to make the test flexible enough to use it with both compat and unversioned +# packages. +LIBLLVM_PATH=${LIBLLVM_PATH:-"$(llvm-config --libfiles)"} + # There is a bug in the build process when it runs out of disk space # while stripping binaries, which causes the strip to fail, but does # not fail the build. This results in a libLLVM.so that is over 2GB