[chore](be-ut) Fix the issues with BE UT when starting on macOS (#35946)

The workflow BE UT (macOS) failed to be started due to missing libjvm.dylib.
See https://github.com/apache/doris/actions/runs/9394949541/job/25873499203
This commit is contained in:
Adonis Ling authored and GitHub committed 2024-06-07 10:54:25 +08:00
1 parent 4a57f644d0
commit 555e390506
2 files changed
+8 -1

No files matched your search

+5
View File
@@ -281,6 +281,7 @@ done < <(find "${CMAKE_BUILD_DIR}" -name "*gcda")
setup_java_env() {
local java_version
echo "JAVA_HOME: ${JAVA_HOME}"
if [[ -z "${JAVA_HOME}" ]]; then
return 1
fi
@@ -302,6 +303,10 @@ setup_java_env() {
else
export LD_LIBRARY_PATH="${JAVA_HOME}/lib/${jvm_arch}/server:${JAVA_HOME}/lib/${jvm_arch}:${LD_LIBRARY_PATH}"
fi
if [[ "$(uname -s)" == 'Darwin' ]]; then
export DYLD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${DYLD_LIBRARY_PATH}"
fi
}
# prepare jvm if needed