|
From: <wsh...@us...> - 2003-08-08 14:39:50
|
Update of /cvsroot/emc/rcslib/src/test
In directory sc8-pr-cvs1:/tmp/cvs-serv3747
Added Files:
Tag: wps_multiplat_dev_branch
testnml.sh testnml_internal.sh testxmlperf.sh
Log Message:
.
--- NEW FILE: testnml.sh ---
#!/bin/sh
killall -INT testnml_internal.sh 2>/dev/null >/dev/null
sleep 2
killall -KILL testnml_internal.sh 2>/dev/null >/dev/null
./testnml_internal.sh >/tmp/testnml.log 2>/tmp/testnml.err || (echo FAILED;exit 255) || exit 255
exit 0
--- NEW FILE: testnml_internal.sh ---
#! /bin/sh
set -x
echo "Test Date:"
date
echo "Current directory:"
pwd
echo "SET"
set
echo "PRINTENV"
printenv
if [ x${PLAT} = x ] ; then
PLAT=`../../etc/platname`
export PLAT
fi
make PLAT=${PLAT} -C .. || (echo FAILED;exit 255) || exit 255
make PLAT=${PLAT} || (echo FAILED;exit 255) || exit 255
make PLAT=${PLAT} nml_test_server nml_test_write \
nml_test_read nml_test_blocking_read || (echo FAILED;exit 255) || exit 255
builddir=../../plat/${PLAT}/bin
srcdir=../../
if test -f /tmp/test.nml ; then
${builddir}/nmlclean /tmp/test.nml
\rm -f /tmp/test.nml
fi
echo "______________________________________"
echo "Starting NML TESTS:"
killall -INT nml_test_blocking_read
killall -INT nml_test_read
killall -INT nml_test_write
killall -INT nml_test_server
sleep 2
killall -KILL nml_test_blocking_read
killall -KILL nml_test_read
killall -KILL nml_test_write
killall -KILL nml_test_server
echo "Kill any nml test programs still running."
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
kill -INT $procstokill
sleep 1
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
echo ."$procstokill".
kill -KILL $procstokill
sleep 1
fi
fi
echo "Testing nmlcfg . . ."
${builddir}/nmlcfg ${srcdir}/src/test/test.nml2 -o /tmp/test.nml
if test $? -ne 0 ; then
echo "nmlcfg test failed"
exit 255
fi
if test ! -f /tmp/test.nml ; then
echo "nmlcfg test failed"
exit 255
fi
echo "nmlcfg test Passed"
echo "Starting server . . ."
${builddir}/nml_test_server b1 b1s /tmp/test.nml &
sleep 5
echo "Testing local write . . . "
${builddir}/nml_test_write b1 lw /tmp/test.nml 7
if test $? -ne 0 ; then
echo "Local write test failed."
echo "Kill any nml test programs still running."
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
kill -INT $procstokill
sleep 1
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
echo ."$procstokill".
kill -KILL $procstokill
sleep 1
fi
fi
exit 255
fi
echo "local write test passed."
echo "Testing local read . . . "
${builddir}/nml_test_read b1 lr /tmp/test.nml 7
if test $? -ne 0 ; then
echo "Local read test failed."
echo "Kill any nml test programs still running."
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
kill -INT $procstokill
sleep 1
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
echo ."$procstokill".
kill -KILL $procstokill
sleep 1
fi
fi
echo "Kill any nml test programs still running."
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
exit 255
fi
echo "local read test passed."
echo "Kill any nml test programs still running."
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
kill -INT $procstokill
sleep 1
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
echo ."$procstokill".
kill -KILL $procstokill
sleep 1
fi
fi
echo "Starting server . . ."
${builddir}/nml_test_server b1 b1s /tmp/test.nml &
sleep 5
( sleep 5 ; ${builddir}/nml_test_write b1 lw /tmp/test.nml 8; \
${builddir}/nml_test_blocking_read b1 lr /tmp/test.nml 30 8 \
) &
echo "Testing local blocking read . . . "
${builddir}/nml_test_blocking_read b1 lr /tmp/test.nml 30 8 &
${builddir}/nml_test_blocking_read b1 lr /tmp/test.nml 30 8 &
${builddir}/nml_test_blocking_read b1 lr /tmp/test.nml 30 8 &
sleep 1
${builddir}/nml_test_blocking_read b1 lr /tmp/test.nml 30 8 &
${builddir}/nml_test_blocking_read b1 lr /tmp/test.nml 30 8
if test $? -ne 0 ; then
echo "Local blocking read test failed."
echo "Kill any nml test programs still running."
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
kill -INT $procstokill
sleep 1
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
echo ."$procstokill".
kill -KILL $procstokill
sleep 1
fi
fi
exit 255
fi
echo "local read blocking test passed."
echo "Testing remote write . . . "
${builddir}/nml_test_write b1 rw /tmp/test.nml 7
if test $? -ne 0 ; then
echo "Remote write test failed."
echo "Kill any nml test programs still running."
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
kill -INT $procstokill
sleep 1
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
echo ."$procstokill".
kill -KILL $procstokill
sleep 1
fi
fi
exit 255
fi
echo "remote write test passed."
echo "Testing remote read . . . "
${builddir}/nml_test_read b1 rr /tmp/test.nml 7
if test $? -ne 0 ; then
echo "Remote write read failed."
echo "Kill any nml test programs still running."
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
kill -INT $procstokill
sleep 1
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
echo ."$procstokill".
kill -KILL $procstokill
sleep 1
fi
fi
exit 255
fi
echo "remote read test passed."
echo "Kill any nml test programs still running."
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
kill -INT $procstokill
sleep 1
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
echo ."$procstokill".
kill -KILL $procstokill
sleep 1
fi
fi
echo "Starting server . . ."
${builddir}/nml_test_server b1 b1s /tmp/test.nml &
sleep 5
( sleep 5 ; ${builddir}/nml_test_write b1 rw /tmp/test.nml 8 ; \
${builddir}/nml_test_blocking_read b1 lr /tmp/test.nml 30 8 ) &
echo "Testing remote blocking read . . . "
${builddir}/nml_test_blocking_read b1 lr /tmp/test.nml 30 8 &
${builddir}/nml_test_blocking_read b1 rr /tmp/test.nml 30 8 &
${builddir}/nml_test_blocking_read b1 rr /tmp/test.nml 30 8 &
sleep 1
${builddir}/nml_test_blocking_read b1 lr /tmp/test.nml 30 8 &
date
echo '$?=' $?
${builddir}/nml_test_blocking_read b1 rr /tmp/test.nml -1 8
echo '$?=' $?
if test $? -ne 0 ; then
date
echo "Remote blocking read test failed."
echo "Kill any nml test programs still running."
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
kill -INT $procstokill
sleep 1
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
echo ."$procstokill".
kill -KILL $procstokill
sleep 1
fi
fi
exit 255
fi
date
echo "remote read blocking test passed."
echo "Kill any nml test programs still running."
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
kill -INT $procstokill
sleep 1
procstokill=`ps -ae | grep nml_te | awk '{print $1}'`
if test x != "x${procstokill}" ; then
echo ."$procstokill".
kill -KILL $procstokill
sleep 1
fi
fi
${builddir}/nmlclean /tmp/test.nml
exit 0
--- NEW FILE: testxmlperf.sh ---
#! /bin/sh
set -x
if [ x${PLAT} = x ] ; then
PLAT=~/rcslib/etc/platname
export PLAT
fi
\rm -f *.log
\rm -f *.xml
\rm -f *.xml.~*~
RCS_DEBUG_FLAG=0
export RCS_DEBUG_FLAG
XMLOUT_LOG_FILE=xmloutperf.log
export XMLOUT_LOG_FILE
XMLSCHEMAOUT_LOG_FILE=xmlschemaoutperf.log
export XMLSCHEMAOUT_LOG_FILE
CGTESTSVR1_LOG_FILE=cgtestsvr1perf.log
export CGTESTSVR1_LOG_FILE
CGTESTSVR2_LOG_FILE=cgtestsvr2perf.log
export CGTESTSVR2_LOG_FILE
CGTESTREAD_LOG_FILE=cgtestreadperf.log
export CGTESTREAD_LOG_FILE
CGTESTWRITE_LOG_FILE=cgtestwriteperf.log
export CGTESTWRITE_LOG_FILE
#DEBUG_MEMORY=1
#export DEBUG_MEMORY
killall -INT cgtestsvr1
killall -INT cgtestsvr2
sleep 2
killall -KILL cgtestsvr1
killall -KILL cgtestsvr2
../../../rcslib/plat/${PLAT}/bin/cgtestsvr1 &
jobtokill=$!
../../../rcslib/plat/${PLAT}/bin/cgtestsvr2 &
jobtokill2=$!
sleep 5
../../../rcslib/plat/${PLAT}/bin/cgtestwrite && \
sleep 2 && \
../../../rcslib/plat/${PLAT}/bin/cgtestread
kill -INT $jobtokill
kill -INT $jobtokill2
sleep 1
kill -KILL $jobtokill
kill -KILL $jobtokill2
killall -INT cgtestsvr1
killall -INT cgtestsvr2
sleep 2
killall -KILL cgtestsvr1
killall -KILL cgtestsvr2
|