From f36074d03a23de7f7031c1252294522e50b789f6 Mon Sep 17 00:00:00 2001 From: Kris Hung Date: Wed, 14 Feb 2024 10:18:59 -0800 Subject: [PATCH] Add unit test reports to L0_dlpack_multi_gpu and L0_warmup (#6873) * Add unit test reports to L0_dlpack_multi_gpu * Add unit test reports to L0_warmup --- qa/L0_dlpack_multi_gpu/test.sh | 16 ++++------------ qa/L0_warmup/test.sh | 11 ++--------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/qa/L0_dlpack_multi_gpu/test.sh b/qa/L0_dlpack_multi_gpu/test.sh index 2485bfdb88..996f062f42 100755 --- a/qa/L0_dlpack_multi_gpu/test.sh +++ b/qa/L0_dlpack_multi_gpu/test.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -64,18 +64,11 @@ fi set +e export MODEL_NAME="dlpack_test" -python3 $CLIENT_PY > $CLIENT_LOG 2>&1 +python3 -m pytest --junitxml=dlpack_multi_gpu.report.xml $CLIENT_PY > $CLIENT_LOG 2>&1 if [ $? -ne 0 ]; then echo -e "\n***\n*** python_unittest.py FAILED. \n***" RET=1 -else - check_test_results $TEST_RESULT_FILE $EXPECTED_NUM_TESTS - if [ $? -ne 0 ]; then - cat $CLIENT_LOG - echo -e "\n***\n*** Test Result Verification Failed\n***" - RET=1 - fi fi set -e @@ -85,10 +78,9 @@ wait $SERVER_PID if [ $RET -eq 1 ]; then cat $CLIENT_LOG cat $SERVER_LOG - echo -e "\n***\n*** Unittest test FAILED. \n***" + echo -e "\n***\n*** dlpack_multi_gpu test FAILED. \n***" else - echo -e "\n***\n*** Unittest test PASSED. \n***" + echo -e "\n***\n*** dlpack_multi_gpu test PASSED. \n***" fi -export CUDA_VISIBLE_DEVICES=0 exit $RET diff --git a/qa/L0_warmup/test.sh b/qa/L0_warmup/test.sh index 193f4b130d..aeed873b25 100755 --- a/qa/L0_warmup/test.sh +++ b/qa/L0_warmup/test.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2019-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright 2019-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -462,18 +462,11 @@ fi set +e export MODEL_NAME='bls_onnx_warmup' -python3 $CLIENT_PY >> $CLIENT_LOG 2>&1 +python3 -m pytest --junitxml=warmup.report.xml $CLIENT_PY >> $CLIENT_LOG 2>&1 if [ $? -ne 0 ]; then echo -e "\n***\n*** 'bls_onnx_warmup' test FAILED. \n***" cat $CLIENT_LOG RET=1 -else - check_test_results $TEST_RESULT_FILE $EXPECTED_NUM_TESTS - if [ $? -ne 0 ]; then - cat $CLIENT_LOG - echo -e "\n***\n*** Test Result Verification Failed\n***" - RET=1 - fi fi set -e