12 |
echo " -help : print usage" |
echo " -help : print usage" |
13 |
echo " -t LIST_EXP : only check experiments in LIST_EXP" |
echo " -t LIST_EXP : only check experiments in LIST_EXP" |
14 |
echo " -skd LIST_EXP : skip experiments in LIST_EXP" |
echo " -skd LIST_EXP : skip experiments in LIST_EXP" |
15 |
|
echo " -exe COMMAND : use COMMAND to run the tests" |
16 |
|
echo " -mpi : run the tests using MPI" |
17 |
echo " -o STRING : used to build output directory name" |
echo " -o STRING : used to build output directory name" |
18 |
echo " (DEF=\"hostname\")" |
echo " (DEF=\"hostname\")" |
19 |
echo " -a,-A STRING : email address to send output to" |
echo " -a,-A STRING : email address to send output to" |
26 |
CLEAN=0 |
CLEAN=0 |
27 |
TESTDIRS= |
TESTDIRS= |
28 |
SKIPDIRS= |
SKIPDIRS= |
29 |
|
SCRIPT='../tools/tst_2+2' |
30 |
|
COMMAND= |
31 |
|
mpi=0 |
32 |
OUTDIR=`hostname` |
OUTDIR=`hostname` |
33 |
SAVELOG=0 |
SAVELOG=0 |
34 |
ADDRESS= |
ADDRESS= |
|
SCRIPT='../tools/tst_2+2' |
|
35 |
MPACK="../tools/mpack-1.6/mpack" |
MPACK="../tools/mpack-1.6/mpack" |
36 |
here=`pwd` |
here=`pwd` |
37 |
yy= |
yy= |
46 |
-clean) CLEAN=1 ;; |
-clean) CLEAN=1 ;; |
47 |
-t ) yy=TESTDIRS ;; |
-t ) yy=TESTDIRS ;; |
48 |
-skd ) yy=SKIPDIRS ;; |
-skd ) yy=SKIPDIRS ;; |
49 |
|
-exe ) yy=COMMAND ;; |
50 |
|
-mpi ) mpi=1 ;; |
51 |
-a ) yy=ADDRESS ;; |
-a ) yy=ADDRESS ;; |
52 |
-A ) yy=ADDRESS ; SAVELOG=1 ;; |
-A ) yy=ADDRESS ; SAVELOG=1 ;; |
53 |
-o ) yy=OUTDIR ;; |
-o ) yy=OUTDIR ;; |
134 |
echo 'P. Run Result experiment' >> $SUMMARY |
echo 'P. Run Result experiment' >> $SUMMARY |
135 |
echo ' 1 2 3' >> $SUMMARY |
echo ' 1 2 3' >> $SUMMARY |
136 |
|
|
137 |
|
#-- For MPI test: |
138 |
|
RUNOUTP="output.txt" |
139 |
|
if [ $mpi -ge 1 ] ; then |
140 |
|
SCRIPT="$SCRIPT -mpi" |
141 |
|
RUNOUTP="STDOUT.0000" |
142 |
|
fi |
143 |
|
|
144 |
for xx in $LIST |
for xx in $LIST |
145 |
do |
do |
146 |
echo ============================================================================== |
echo ============================================================================== |
147 |
listD='run '`(cd $xx/results ; ls output.*.txt 2> /dev/null | sed 's/^output\./tr_run./g' | sed 's/\.txt$//g' )` |
listD='run '`(cd $xx/results ; ls output.*.txt 2> /dev/null | sed 's/^output\./tr_run./g' | sed 's/\.txt$//g' )` |
148 |
for yy in $listD |
for yy in $listD |
149 |
do |
do |
150 |
if test -f $xx/$yy/output.txt ; then |
if test -f $xx/$yy/$RUNOUTP ; then |
151 |
if test "x$OPTFILE" = x -a -f $xx/build/Makefile ; then |
if test "x$OPTFILE" = x -a -f $xx/build/Makefile ; then |
152 |
comm=`grep '^# OPTFILE=' $xx/build/Makefile 2>/dev/null | head -1 | sed 's/^# //'` |
comm=`grep '^# OPTFILE=' $xx/build/Makefile 2>/dev/null | head -1 | sed 's/^# //'` |
153 |
echo "from '$xx/build/Makefile', extract:" > $DRESULTS/genmake_state |
echo "from '$xx/build/Makefile', extract:" > $DRESULTS/genmake_state |
159 |
echo -n "Entering $xx/$yy :" |
echo -n "Entering $xx/$yy :" |
160 |
cd $xx/$yy |
cd $xx/$yy |
161 |
pwd > outp.tst_2+2.log |
pwd > outp.tst_2+2.log |
162 |
echo $SCRIPT All >> outp.tst_2+2.log ; echo ' ' >> outp.tst_2+2.log |
if test "x$COMMAND" = x ; then |
163 |
$SCRIPT All >> outp.tst_2+2.log 2>&1 |
echo $SCRIPT All >> outp.tst_2+2.log ; echo ' ' >> outp.tst_2+2.log |
164 |
out=$? |
$SCRIPT All >> outp.tst_2+2.log 2>&1 |
165 |
|
out=$? |
166 |
|
else |
167 |
|
echo "$SCRIPT All -command \"$COMMAND\"" >> outp.tst_2+2.log |
168 |
|
echo ' ' >> outp.tst_2+2.log |
169 |
|
$SCRIPT All -command "$COMMAND" >> outp.tst_2+2.log 2>&1 |
170 |
|
out=$? |
171 |
|
fi |
172 |
case $out in |
case $out in |
173 |
0 ) echo ' pass test 2+2=4' |
0 ) echo ' pass test 2+2=4' |
174 |
echo "Y Y Y Y pass <- $nam" >> ../../$SUMMARY ;; |
echo "Y Y Y Y pass <- $nam" >> ../../$SUMMARY ;; |