diff --git a/mindspore-lite/test/st/scripts/ascend/run_cloud_arm_a2.sh b/mindspore-lite/test/st/scripts/ascend/run_cloud_arm_a2.sh index 3d5719fe5609d8dff05730c206c6708dc7f4bdf2..76bb517013543e1e876278c2fde4bd6ac8acdf04 100644 --- a/mindspore-lite/test/st/scripts/ascend/run_cloud_arm_a2.sh +++ b/mindspore-lite/test/st/scripts/ascend/run_cloud_arm_a2.sh @@ -387,10 +387,19 @@ fi echo "---------- Run MindSpore Lite API ----------" cd ${basepath}/python/python_api/ || exit 1 cp -r ${ms_models_path}/sd1.5_unet.onnx* . || exit 1 # for Model Predict ST -pytest test_tensor.py || exit 1 -pytest test_model.py || exit 1 -pytest test_model_parallel_runner.py || exit 1 -pytest test_model_info.py || exit 1 +#for code coverage in A2 +if [[ "${MSLITE_ENABLE_COVERAGE}" == "on" || "${MSLITE_ENABLE_COVERAGE}" == "ON" ]]; then + echo "MSLITE_ENABLE_COVERAGE: ${MSLITE_ENABLE_COVERAGE}, MSLITE_COVERAGE_FILE: ${MSLITE_COVERAGE_FILE}" + python3 -m coverage run --rcfile=${MSLITE_COVERAGE_FILE} -m pytest test_tensor.py || exit 1 + python3 -m coverage run --rcfile=${MSLITE_COVERAGE_FILE} -m pytest test_model.py || exit 1 + python3 -m coverage run --rcfile=${MSLITE_COVERAGE_FILE} -m pytest test_model_parallel_runner.py || exit 1 + python3 -m coverage run --rcfile=${MSLITE_COVERAGE_FILE} -m pytest test_model_info.py || exit 1 +else + pytest test_tensor.py || exit 1 + pytest test_model.py || exit 1 + pytest test_model_parallel_runner.py || exit 1 + pytest test_model_info.py || exit 1 +fi echo "---------- Run MindSpore Lite API SUCCESS ----------" #--------------------------------------------------------- echo "success"