nicsensor/test_plugin
2025-06-27 14:29:53 +08:00
..
check_threhold.sh feat(master : test_tool)添加阈值判断脚本 2025-06-27 14:29:53 +08:00
readme.md feat(master : test_tool)添加阈值判断脚本 2025-06-27 14:29:53 +08:00

测试治具说明

[!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