28 |
TESTDIRS= |
TESTDIRS= |
29 |
SKIPDIRS= |
SKIPDIRS= |
30 |
SCRIPT='../tools/tst_2+2' |
SCRIPT='../tools/tst_2+2' |
31 |
|
LOGFILE='tst_2+2_out.log' |
32 |
scrArg='All' |
scrArg='All' |
33 |
COMMAND= |
COMMAND= |
34 |
mpi=0 |
mpi=0 |
99 |
if test -r $xx/$yy/data.tst ; then |
if test -r $xx/$yy/data.tst ; then |
100 |
echo "clean dir:" $xx/$yy |
echo "clean dir:" $xx/$yy |
101 |
cd $xx/$yy |
cd $xx/$yy |
102 |
echo ' ' >> outp.tst_2+2.log |
echo ' ' >> $LOGFILE |
103 |
echo $SCRIPT 4 >> outp.tst_2+2.log |
echo $SCRIPT 4 >> $LOGFILE |
104 |
$SCRIPT 4 >> outp.tst_2+2.log 2>&1 |
$SCRIPT 4 >> $LOGFILE 2>&1 |
105 |
cd $here |
cd $here |
106 |
fi |
fi |
107 |
done |
done |
116 |
else CMDLINE="$CMDLINE '$xx'" ; fi |
else CMDLINE="$CMDLINE '$xx'" ; fi |
117 |
done |
done |
118 |
#for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done |
#for xx in "$@" ; do CMDLINE="$CMDLINE '$xx'" ; done |
119 |
DATE=`date +%Y%m%d` |
DATE='' |
120 |
|
if test -f tr_out.txt ; then |
121 |
|
# try to use the date corresponding to 'Start time:' in file "tr_out.txt" : |
122 |
|
sTime=`grep '^Start time: ' tr_out.txt 2>/dev/null | sed 's/Start time: //'` |
123 |
|
if test "x$sTime" != x ; then DATE=`date -d "$sTime" "+%Y%m%d" 2>/dev/null` ; fi |
124 |
|
fi |
125 |
|
# otherwise, use current date: |
126 |
|
if test "x$DATE" = x ; then DATE=`date +%Y%m%d`; fi |
127 |
BASE="rs_"$OUTDIR"_"$DATE"_" |
BASE="rs_"$OUTDIR"_"$DATE"_" |
128 |
xx=0 |
xx=0 |
129 |
DRESULTS="$BASE$xx" |
DRESULTS="$BASE$xx" |
145 |
echo 'run:' $CMDLINE >> $SUMMARY |
echo 'run:' $CMDLINE >> $SUMMARY |
146 |
if test -f tr_out.txt ; then |
if test -f tr_out.txt ; then |
147 |
echo ' using output from:' >> $SUMMARY |
echo ' using output from:' >> $SUMMARY |
148 |
sed -n '2,/OPTFILE/ p' tr_out.txt >> $SUMMARY |
sed -n '2,/^ OPTFILE=/ p' tr_out.txt >> $SUMMARY |
149 |
echo >> $SUMMARY |
echo >> $SUMMARY |
150 |
fi |
fi |
151 |
echo 'test 2+2=4 summary :' >> $SUMMARY |
echo 'test 2+2=4 summary :' >> $SUMMARY |
215 |
else nam=$xx`echo $yy | sed 's/tr_run//'` ; fi |
else nam=$xx`echo $yy | sed 's/tr_run//'` ; fi |
216 |
echo -n "Entering $xx/$yy :" |
echo -n "Entering $xx/$yy :" |
217 |
cd $xx/$yy |
cd $xx/$yy |
218 |
pwd > outp.tst_2+2.log |
pwd > $LOGFILE |
219 |
if test "x$COMMAND" = x ; then |
if test "x$COMMAND" = x ; then |
220 |
echo $SCRIPT $scrArg >> outp.tst_2+2.log ; echo ' ' >> outp.tst_2+2.log |
echo $SCRIPT $scrArg >> $LOGFILE ; echo ' ' >> $LOGFILE |
221 |
$SCRIPT $scrArg >> outp.tst_2+2.log 2>&1 |
$SCRIPT $scrArg >> $LOGFILE 2>&1 |
222 |
out=$? |
out=$? |
223 |
else |
else |
224 |
echo "$SCRIPT $scrArg -command \"$rCommand\"" >> outp.tst_2+2.log |
echo "$SCRIPT $scrArg -command \"$rCommand\"" >> $LOGFILE |
225 |
echo ' ' >> outp.tst_2+2.log |
echo ' ' >> $LOGFILE |
226 |
$SCRIPT $scrArg -command "$rCommand" >> outp.tst_2+2.log 2>&1 |
$SCRIPT $scrArg -command "$rCommand" >> $LOGFILE 2>&1 |
227 |
out=$? |
out=$? |
228 |
fi |
fi |
229 |
case $out in |
case $out in |
238 |
if test $out != '0' ; then |
if test $out != '0' ; then |
239 |
echo " test 2+2=4 FAIL (exit $out)" |
echo " test 2+2=4 FAIL (exit $out)" |
240 |
echo " " |
echo " " |
241 |
tail -5 outp.tst_2+2.log |
tail -5 $LOGFILE |
242 |
echo " " |
echo " " |
243 |
cp -p outp.tst_2+2.log ../../$DRESULTS/$nam.log |
cp -p $LOGFILE ../../$DRESULTS/$nam.log |
244 |
elif test $SAVELOG = 1 ; then |
elif test $SAVELOG = 1 ; then |
245 |
cp -p outp.tst_2+2.log ../../$DRESULTS/$nam.log |
cp -p $LOGFILE ../../$DRESULTS/$nam.log |
246 |
fi |
fi |
247 |
cd $here |
cd $here |
248 |
fi |
fi |