558 B
558 B
测试治具说明
[!info] nicsensor提供了一部分测试治具脚本用于辅助编写测试脚本
阈值校验脚本-check_threhold.sh
阈值校验脚本提供了判断数值是否大于目标阈值的方法, 可进行整数和小数的比较。使用方法如下:
# 测试数据大于阈值
# 例如测试数据是否大于100,有如下使用方法
res=`./check_threhold.sh ${data} > 100`
if [ $res -eq 1 ];then
echo "data is greater than threholds"
else
echo "data isn't greater than threholds"
fi