nicsensor/test_plugin/readme.md
2025-06-27 14:29:53 +08:00

19 lines
558 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 测试治具说明
> [!info]
> nicsensor提供了一部分测试治具脚本用于辅助编写测试脚本
## 阈值校验脚本-check_threhold.sh
阈值校验脚本提供了判断数值是否大于目标阈值的方法, 可进行整数和小数的比较。使用方法如下:
```shell
# 测试数据大于阈值
# 例如测试数据是否大于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
```