annotate tests/runtest @ 680:703d9b4505f9

Update dstress running script.
author Christian Kamm <kamm incasoftware de>
date Sat, 11 Oct 2008 21:46:19 +0200
parents 6aaa3d3c1183
children 6f5e40205f2a
rev   line source
tomas@637 1 #!/bin/sh
ChristianK@186 2
ChristianK@186 3 # check for command line arguments
ChristianK@235 4 if [ -z "$1" ] ; then
ChristianK@186 5 echo "Usage: `basename $0` <test result file>"
ChristianK@186 6 exit
ChristianK@186 7 fi
ChristianK@186 8 TARGETFILE=$1
ChristianK@186 9
ChristianK@186 10 # check for dstress
ChristianK@186 11 if ! [ -d dstress ] ; then
ChristianK@186 12 echo "Testing requires DStress to be checked out into dstress/"
ChristianK@186 13 exit
ChristianK@186 14 fi
ChristianK@186 15
ChristianK@274 16 BASEPATH=`pwd`
ChristianK@186 17 cd dstress
ChristianK@186 18
ChristianK@186 19 # remove excessive tests
ChristianK@186 20 sed -e 's/torture-//g' -i Makefile
ChristianK@186 21
ChristianK@186 22 # make sure only .d files in 'run' tests are run
ChristianK@186 23 sed -e 's/find run -type f |/find run -type f -name "*\\\\.d" |/' -i Makefile
ChristianK@186 24 sed -e 's/find norun -type f |/find norun -type f -name "*\\\\.d" |/' -i Makefile
ChristianK@186 25
ChristianK@186 26 # impose more conservative constraints (10s and 256 MB)
ChristianK@186 27 sed -e 's/crashRun 30 1000/crashRun 10 256/' -i dstress.c
ChristianK@186 28
ChristianK@186 29 echo
ChristianK@186 30 echo "Running new test and storing result in $TARGETFILE ..."
ChristianK@186 31 echo
ChristianK@236 32 echo "Remember to make sure you have an up to date runtime!"
ChristianK@236 33 echo
ChristianK@186 34
ChristianK@235 35 if [ -z "$DMD" ] ; then
kamm@663 36 echo "Testing with LDC. Set DMD environment variable to select compiler."
kamm@663 37 DMD="ldc -I$BASEPATH/testincludes -L$BASEPATH/testincludes/libtangobos-partial.a"
ChristianK@274 38 echo "Default is $DMD"
ChristianK@186 39 else
ChristianK@186 40 echo "Using compiler given by DMD environment variable: $DMD"
ChristianK@186 41 fi
ChristianK@186 42
ChristianK@186 43 echo
ChristianK@186 44 echo "This will take a while, try 'tail -f $TARGETFILE' to follow progress."
ChristianK@186 45 echo "Note that aborting is tricky. Try killing the processes by the name of"
ChristianK@186 46 echo "run.sh, compile.sh, nocompile.sh and norun.sh as well as this one."
ChristianK@186 47 echo
ChristianK@186 48
ChristianK@188 49 DMD=$DMD make compile nocompile run norun > ../$TARGETFILE
ChristianK@186 50 cd ..
ChristianK@208 51
ChristianK@208 52 echo
kamm@680 53 echo "Cleanup... (removing all .o and .exe files)"
ChristianK@208 54 echo
ChristianK@208 55
kamm@680 56 find dstress -name "*\.o" -o -name "*\.exe" -delete