From 83c3e76506deeab3c1cd56a7620fd4daf0327afa Mon Sep 17 00:00:00 2001 From: Rene Cannao Date: Tue, 24 Mar 2026 15:06:41 +0000 Subject: [PATCH] Fix libparser.so loading for CI test binaries TAP test binaries link libcpp_dotenv.so which transitively needs libparser.so. The RUNPATH baked into libcpp_dotenv.so contains stale paths from the original build, so the dynamic linker can't find it. - Add LD_LIBRARY_PATH for the SKIP_PROXYSQL (unit test) host path - Add TAP_DEPS_PATH to env-isolated.bash so proxysql-tester.py constructs the correct LD_LIBRARY_PATH inside Docker containers --- test/infra/control/env-isolated.bash | 1 + test/infra/control/run-tests-isolated.bash | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/test/infra/control/env-isolated.bash b/test/infra/control/env-isolated.bash index 4585a2258..d1883c5d8 100755 --- a/test/infra/control/env-isolated.bash +++ b/test/infra/control/env-isolated.bash @@ -56,6 +56,7 @@ export TESTS_LOGS_PATH="${WORKSPACE}/ci_infra_logs/${INFRA_ID}/tests" export TAP_WORKDIR="${WORKSPACE}/test/tap/tests/" export TAP_WORKDIRS="${WORKSPACE}/test/tap/tests/ ${WORKSPACE}/test/tap/tests_with_deps/deprecate_eof_support/ ${WORKSPACE}/test/tap/tests/unit/" export TAP_DEPS="${WORKSPACE}/test/tap/tap" +export TAP_DEPS_PATH="${WORKSPACE}/test/tap/tap" export TEST_DEPS_PATH="${WORKSPACE}/test-scripts/deps" export TEST_DEPS="${TEST_DEPS_PATH}" diff --git a/test/infra/control/run-tests-isolated.bash b/test/infra/control/run-tests-isolated.bash index 4ecd249e3..298bc37c9 100755 --- a/test/infra/control/run-tests-isolated.bash +++ b/test/infra/control/run-tests-isolated.bash @@ -143,6 +143,11 @@ fi if [ "${SKIP_PROXYSQL}" = "1" ]; then echo ">>> Running tests directly on the host (no Docker container)..." + # Ensure transitive shared libs (e.g. libparser.so via libcpp_dotenv.so) are found. + # RUNPATH in intermediate libraries may contain stale absolute paths from the + # original build, so we add the known library directories explicitly. + export LD_LIBRARY_PATH="${WORKSPACE}/test/tap/tap${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" + # Discover test binaries from groups.json for this TAP_GROUP GROUPS_JSON="${WORKSPACE}/test/tap/groups/groups.json" if [ ! -f "${GROUPS_JSON}" ]; then