代码拉取完成,页面将自动刷新
#!/bin/bash
# ===
# Script for automatically compiling, running and testing all of the tutorials.
# ===
# run a command and redirect outputs to /dev/null, only print PASS or FAIL
# depending on whether errors occured or not
run () {
# run the command and get rid of the outputs
$1 >/dev/null 2>&1
# check return code, 0 indicates success
if [ $? -eq 0 ]; then
echo " PASS: "$1
else
echo " FAIL: "$1
fi
}
# go over all tutorial directories
for tutorialDir in */ ; do
if [[ $tutorialDir = *OFtutorial* ]]; then
echo "Checking:" $tutorialDir
# navigate to the tutorial
cd $tutorialDir
# no need to test cleaning the code
./Allwclean >/dev/null 2>&1
# test building and running
run ./Allwmake
cd testCase
run ./Allrun
# no need to test cleaning the test case
./Allclean >/dev/null 2>&1
# go back to main directory
cd ../..
fi
done
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。