Ai
2 Star 0 Fork 0

mirrors_android_source/apf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
apf_run_test.sh 1011 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
# Find out where we are and what we're called.
cd $(dirname $0)
testname=$(basename $(basename $0 .sh))
# All's well that ends well.
retcode=0
# Loop through testcases and run each one.
# Each testcase is composed of program, packet, output, and optionally, starting data and/or age.
for prog in testdata/*.program; do
testcase=$(basename $prog .program)
prog=$(cat testdata/$testcase.program)
pkt=$(cat testdata/$testcase.packet)
outputpath=testdata/$testcase.output
args="--trace --program $prog --packet $pkt"
if [[ -f testdata/$testcase.data ]]; then
args="$args --data $(cat testdata/$testcase.data)"
fi
if [[ -f testdata/$testcase.age ]]; then
args="$args --age $(cat testdata/$testcase.age)"
fi
if diff --color -u <(./apf_run $args) <(cat $outputpath); then
echo $testname: $testcase: PASS
else
echo $testname: $testcase: FAIL
retcode=1
fi
done
# Report pass/fail to the test runner.
exit $retcode
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_android_source/apf.git
git@gitee.com:mirrors_android_source/apf.git
mirrors_android_source
apf
apf
main

搜索帮助