© 2004, 2005, 2006 Thomas Kühne <thomas [at] kuehne.cn>
DStress is a collection of bug tracking and language conformance test cases for the D programming language. This document describes the use of the testing framework. The test summary can be found at http://dstress.kuehne.cn/www/dstress.html and a complete listing at http://dstress.kuehne.cn/www/results.html.
- Passed
- compiler return code zero
- no assertion was thrown
- return code of main is zero (applies only to the runtime tests)
- Failed
- compiler return code unequal zero
- linker return code unequal zero
- assertion was thrown
- return code of main isn't zero (applies only to the runtime tests)
- Error
- compiler segfaulted
- test case segfaulted
- unexpected compiler failure without source indication
The symbols are the same as those used by the DejaGnu test framework.
- PASS
- test case was expected to pass, and it did
- XPASS
- test case was expected to fail, but passed
- FAIL
- test case was expected to pass, but failed
- XFAIL
- test case was expected to fail, and it did
- ERROR
- compiler, linker or test case segfaulted
- DMD
- the D compiler, e.g.: c:\dmd\bin\dmd.exe
- use the wrapper gdmd for the GDC compiler
- default value: dmd
- GDB
- a debugger with gdb-like commands, e.g.: /usr/local/bin/gdb
- default value: gdb
- note: only used on POSIX operating systems (e.g. BSD, Linux, Unix)
The settings starts with the end of one of the markers listed below and continues until the end of the line.
- __DSTRESS_DFLAGS__
- additional compiler arguments
- default: empty
- __DSTRESS_EFILE__
- expected failing source file
- default: if __DSTRESS_ELINE__ isn't empty current source file, else empty
- __DSTRESS_ELINE__
- expected failing source line
- default: empty
- __DSTRESS_TORTURE_BLOCK__
- don't execute those torture tests which contain this plain string
- default: unset
- __DSTRESS_TORTURE_REQUIRE__
- execute only those torture tests which contain this plain string
- default: unset
- __GDB_PATTERN__
- expected regular expression in GDB's output
- default: empty
- __GDB_SCRIPT__
- GDB command sequence
- note: replace linebreaks by \n
- default: empty
- Posix Systems: AIX, Apple, BSD, Linux, Unix
- Requirements
- a C compiler
- dstress.c
- crashRun.c
- a D compiler
- GnuMake version 3.80 or later (optional)
- Step-by-Step (without GnuMake)
- compile dstress.c
gcc -o dstress dstress.c
- compile crashRun.c
gcc -o crashRun crashRun.c
- test D compiler:
./dstress compile compile/const_12.d
- test linker and shell:
./dstress run run/main_02.d
- start testing:
./dstress [compile|nocompile|run|norun] testfile.d 2>> log.txt >> results.txt
- Step-by-Step (with GnuMake)
- clean-up:
make distclean
- start testing:
make all > results
- Windows Systems
- Requirements
- a C compiler
- dstress.c
- a D compiler
- Restrictions
- no eternal-loop protection
- no proper Access Violation detection
- Access Violations might cause pop-ups requiring human interaction
- Step-by-Step
- make sure you understand the restrictions
- open dstress.c, search for #error comment me out and follow the instruction
- compile dstress.c
dmc -o dstress dstress.c
- test D compiler:
dstress compile compile\const_12.d
- test linker and shell:
dstress run run\main_02.d
- start testing:
dstress [compile|nocompile|run|norun] testfile.d 2>> log.txt >> results.txt
Metadata starts with one of the markers listed below and continues until the end of the line.
- @author@
- the bug/testcase reporter
- common format: Name <email@host>
- @date@
- first report date
- common format: year-month-day
- @uri@
- the message id of the email/newsgroup message or the webpage
- common format: news:msg-id@host or http://host/page
- @WARNING@
- marks testcases with external dependencies or architecture/compiler specific data
- common format: descriptive text