run_tests.csh

来自「Spectral Element Method for wave propaga」· CSH 代码 · 共 47 行

CSH
47
字号
#!/bin/csh -f# runs a test in each directory containing a matlab script named analyze_test.mechoecho "------------------------------"echo "-  Test suite for SEM2DPACK  -"echo "------------------------------"echo@ ntotal = 0@ nok = 0set start=`pwd`foreach name (`ls`)  if (! -d $name) continue  if (! -e $name/analyze_test.m) continue  @ ntotal ++  cd $name   echo -n $name "............"     # run test   rm -f *_sem2d.* test.out  sem2dsolve > info  matlab -nosplash -nojvm < analyze_test.m > test.out  grep -sq "Test = 1" test.out   # exit code from last command $status==0 means succesful  if ($status == 0) then    @ nok ++    echo "......... [OK]"  else    echo "......... [FAILED]"  endif  cd $startendechoecho "Summary: "if ($nok == $ntotal) then  echo "[OK] Passed each of " $ntotal " tests"else  echo "[FAILED] Only passed " $nok " tests out of " $ntotal endifecho

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?