From 6ae3c34104b5900b296fed44555c748494cedf6f Mon Sep 17 00:00:00 2001 From: Katherine Yang <80359429+jbkyang-nvi@users.noreply.github.com> Date: Fri, 13 Oct 2023 12:36:09 -0700 Subject: [PATCH] Add Javacpp-presets repo location as env variable in Java tests(#6385) Simplify testing when upstream (javacpp-presets) build changes. Related to triton-inference-server/client#409 --- qa/L0_java_memory_growth/test.sh | 4 +++- qa/L0_java_resnet/test.sh | 4 +++- qa/L0_java_sequence_batcher/test.sh | 4 +++- qa/L0_java_simple_example/test.sh | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/qa/L0_java_memory_growth/test.sh b/qa/L0_java_memory_growth/test.sh index 602c017d21..d5ec33a5d5 100755 --- a/qa/L0_java_memory_growth/test.sh +++ b/qa/L0_java_memory_growth/test.sh @@ -27,9 +27,11 @@ # Set up test files based on installation instructions # https://github.com/bytedeco/javacpp-presets/blob/master/tritonserver/README.md +JAVACPP_BRANCH=${JAVACPP_BRANCH:="https://github.com/bytedeco/javacpp-presets.git"} +JAVACPP_BRANCH_TAG=${JAVACPP_BRANCH_TAG:="master"} set -e git clone --single-branch --depth=1 -b ${TRITON_CLIENT_REPO_TAG} https://github.com/triton-inference-server/client.git -source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --keep-build-dependencies +source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --javacpp-branch ${JAVACPP_BRANCH} --javacpp-tag ${JAVACPP_BRANCH_TAG} --keep-build-dependencies cd .. export MAVEN_OPTS="-XX:MaxGCPauseMillis=40" diff --git a/qa/L0_java_resnet/test.sh b/qa/L0_java_resnet/test.sh index 1b81832b33..1ca08b4c65 100755 --- a/qa/L0_java_resnet/test.sh +++ b/qa/L0_java_resnet/test.sh @@ -41,6 +41,8 @@ fi # Models DATADIR=/data/inferenceserver/${REPO_VERSION} MODEL_REPO=`pwd`/models +JAVACPP_BRANCH=${JAVACPP_BRANCH:="https://github.com/bytedeco/javacpp-presets.git"} +JAVACPP_BRANCH_TAG=${JAVACPP_BRANCH_TAG:="master"} # Create local model repository mkdir -p ${MODEL_REPO} @@ -55,7 +57,7 @@ done # https://github.com/bytedeco/javacpp-presets/blob/master/tritonserver/README.md set -e git clone --single-branch --depth=1 -b ${TRITON_CLIENT_REPO_TAG} https://github.com/triton-inference-server/client.git -source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --keep-build-dependencies +source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --javacpp-branch ${JAVACPP_BRANCH} --javacpp-tag ${JAVACPP_BRANCH_TAG} --keep-build-dependencies cd .. CLIENT_LOG="client.log" diff --git a/qa/L0_java_sequence_batcher/test.sh b/qa/L0_java_sequence_batcher/test.sh index a3ddb96d11..2f988322d9 100755 --- a/qa/L0_java_sequence_batcher/test.sh +++ b/qa/L0_java_sequence_batcher/test.sh @@ -40,12 +40,14 @@ fi # Models DATADIR=/data/inferenceserver/${REPO_VERSION} +JAVACPP_BRANCH=${JAVACPP_BRANCH:="https://github.com/bytedeco/javacpp-presets.git"} +JAVACPP_BRANCH_TAG=${JAVACPP_BRANCH_TAG:="master"} # Set up test files based on installation instructions # https://github.com/bytedeco/javacpp-presets/blob/master/tritonserver/README.md set -e git clone --single-branch --depth=1 -b ${TRITON_CLIENT_REPO_TAG} https://github.com/triton-inference-server/client.git -source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --keep-build-dependencies +source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --javacpp-branch ${JAVACPP_BRANCH} --javacpp-tag ${JAVACPP_BRANCH_TAG} --keep-build-dependencies cd .. CLIENT_LOG="client.log" diff --git a/qa/L0_java_simple_example/test.sh b/qa/L0_java_simple_example/test.sh index 12ef1d9aed..e9726edff4 100755 --- a/qa/L0_java_simple_example/test.sh +++ b/qa/L0_java_simple_example/test.sh @@ -37,9 +37,11 @@ if [ -z "$REPO_VERSION" ]; then exit 1 fi +JAVACPP_BRANCH=${JAVACPP_BRANCH:="https://github.com/bytedeco/javacpp-presets.git"} +JAVACPP_BRANCH_TAG=${JAVACPP_BRANCH_TAG:="master"} set -e git clone --single-branch --depth=1 -b ${TRITON_CLIENT_REPO_TAG} https://github.com/triton-inference-server/client.git -source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --keep-build-dependencies +source client/src/java-api-bindings/scripts/install_dependencies_and_build.sh -b $PWD --javacpp-branch ${JAVACPP_BRANCH} --javacpp-tag ${JAVACPP_BRANCH_TAG} --keep-build-dependencies cd .. CLIENT_LOG="client_cpu_only.log"