view tests/runtest @ 1595:628433c343b4

Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}. Updated the runtest script to build libtangobos-partial.a if it hasn't already been built. Added in signbit() and va_arg!()() to libtangobos-partial.a so more of the phobos dependent DStress tests pass.
author Robert Clipsham <robert@octarineparrot.com>
date Sun, 08 Nov 2009 16:16:17 +0000
parents 6f5e40205f2a
children 42fc0d955a0d
line wrap: on
line source

#!/bin/sh

# check for command line arguments
if [ -z "$1" ] ; then
    echo "Usage: `basename $0` <test result file>"
    exit
fi
TARGETFILE=$1

# check for libtangobos-partial
if ! [ -f testincludes/libtangobos-partial.a ] ; then
    echo "Could not find libtangobos-partial.a, attempting to build."
    cd testincludes
    make
    cd ..
fi

# check for dstress
if ! [ -d dstress ] ; then
    echo "Testing requires DStress to be checked out into dstress/"
    exit
fi

BASEPATH=`pwd`
cd dstress

# remove excessive tests
sed -e 's/torture-//g' -i Makefile

# make sure only .d files in 'run' tests are run
sed -e 's/find run -type f |/find run -type f -name "*\\\\.d" |/' -i Makefile
sed -e 's/find norun -type f |/find norun -type f -name "*\\\\.d" |/' -i Makefile

# impose more conservative constraints (10s and 256 MB)
sed -e 's/crashRun 30 1000/crashRun 10 256/' -i dstress.c

echo
echo "Running new test and storing result in $TARGETFILE ..."
echo
echo "Remember to make sure you have an up to date runtime!"
echo

if [ -z "$DMD" ] ; then
	echo "Testing with LDC. Set DMD environment variable to select compiler."
	DMD="ldmd -I$BASEPATH/testincludes -L$BASEPATH/testincludes/libtangobos-partial.a"
	echo "Default is $DMD"
else
	echo "Using compiler given by DMD environment variable: $DMD"
fi

echo
echo "This will take a while, try 'tail -f $TARGETFILE' to follow progress."
echo "Note that aborting is tricky. Try killing the processes by the name of"
echo "run.sh, compile.sh, nocompile.sh and norun.sh as well as this one."
echo

DMD=$DMD make compile nocompile run norun > ../$TARGETFILE
cd ..

echo
echo "Cleanup... (removing all .o and .exe files)"
echo

find dstress -name "*\.o" -o -name "*\.exe" -delete