3 Star 9 Fork 4

Cambricon/mlu-ops

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test.sh 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
# Test all operators cases, used for CI test.
# If you want to run specify operators, refer to README.md.
# You need to run build.sh, before running this script.
set -e
source env.sh
usage () {
echo "USAGE: test.sh <options>"
echo
echo "OPTIONS:"
echo " -h, --help Print usage"
echo " --cases_dir=* [Optional]Test cases for test"
echo
}
if [ $# == 0 ]; then echo "Have no options, use -h or --help"; exit -1; fi
cmdline_args=$(getopt -o h --long cases_dir: -n 'test.sh' -- "$@")
eval set -- "$cmdline_args"
if [ $# != 0 ]; then
while true; do
case "$1" in
--cases_dir)
shift
CASES_DIR=$1
shift
;;
-h | --help)
usage
exit 0
;;
--)
shift
break
;;
*)
echo "-- Unknown options ${1}, use -h or --help"
usage
exit -1
;;
esac
done
fi
# Test all operators cases.
cd build/test/
./mluop_gtest
if [[ -n "${CASES_DIR}" && -a "${CASES_DIR}" ]]; then
./mluop_gtest --cases_dir="${CASES_DIR}"
fi
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/cambricon/mlu-ops.git
git@gitee.com:cambricon/mlu-ops.git
cambricon
mlu-ops
mlu-ops
master

搜索帮助