Mercurial > projects > ldc
annotate 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 |
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 |
1595
628433c343b4
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
992
diff
changeset
|
10 # check for libtangobos-partial |
628433c343b4
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
992
diff
changeset
|
11 if ! [ -f testincludes/libtangobos-partial.a ] ; then |
628433c343b4
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
992
diff
changeset
|
12 echo "Could not find libtangobos-partial.a, attempting to build." |
628433c343b4
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
992
diff
changeset
|
13 cd testincludes |
628433c343b4
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
992
diff
changeset
|
14 make |
628433c343b4
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
992
diff
changeset
|
15 cd .. |
628433c343b4
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
992
diff
changeset
|
16 fi |
628433c343b4
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Robert Clipsham <robert@octarineparrot.com>
parents:
992
diff
changeset
|
17 |
186
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
18 # check for dstress |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
19 if ! [ -d dstress ] ; then |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
20 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
|
21 exit |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
22 fi |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
23 |
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
|
24 BASEPATH=`pwd` |
186
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
25 cd dstress |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
26 |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
27 # remove excessive tests |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
28 sed -e 's/torture-//g' -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 # 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
|
31 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
|
32 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
|
33 |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
34 # impose more conservative constraints (10s and 256 MB) |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
35 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
|
36 |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
37 echo |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
38 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
|
39 echo |
236
df1abfe27be6
[svn r252] added warnings about using an up to date runtime
ChristianK
parents:
235
diff
changeset
|
40 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
|
41 echo |
186
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
42 |
235
c603041da866
[svn r251] fixed arguments checking in runtest script
ChristianK
parents:
217
diff
changeset
|
43 if [ -z "$DMD" ] ; then |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
637
diff
changeset
|
44 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
|
45 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
|
46 echo "Default is $DMD" |
186
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
47 else |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
48 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
|
49 fi |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
50 |
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 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
|
53 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
|
54 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
|
55 echo |
395223f9875e
[svn r202] added start of dstress-based test suite to tests/
ChristianK
parents:
diff
changeset
|
56 |
188
7949d3dd0341
[svn r204] Don't run complex dstress tests, they seem to be broken.
ChristianK
parents:
186
diff
changeset
|
57 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
|
58 cd .. |
208
086e1aa99557
[svn r224] clean up temporaries after dstress has run
ChristianK
parents:
188
diff
changeset
|
59 |
086e1aa99557
[svn r224] clean up temporaries after dstress has run
ChristianK
parents:
188
diff
changeset
|
60 echo |
680
703d9b4505f9
Update dstress running script.
Christian Kamm <kamm incasoftware de>
parents:
663
diff
changeset
|
61 echo "Cleanup... (removing all .o and .exe files)" |
208
086e1aa99557
[svn r224] clean up temporaries after dstress has run
ChristianK
parents:
188
diff
changeset
|
62 echo |
086e1aa99557
[svn r224] clean up temporaries after dstress has run
ChristianK
parents:
188
diff
changeset
|
63 |
680
703d9b4505f9
Update dstress running script.
Christian Kamm <kamm incasoftware de>
parents:
663
diff
changeset
|
64 find dstress -name "*\.o" -o -name "*\.exe" -delete |