1 Star 0 Fork 10

dawuweijun/OpenFOAM_TUTORIAL

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
testAll 993 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/dawuweijun/OpenFOAM_TUTORIAL.git
git@gitee.com:dawuweijun/OpenFOAM_TUTORIAL.git
dawuweijun
OpenFOAM_TUTORIAL
OpenFOAM_TUTORIAL
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385