test/test-rpm-macros.sh: add build directory to pkg-config search path

If tests are run during build time, without an already installed
systemd they fail to resolve the sysusersdir and tpmfilesdir pkg-config variables.
This commit is contained in:
Radoslav Kolev 2024-05-14 12:19:22 +03:00 committed by Luca Boccassi
parent 0403065876
commit 2aee829fc8

View File

@ -137,7 +137,7 @@ for i in sysusers tmpfiles; do
PKG_DATA_FILE="$(mktemp "$WORK_DIR/pkg-data-XXX")"
EXP_OUT="$(mktemp "$WORK_DIR/exp-out-XXX.log")"
CONF_DIR="$(pkg-config --variable="${i}dir" systemd)"
CONF_DIR="$(PKG_CONFIG_PATH="${BUILD_DIR}/src/core" pkg-config --variable="${i}dir" systemd)"
EXTRA_ARGS=()
if [[ "$i" == tmpfiles ]]; then