Files
enginex-mlu370-vllm/torch_mlu_ops-v1.3.2/tests/kernels_pytest/run_test.sh
2026-02-04 17:39:32 +08:00

23 lines
455 B
Bash
Executable File

#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
tmo_kernel_case=$(find "${SCRIPT_DIR}" -name "test_*.py")
coverage=${1}
for sc in ${tmo_kernel_case}
do
echo -n "${sc} "
echo -n "Testing...."
if [ "${coverage}" = "coverage" ];then
coverage run -a ${sc}
else
python3 "${sc}" > "/tmp/$(basename ${sc}).log" 2>&1
fi
if [ $? == 0 ];then
echo -e "\033[32m success \033[0m"
else
echo -e "\033[31m failed \033[0m"
fi
done
echo "End of pytest..."