ugly hack to get sleep_loopqa.sh to digest 6 or 7 args

This commit is contained in:
edoapra 2017-12-04 19:03:55 -08:00
parent 1c23e5dbb0
commit 9f11b381ef
No known key found for this signature in database
GPG key ID: 79CA3F28FF1B91CE
2 changed files with 9 additions and 5 deletions

View file

@ -40,4 +40,5 @@ after_failure:
- grep d= $TRAVIS_BUILD_DIR/QA/testoutputs/dft_he2+.out
- grep @ $TRAVIS_BUILD_DIR/QA/testoutputs/h2o_opt.out
- cat $TRAVIS_BUILD_DIR/QA/testoutputs/dft_he2+.out
- cat $TRAVIS_BUILD_DIR/QA/testoutputs/prop_mep_gcube.out

View file

@ -1,9 +1,14 @@
#!/bin/bash
#echo "starting sleep_loop.sh for command: " ${@}
#"${@}" &
outfile=../testoutputs/"$6"
#echo "output file is "$outfile
$1 $2 $3 $4 $5 >& $outfile &
narg="${#}"
if [ "$narg" -eq 7 ]; then
outfile=../testoutputs/$7
$1 $2 $3 $4 $5 $6 >& $outfile &
else
outfile=../testoutputs/$6
$1 $2 $3 $4 $5 >& $outfile &
fi
pid=$!
echo "sleep_loopqa got pid" $pid
ps -p "$pid" > /dev/null
@ -19,8 +24,6 @@ else
if [[ "$ps_exit" -eq 0 ]]; then
echo ' ==== ' `date` ' ==== '
tail -1 $outfile
# elif wait "$pid"; then
# echo "ps_exit code" $ps_exit
else
break # exit loop.
fi