annotate tests/runtest @ 650:aa6a0b7968f7

Added test case for bug #100 Removed dubious check for not emitting static private global in other modules without access. This should be handled properly somewhere else, it's causing unresolved global errors for stuff that should work (in MiniD)
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 05 Oct 2008 17:28:15 +0200
parents 29dc68c949b0
children 6aaa3d3c1183
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
637
29dc68c949b0 Applied the FreeBSD patch from Ralith, closes ticket #95 , slightly changed but basically the same. Thanx Ralith :)
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents: 385
diff changeset
1 #!/bin/sh
186
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
2
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
3 # check for command line arguments
235
c603041da866 [svn r251] fixed arguments checking in runtest script
ChristianK
parents: 217
diff changeset
4 if [ -z "$1" ] ; then
186
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
5 echo "Usage: `basename $0` <test result file>"
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
6 exit
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
7 fi
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
8 TARGETFILE=$1
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
9
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
10 # check for dstress
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
11 if ! [ -d dstress ] ; then
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
12 echo "Testing requires DStress to be checked out into dstress/"
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
13 exit
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
14 fi
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
15
274
9f228c1e5311 [svn r295] Added phobos aliases to string, wstring, dstring and Error to the object.di used for testing.
ChristianK
parents: 249
diff changeset
16 BASEPATH=`pwd`
186
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
17 cd dstress
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
18
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
19 # remove excessive tests
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
20 sed -e 's/torture-//g' -i Makefile
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
21
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
22 # make sure only .d files in 'run' tests are run
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
23 sed -e 's/find run -type f |/find run -type f -name "*\\\\.d" |/' -i Makefile
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
24 sed -e 's/find norun -type f |/find norun -type f -name "*\\\\.d" |/' -i Makefile
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
25
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
26 # make sure linker-generated bc files are deleted
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
27 sed -e 's/find run -type f -name "\*\\\\\.exe" |/find run -type f -name "*\\\\.exe" -o -name "*\\\\.bc" |/' -i Makefile
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
28 sed -e 's/find norun -type f -name "\*\\\\\.exe" |/find norun -type f -name "*\\\\.exe" -o -name "*\\\\.bc" |/' -i Makefile
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
29
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
30 # impose more conservative constraints (10s and 256 MB)
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
31 sed -e 's/crashRun 30 1000/crashRun 10 256/' -i dstress.c
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
32
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
33 echo
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
34 echo "Running new test and storing result in $TARGETFILE ..."
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
35 echo
236
df1abfe27be6 [svn r252] added warnings about using an up to date runtime
ChristianK
parents: 235
diff changeset
36 echo "Remember to make sure you have an up to date runtime!"
df1abfe27be6 [svn r252] added warnings about using an up to date runtime
ChristianK
parents: 235
diff changeset
37 echo
186
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
38
235
c603041da866 [svn r251] fixed arguments checking in runtest script
ChristianK
parents: 217
diff changeset
39 if [ -z "$DMD" ] ; then
186
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
40 echo "Testing with llvmdc. Set DMD environment variable to select compiler."
385
c4e7003136ab Remove -O0 from command line for compiling tests.
Christian Kamm <kamm incasoftware de>
parents: 326
diff changeset
41 DMD="llvmdc -I$BASEPATH/testincludes -L$BASEPATH/testincludes/libtangobos-partial.a"
274
9f228c1e5311 [svn r295] Added phobos aliases to string, wstring, dstring and Error to the object.di used for testing.
ChristianK
parents: 249
diff changeset
42 echo "Default is $DMD"
186
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
43 else
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
44 echo "Using compiler given by DMD environment variable: $DMD"
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
45 fi
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
46
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
47 echo
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
48 echo "This will take a while, try 'tail -f $TARGETFILE' to follow progress."
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
49 echo "Note that aborting is tricky. Try killing the processes by the name of"
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
50 echo "run.sh, compile.sh, nocompile.sh and norun.sh as well as this one."
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
51 echo
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
52
188
7949d3dd0341 [svn r204] Don't run complex dstress tests, they seem to be broken.
ChristianK
parents: 186
diff changeset
53 DMD=$DMD make compile nocompile run norun > ../$TARGETFILE
186
395223f9875e [svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff changeset
54 cd ..
208
086e1aa99557 [svn r224] clean up temporaries after dstress has run
ChristianK
parents: 188
diff changeset
55
086e1aa99557 [svn r224] clean up temporaries after dstress has run
ChristianK
parents: 188
diff changeset
56 echo
086e1aa99557 [svn r224] clean up temporaries after dstress has run
ChristianK
parents: 188
diff changeset
57 echo "Cleanup... (removing all .bc and .exe files)"
086e1aa99557 [svn r224] clean up temporaries after dstress has run
ChristianK
parents: 188
diff changeset
58 echo
086e1aa99557 [svn r224] clean up temporaries after dstress has run
ChristianK
parents: 188
diff changeset
59
249
fa9fef362a98 [svn r266] dstress results for [265] and small fix for cleanup in runtests script
ChristianK
parents: 236
diff changeset
60 find dstress -name "*\.bc" -o -name "*\.exe" -exec rm {} \;