ia64/xen-unstable

annotate tools/xenstore/testsuite/test.sh @ 5357:9ea2524b7d10

bitkeeper revision 1.1662.1.15 (42a5968eiZE_DjdIFPjxvzLw6ACvCQ)

Add xenstore daemon and library.
Makefile:
Add xenstore subdirectory.
Remove xs_stress on clean.
Many files:
new file
ignore:
Update ignore list for xenstore.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (authored)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Tue Jun 07 12:43:58 2005 +0000 (2005-06-07)
parents
children 6d3e8f90c2df
rev   line source
cl349@5357 1 #! /bin/sh
cl349@5357 2
cl349@5357 3 set -e
cl349@5357 4 set -m
cl349@5357 5
cl349@5357 6 run_test()
cl349@5357 7 {
cl349@5357 8 rm -rf $XENSTORED_ROOTDIR
cl349@5357 9 mkdir $XENSTORED_ROOTDIR
cl349@5357 10 # Weird failures with this.
cl349@5357 11 if type valgrind >/dev/null 2>&1; then
cl349@5357 12 valgrind -q --logfile-fd=3 ./xenstored_test --output-pid --no-fork 3>testsuite/tmp/vgout > /tmp/pid &
cl349@5357 13 while [ ! -s /tmp/pid ]; do sleep 0; done
cl349@5357 14 PID=`cat /tmp/pid`
cl349@5357 15 rm /tmp/pid
cl349@5357 16 else
cl349@5357 17 PID=`./xenstored_test --output-pid`
cl349@5357 18 fi
cl349@5357 19 if sh -e $2 $1; then
cl349@5357 20 if [ -s testsuite/tmp/vgout ]; then
cl349@5357 21 kill $PID
cl349@5357 22 echo VALGRIND errors:
cl349@5357 23 cat testsuite/tmp/vgout
cl349@5357 24 return 1
cl349@5357 25 fi
cl349@5357 26 echo shutdown | ./xs_test
cl349@5357 27 return 0
cl349@5357 28 else
cl349@5357 29 # In case daemon is wedged.
cl349@5357 30 kill $PID
cl349@5357 31 sleep 1
cl349@5357 32 return 1
cl349@5357 33 fi
cl349@5357 34 }
cl349@5357 35
cl349@5357 36 for f in testsuite/[0-9]*.sh; do
cl349@5357 37 if run_test $f; then
cl349@5357 38 echo Test $f passed...
cl349@5357 39 else
cl349@5357 40 echo Test $f failed, running verbosely...
cl349@5357 41 run_test $f -x
cl349@5357 42 exit 1
cl349@5357 43 fi
cl349@5357 44 done