| 1 |
<html> |
|---|
| 2 |
<head> |
|---|
| 3 |
<meta http-equiv="content-type" content="text/html; charset=us-ascii" /> |
|---|
| 4 |
<meta http-equiv="content-language" content="en" /> |
|---|
| 5 |
<meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" l gen true for "http://kuehne.cn")' /> |
|---|
| 6 |
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.classify.org/safesurf/" L gen true for "http://dstress.kuehne.cn" r (SS~~000 1))' /> |
|---|
| 7 |
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://vancouver-webpages.com/VWP1.0/" l gen true comment "VWP1.0" by "webmastro@kuehne.cn" on "2004.09.21T01:30-0700" for "dstress.kuehne.cn" r (P 0 S 0 V 0 Com 0 Tol 0 Env 0 SF 0 Edu 0 Can 0 MC 0 Gam -1 ))' /> |
|---|
| 8 |
<meta http-equiv="Content-Style-Type" content="text/css" /> |
|---|
| 9 |
<title>DStress - D compiler test suite</title> |
|---|
| 10 |
<meta name="DC.Identifier" content="http://dstress.kuehne.cn/readme.html" /> |
|---|
| 11 |
<link rel="stylesheet" type="text/css" href="./www/formate.css" /> |
|---|
| 12 |
<meta name="DC.Format" content="text/html" /> |
|---|
| 13 |
<meta name="DC.Type" content="Software" /> |
|---|
| 14 |
<meta name="generator" content="Thomas Kuehne <webmastro@kuehne.cn>" /> |
|---|
| 15 |
<meta name="author" content="Thomas Kuehne <webmastro@kuehne.cn>" /> |
|---|
| 16 |
<meta name="DC.Creator" content="Thomas Kuehne <webmastro@kuehne.cn>" /> |
|---|
| 17 |
<meta name="DC.Publisher" content="Thomas Kuehne <webmastro@kuehne.cn>" /> |
|---|
| 18 |
<meta name="DC.Language" content="en" /> |
|---|
| 19 |
<meta name="date" content="2006-05-14" /> |
|---|
| 20 |
<meta name="DC.Date" content="2006-05-14" /> |
|---|
| 21 |
<link rel="Report" href="./www/dstress.html" title="Report" /> |
|---|
| 22 |
<link rel="Results" href="./www/results.html" /> |
|---|
| 23 |
<link rel="copyright" href="./license.txt" /> |
|---|
| 24 |
<link rel="author" href="./authors.txt" /> |
|---|
| 25 |
</head> |
|---|
| 26 |
<body> |
|---|
| 27 |
|
|---|
| 28 |
<h2 align="center"><a id="top" name="top"></a>DStress - a D compiler test suite</h2><p align="center">© 2004, 2005, 2006 Thomas Kühne <thomas [at] kuehne.cn></p> |
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
<h3><a name="abstract" id="abstract" href="#top">^</a> Abstract</h3> |
|---|
| 32 |
<blockquote><p> |
|---|
| 33 |
DStress is a collection of bug tracking and language conformance test cases for the <a href="http://digitalmars.com/d/">D programming language</a>. This document describes the use of the testing framework. The test summary can be found at <a href="./www/dstress.html">http://dstress.kuehne.cn/www/dstress.html</a>.</p> |
|---|
| 34 |
</blockquote> |
|---|
| 35 |
|
|---|
| 36 |
<h3><a name="index" id="index" href="#top">^</a> Index</h3> |
|---|
| 37 |
<blockquote> |
|---|
| 38 |
<ol> |
|---|
| 39 |
<li><a href="#conditions">Conditions</a></li> |
|---|
| 40 |
<li><a href="#symbols">Symbols</a></li> |
|---|
| 41 |
<li><a href="#environment-settings">Environment Settings</a></li> |
|---|
| 42 |
<li><a href="#testcase-settings">Testcase Settings</a></li> |
|---|
| 43 |
<li><a href="#testing">Testing</a></li> |
|---|
| 44 |
<li><a href="#report-generation">Report Generation</a></li> |
|---|
| 45 |
<li><a href="#sourcecode-metadata">Sourcecode Metadata</a></li> |
|---|
| 46 |
</ol> |
|---|
| 47 |
</blockquote> |
|---|
| 48 |
|
|---|
| 49 |
<h3><a name="conditions" id="conditions" href="#top">^</a> Conditions</h3> |
|---|
| 50 |
<blockquote> |
|---|
| 51 |
<dl> |
|---|
| 52 |
<dt>Passed</dt> |
|---|
| 53 |
<dd><ol> |
|---|
| 54 |
<li>compiler return code zero</li> |
|---|
| 55 |
<li>no assertion was thrown</li> |
|---|
| 56 |
<li>return code of main is zero (applies only to the runtime tests)</li> |
|---|
| 57 |
</ol></dd> |
|---|
| 58 |
<dt>Failed</dt> |
|---|
| 59 |
<dd><ol> |
|---|
| 60 |
<li>compiler return code unequal zero</li> |
|---|
| 61 |
<li>linker return code unequal zero</li> |
|---|
| 62 |
<li>assertion was thrown</li> |
|---|
| 63 |
<li>return code of main isn't zero (applies only to the runtime tests)</li> |
|---|
| 64 |
</ol></dd> |
|---|
| 65 |
<dt>Error</dt> |
|---|
| 66 |
<dd><ol> |
|---|
| 67 |
<li>compiler segfaulted</li> |
|---|
| 68 |
<li>test case segfaulted</li> |
|---|
| 69 |
<li>unexpected compiler failure without source indication</li> |
|---|
| 70 |
</ol></dd> |
|---|
| 71 |
</dl> |
|---|
| 72 |
</blockquote> |
|---|
| 73 |
|
|---|
| 74 |
<h3><a name="symbols" id="symbols" href="#top">^</a> Symbols</h3> |
|---|
| 75 |
<blockquote> |
|---|
| 76 |
<p>The symbols are the same as those used by the <a href="http://www.gnu.org/software/dejagnu/">DejaGnu</a> test framework.</p> |
|---|
| 77 |
<dl> |
|---|
| 78 |
<dt>PASS</dt> |
|---|
| 79 |
<dd>test case was expected to pass, and it did</dd> |
|---|
| 80 |
<dt>XPASS</dt> |
|---|
| 81 |
<dd>test case was expected to fail, but passed</dd> |
|---|
| 82 |
<dt>FAIL</dt> |
|---|
| 83 |
<dd>test case was expected to pass, but failed</dd> |
|---|
| 84 |
<dt>XFAIL</dt> |
|---|
| 85 |
<dd>test case was expected to fail, and it did</dd> |
|---|
| 86 |
<dt>ERROR</dt> |
|---|
| 87 |
<dd>compiler, linker or test case segfaulted</dd> |
|---|
| 88 |
</dl> |
|---|
| 89 |
</blockquote> |
|---|
| 90 |
|
|---|
| 91 |
<h3><a name="environment-settings" id="environment-settings" href="#top">^</a> Environment Settings</h3> |
|---|
| 92 |
<blockquote> |
|---|
| 93 |
<dl> |
|---|
| 94 |
<dt>DMD</dt> |
|---|
| 95 |
<dd>the D compiler, e.g.: <i>c:\dmd\bin\dmd.exe</i></dd> |
|---|
| 96 |
<dd>use the wrapper <i>gdmd</i> for the GDC compiler</dd> |
|---|
| 97 |
<dd>default value: <i>dmd</i></dd> |
|---|
| 98 |
<dt>GDB</dt> |
|---|
| 99 |
<dd>a debugger with gdb-like commands, e.g.: <i>/usr/local/bin/gdb</i></dd> |
|---|
| 100 |
<dd>default value: <i>gdb</i></dd> |
|---|
| 101 |
<dd>note: only used on POSIX operating systems (e.g. BSD, Linux, Unix)</dd> |
|---|
| 102 |
</dl> |
|---|
| 103 |
</blockquote> |
|---|
| 104 |
|
|---|
| 105 |
<h3><a name="testcase-settings" id="testcase-settings" href="#top">^</a> Testcase Settings</h3> |
|---|
| 106 |
<blockquote> |
|---|
| 107 |
<p>The settings starts with the end of one of the markers listed below and continues until the end of the line.</p> |
|---|
| 108 |
<dl> |
|---|
| 109 |
<dt>__DSTRESS_DFLAGS__</dt> |
|---|
| 110 |
<dd>additional compiler arguments</dd> |
|---|
| 111 |
<dd>default: <i>empty</i></dd> |
|---|
| 112 |
<dt>__DSTRESS_EFILE__</dt> |
|---|
| 113 |
<dd>expected failing source file</dd> |
|---|
| 114 |
<dd>default: if __DSTRESS_ELINE__ isn't empty <i>current source file</i>, else <i>empty</i></dd> |
|---|
| 115 |
<dt>__DSTRESS_ELINE__</dt> |
|---|
| 116 |
<dd>expected failing source line</dd> |
|---|
| 117 |
<dd>default: <i>empty</i></dd> |
|---|
| 118 |
<dt>__DSTRESS_TORTURE_BLOCK__</dt> |
|---|
| 119 |
<dd>don't execute those torture tests which contain this plain string</dd> |
|---|
| 120 |
<dd>default: <i>unset</i></dd> |
|---|
| 121 |
<dt>__DSTRESS_TORTURE_REQUIRE__</dt> |
|---|
| 122 |
<dd>execute only those torture tests which contain this plain string</dd> |
|---|
| 123 |
<dd>default: <i>unset</i></dd> |
|---|
| 124 |
<dt>__GDB_PATTERN__</dt> |
|---|
| 125 |
<dd>expected regular expression in GDB's output</dd> |
|---|
| 126 |
<dd>default: <i>empty</i></dd> |
|---|
| 127 |
<dt>__GDB_SCRIPT__</dt> |
|---|
| 128 |
<dd>GDB command sequence</dd> |
|---|
| 129 |
<dd>note: replace linebreaks by <i>\n</i></dd> |
|---|
| 130 |
<dd>default: <i>empty</i></dd> |
|---|
| 131 |
</dl> |
|---|
| 132 |
</blockquote> |
|---|
| 133 |
|
|---|
| 134 |
<h3><a name="testing" id="testing" href="#top">^</a> Testing</h3> |
|---|
| 135 |
<blockquote> |
|---|
| 136 |
<dl> |
|---|
| 137 |
<dt>Posix Systems: AIX, Apple, BSD, Linux, Unix</dt> |
|---|
| 138 |
<dd> |
|---|
| 139 |
<dl> |
|---|
| 140 |
<dt>Requirements</dt> |
|---|
| 141 |
<dd>a C compiler</dd> |
|---|
| 142 |
<dd><a href="./dstress.c">dstress.c</a></dd> |
|---|
| 143 |
<dd><a href="./crashRun.c">crashRun.c</a></dd> |
|---|
| 144 |
<dd>a D compiler</dd> |
|---|
| 145 |
<dd>GnuMake version 3.80 or later (optional)</dd> |
|---|
| 146 |
<dt>Step-by-Step (without GnuMake)</dt> |
|---|
| 147 |
<dd> |
|---|
| 148 |
<ol> |
|---|
| 149 |
<li>compile <i>dstress.c</i><blockquote><pre><span class="cmd">gcc -o dstress dstress.c</span></pre></blockquote></li> |
|---|
| 150 |
<li>compile <i>crashRun.c</i><blockquote><pre><span class="cmd">gcc -o crashRun crashRun.c</span></pre></blockquote></li> |
|---|
| 151 |
<li>test D compiler:<blockquote><pre><span class="cmd">./dstress compile compile/const_12.d</span></pre></blockquote></li> |
|---|
| 152 |
<li>test linker and shell:<blockquote><pre><span class="cmd">./dstress run run/main_02.d</span></pre></blockquote></li> |
|---|
| 153 |
<li>start testing:<blockquote><pre><span class="cmd">./dstress [torture-compile|torture-nocompile|torture-run|torture-norun] testfile.d 2>> log.txt >> results.txt</span></pre></blockquote></li> |
|---|
| 154 |
</ol> |
|---|
| 155 |
</dd> |
|---|
| 156 |
<dt>Step-by-Step (with GnuMake)</dt> |
|---|
| 157 |
<dd> |
|---|
| 158 |
<ol> |
|---|
| 159 |
<li>clean-up:<blockquote><pre><span class="cmd">make distclean</span></pre></blockquote></li> |
|---|
| 160 |
<li>start testing:<blockquote><pre><span class="cmd">make all > results</span></pre></blockquote></li> |
|---|
| 161 |
</ol> |
|---|
| 162 |
</dd> |
|---|
| 163 |
</dl> |
|---|
| 164 |
</dd> |
|---|
| 165 |
<dt>Windows Systems</dt> |
|---|
| 166 |
<dd> |
|---|
| 167 |
<dl> |
|---|
| 168 |
<dt>Requirements</dt> |
|---|
| 169 |
<dd>a C compiler</dd> |
|---|
| 170 |
<dd><a href="./dstress.c">dstress.c</a></dd> |
|---|
| 171 |
<dd>a D compiler</dd> |
|---|
| 172 |
<dt><a name="windows-restrictions" id="windows-restrictions"></a>Restrictions</dt> |
|---|
| 173 |
<dd>no eternal-loop protection</dd> |
|---|
| 174 |
<dd>no proper Access Violation detection</dd> |
|---|
| 175 |
<dd>Access Violations might cause pop-ups requiring human interaction</dd> |
|---|
| 176 |
<dt>Step-by-Step</dt> |
|---|
| 177 |
<dd> |
|---|
| 178 |
<ol> |
|---|
| 179 |
<li>make sure you understand the <a href="#windows-restrictions"> restrictions</a></li> |
|---|
| 180 |
<li>compile <i>dstress.c</i><blockquote><pre><span class="cmd">dmc -o dstress dstress.c</span></pre></blockquote></li> |
|---|
| 181 |
<li>test D compiler:<blockquote><pre><span class="cmd">dstress compile compile\const_12.d</span></pre></blockquote></li> |
|---|
| 182 |
<li>test linker and shell:<blockquote><pre><span class="cmd">dstress run run\main_02.d</span></pre></blockquote></li> |
|---|
| 183 |
<li>start testing:<blockquote><pre><span class="cmd">dstress [compile|nocompile|run|norun] testfile.d 2>> log.txt >> results.txt</span></pre></blockquote></li> |
|---|
| 184 |
</ol> |
|---|
| 185 |
</dd> |
|---|
| 186 |
</dl> |
|---|
| 187 |
</dd> |
|---|
| 188 |
</dl> |
|---|
| 189 |
</blockquote> |
|---|
| 190 |
|
|---|
| 191 |
<h3><a name="sourcecode-metadata" id="sourcecode-metadata" href="#top">^</a> Sourcecode Metadata</h3> |
|---|
| 192 |
<blockquote> |
|---|
| 193 |
<div>Metadata starts with one of the markers listed below and continues until the end of the line.</div> |
|---|
| 194 |
<dl> |
|---|
| 195 |
<dt>@author@</dt> |
|---|
| 196 |
<dd>the bug/testcase reporter</dd> |
|---|
| 197 |
<dd>common format: <i>Name <email@host></i></dd> |
|---|
| 198 |
<dt>@date@</dt> |
|---|
| 199 |
<dd>first report date</dd> |
|---|
| 200 |
<dd>common format: <i>year-month-day</i></dd> |
|---|
| 201 |
<dt>@uri@</dt> |
|---|
| 202 |
<dd>the message id of the email/newsgroup message or the webpage</dd> |
|---|
| 203 |
<dd>common format: <i>news:msg-id@host</i> or <i>http://host/page</i></dd> |
|---|
| 204 |
<dt>@WARNING@</dt> |
|---|
| 205 |
<dd>marks testcases with external dependencies or architecture/compiler specific data</dd> |
|---|
| 206 |
<dd>common format: <i>descriptive text</i></dd> |
|---|
| 207 |
</dl> |
|---|
| 208 |
</blockquote> |
|---|
| 209 |
|
|---|
| 210 |
<div><br /><br /><hr /><a href='http://dstress.kuehne.cn/www/dstress.html'>http://dstress.kuehne.cn/readme.html</a>; 2006-08-16; <a href="mailto:webmastro@kuehne.cn">Webmaster</a></div> |
|---|
| 211 |
</body> |
|---|
| 212 |
</html> |
|---|