comparison tests/runtest @ 186:395223f9875e trunk

[svn r202] added start of dstress-based test suite to tests/
author ChristianK
date Thu, 08 May 2008 22:32:22 +0200
parents
children 7949d3dd0341
comparison
equal deleted inserted replaced
185:89e21eeaf4c4 186:395223f9875e
1 #!/bin/bash
2
3 # check for command line arguments
4 if [ -z $1 ] ; then
5 echo "Usage: `basename $0` <test result file>"
6 exit
7 fi
8 TARGETFILE=$1
9
10 # check for dstress
11 if ! [ -d dstress ] ; then
12 echo "Testing requires DStress to be checked out into dstress/"
13 exit
14 fi
15
16 cd dstress
17
18 # remove excessive tests
19 sed -e 's/torture-//g' -i Makefile
20
21 # make sure only .d files in 'run' tests are run
22 sed -e 's/find run -type f |/find run -type f -name "*\\\\.d" |/' -i Makefile
23 sed -e 's/find norun -type f |/find norun -type f -name "*\\\\.d" |/' -i Makefile
24
25 # make sure linker-generated bc files are deleted
26 sed -e 's/find run -type f -name "\*\\\\\.exe" |/find run -type f -name "*\\\\.exe" -o -name "*\\\\.bc" |/' -i Makefile
27 sed -e 's/find norun -type f -name "\*\\\\\.exe" |/find norun -type f -name "*\\\\.exe" -o -name "*\\\\.bc" |/' -i Makefile
28
29 # impose more conservative constraints (10s and 256 MB)
30 sed -e 's/crashRun 30 1000/crashRun 10 256/' -i dstress.c
31
32 echo
33 echo "Running new test and storing result in $TARGETFILE ..."
34 echo
35
36 if [ -z $DMD ] ; then
37 echo "Testing with llvmdc. Set DMD environment variable to select compiler."
38 DMD="llvmdc"
39 else
40 echo "Using compiler given by DMD environment variable: $DMD"
41 fi
42
43 echo
44 echo "This will take a while, try 'tail -f $TARGETFILE' to follow progress."
45 echo "Note that aborting is tricky. Try killing the processes by the name of"
46 echo "run.sh, compile.sh, nocompile.sh and norun.sh as well as this one."
47 echo
48
49 DMD=$DMD make > ../$TARGETFILE
50 cd ..