Skip to content

Commit 52bb23f

Browse files
authored
test: Add input byte size tests using C APIs (#7372)
1 parent c61d993 commit 52bb23f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

Dockerfile.QA

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ RUN mkdir -p qa/common && \
148148
cp bin/request_cancellation_test qa/L0_request_cancellation/. && \
149149
cp bin/triton_json_test qa/L0_json/. && \
150150
cp bin/backend_output_detail_test qa/L0_backend_output_detail/. && \
151-
cp -r deploy/mlflow-triton-plugin qa/L0_mlflow/.
151+
cp -r deploy/mlflow-triton-plugin qa/L0_mlflow/. && \
152+
cp bin/input_byte_size_test qa/L0_input_validation/. && \
153+
cp -r docs/examples/model_repository/simple_identity qa/L0_input_validation/models
152154

153155
RUN mkdir -p qa/pkgs && \
154156
cp python/triton*.whl qa/pkgs/. && \

qa/L0_input_validation/test.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ DATADIR=/data/inferenceserver/${REPO_VERSION}
4646
SERVER=/opt/tritonserver/bin/tritonserver
4747
CLIENT_LOG="./input_validation_client.log"
4848
TEST_PY=./input_validation_test.py
49-
SHAPE_TEST_PY=./input_shape_validation_test.py
5049
TEST_RESULT_FILE='./test_results.txt'
5150
SERVER_LOG="./inference_server.log"
51+
TEST_LOG="./input_byte_size_test.log"
52+
TEST_EXEC=./input_byte_size_test
5253

5354
export CUDA_VISIBLE_DEVICES=0
5455

@@ -143,6 +144,15 @@ set -e
143144
kill $SERVER_PID
144145
wait $SERVER_PID
145146

147+
# input_byte_size_test
148+
set +e
149+
LD_LIBRARY_PATH=/opt/tritonserver/lib:$LD_LIBRARY_PATH $TEST_EXEC >>$TEST_LOG 2>&1
150+
if [ $? -ne 0 ]; then
151+
echo -e "\n***\n*** Query Unit Test Failed\n***"
152+
RET=1
153+
fi
154+
set -e
155+
146156
if [ $RET -eq 0 ]; then
147157
echo -e "\n***\n*** Input Validation Test Passed\n***"
148158
else

0 commit comments

Comments
 (0)