Mercurial > projects > ldc
annotate tests/runtest @ 1650:40bd4a0d4870
Update to work with LLVM 2.7.
Removed use of dyn_cast, llvm no compiles
without exceptions and rtti by
default. We do need exceptions for the libconfig stuff, but rtti isn't
necessary (anymore).
Debug info needs to be rewritten, as in LLVM 2.7 the format has
completely changed. To have something to look at while rewriting, the
old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means
that you have to define this to compile at the moment.
Updated tango 0.99.9 patch to include updated EH runtime code, which is
needed for LLVM 2.7 as well.
author | Tomas Lindquist Olsen |
---|---|
date | Wed, 19 May 2010 12:42:32 +0200 |
parents | 42fc0d955a0d |
children |
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 |
1596
42fc0d955a0d
Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents:
1595
diff
changeset
|
10 # build libtangobos-partial |
42fc0d955a0d
Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents:
1595
diff
changeset
|
11 echo "Building libtangobos-partial.a" |
42fc0d955a0d
Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents:
1595
diff
changeset
|
12 cd testincludes |
42fc0d955a0d
Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents:
1595
diff
changeset
|
13 make |
42fc0d955a0d
Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Robert Clipsham <robert@octarineparrot.com>
parents:
1595
diff
changeset
|
14 cd .. |
1595
628433c343b4
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
992
diff
changeset
|
15 |
186
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
16 # check for dstress |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
17 if ! [ -d dstress ] ; then |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
18 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
|
19 exit |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
20 fi |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
21 |
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
|
22 BASEPATH=`pwd` |
186
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
23 cd dstress |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
24 |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
25 # remove excessive tests |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
26 sed -e 's/torture-//g' -i Makefile |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
27 |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
28 # 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
|
29 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
|
30 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
|
31 |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
32 # impose more conservative constraints (10s and 256 MB) |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
33 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
|
34 |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
35 echo |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
36 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
|
37 echo |
236
df1abfe27be6
[svn r252] added warnings about using an up to date runtime
ChristianK
parents:
235
diff
changeset
|
38 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
|
39 echo |
186
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
40 |
235
c603041da866
[svn r251] fixed arguments checking in runtest script
ChristianK
parents:
217
diff
changeset
|
41 if [ -z "$DMD" ] ; then |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
637
diff
changeset
|
42 echo "Testing with LDC. Set DMD environment variable to select compiler." |
992
6f5e40205f2a
Fix dstress runner to use ldmd
Frits van Bommel <fvbommel wxs.nl>
parents:
680
diff
changeset
|
43 DMD="ldmd -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
|
44 echo "Default is $DMD" |
186
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
45 else |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
46 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
|
47 fi |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
48 |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
49 echo |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
50 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
|
51 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
|
52 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
|
53 echo |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
54 |
188
7949d3dd0341
[svn r204] Don't run complex dstress tests, they seem to be broken.
ChristianK
parents:
186
diff
changeset
|
55 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
|
56 cd .. |
208
086e1aa99557
[svn r224] clean up temporaries after dstress has run
ChristianK
parents:
188
diff
changeset
|
57 |
086e1aa99557
[svn r224] clean up temporaries after dstress has run
ChristianK
parents:
188
diff
changeset
|
58 echo |
680
703d9b4505f9
Update dstress running script.
Christian Kamm <kamm incasoftware de>
parents:
663
diff
changeset
|
59 echo "Cleanup... (removing all .o and .exe files)" |
208
086e1aa99557
[svn r224] clean up temporaries after dstress has run
ChristianK
parents:
188
diff
changeset
|
60 echo |
086e1aa99557
[svn r224] clean up temporaries after dstress has run
ChristianK
parents:
188
diff
changeset
|
61 |
680
703d9b4505f9
Update dstress running script.
Christian Kamm <kamm incasoftware de>
parents:
663
diff
changeset
|
62 find dstress -name "*\.o" -o -name "*\.exe" -delete |