tomas@637: #!/bin/sh ChristianK@186: ChristianK@186: # check for command line arguments ChristianK@235: if [ -z "$1" ] ; then ChristianK@186: echo "Usage: `basename $0` " ChristianK@186: exit ChristianK@186: fi ChristianK@186: TARGETFILE=$1 ChristianK@186: ChristianK@186: # check for dstress ChristianK@186: if ! [ -d dstress ] ; then ChristianK@186: echo "Testing requires DStress to be checked out into dstress/" ChristianK@186: exit ChristianK@186: fi ChristianK@186: ChristianK@274: BASEPATH=`pwd` ChristianK@186: cd dstress ChristianK@186: ChristianK@186: # remove excessive tests ChristianK@186: sed -e 's/torture-//g' -i Makefile ChristianK@186: ChristianK@186: # make sure only .d files in 'run' tests are run ChristianK@186: sed -e 's/find run -type f |/find run -type f -name "*\\\\.d" |/' -i Makefile ChristianK@186: sed -e 's/find norun -type f |/find norun -type f -name "*\\\\.d" |/' -i Makefile ChristianK@186: ChristianK@186: # impose more conservative constraints (10s and 256 MB) ChristianK@186: sed -e 's/crashRun 30 1000/crashRun 10 256/' -i dstress.c ChristianK@186: ChristianK@186: echo ChristianK@186: echo "Running new test and storing result in $TARGETFILE ..." ChristianK@186: echo ChristianK@236: echo "Remember to make sure you have an up to date runtime!" ChristianK@236: echo ChristianK@186: ChristianK@235: if [ -z "$DMD" ] ; then kamm@663: echo "Testing with LDC. Set DMD environment variable to select compiler." kamm@663: DMD="ldc -I$BASEPATH/testincludes -L$BASEPATH/testincludes/libtangobos-partial.a" ChristianK@274: echo "Default is $DMD" ChristianK@186: else ChristianK@186: echo "Using compiler given by DMD environment variable: $DMD" ChristianK@186: fi ChristianK@186: ChristianK@186: echo ChristianK@186: echo "This will take a while, try 'tail -f $TARGETFILE' to follow progress." ChristianK@186: echo "Note that aborting is tricky. Try killing the processes by the name of" ChristianK@186: echo "run.sh, compile.sh, nocompile.sh and norun.sh as well as this one." ChristianK@186: echo ChristianK@186: ChristianK@188: DMD=$DMD make compile nocompile run norun > ../$TARGETFILE ChristianK@186: cd .. ChristianK@208: ChristianK@208: echo kamm@680: echo "Cleanup... (removing all .o and .exe files)" ChristianK@208: echo ChristianK@208: kamm@680: find dstress -name "*\.o" -o -name "*\.exe" -delete