|
1 |
| -<!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.12 2000/10/22 19:11:05 tgl Exp $ --> |
| 1 | +<!-- $Header: /cvsroot/pgsql/doc/src/sgml/regress.sgml,v 1.13 2000/11/21 23:40:27 petere Exp $ --> |
2 | 2 |
|
3 | 3 | <chapter id="regress">
|
4 | 4 | <title id="regress-title">Regression Tests</title>
|
@@ -272,52 +272,61 @@ diff results/random.out expected/random.out
|
272 | 272 |
|
273 | 273 | <!-- We might want to move the following section into the developer's guide. -->
|
274 | 274 | <sect1 id="regress-platform">
|
275 |
| - <title>Platform-specific comparison files</title> |
| 275 | + <title>Platform-specific comparison files</title> |
276 | 276 |
|
277 |
| - <para> |
278 |
| - Since some of the tests inherently produce platform-specific results, |
279 |
| - we have provided a way to supply platform-specific result comparison |
280 |
| - files. Frequently, the same variation applies to multiple platforms; |
281 |
| - rather than supplying a separate comparison file for every platform, |
282 |
| - there is a mapping file that defines which comparison file to use. |
283 |
| - So, to eliminate bogus test "failures" for a particular platform, |
284 |
| - you must choose or make a variant result file, and then add a line |
285 |
| - to the mapping file, which is "resultmap". |
286 |
| - </para> |
| 277 | + <para> |
| 278 | + Since some of the tests inherently produce platform-specific |
| 279 | + results, we have provided a way to supply platform-specific result |
| 280 | + comparison files. Frequently, the same variation applies to |
| 281 | + multiple platforms; rather than supplying a separate comparison |
| 282 | + file for every platform, there is a mapping file that defines |
| 283 | + which comparison file to use. So, to eliminate bogus test |
| 284 | + <quote>failures</quote> for a particular platform, you must choose |
| 285 | + or make a variant result file, and then add a line to the mapping |
| 286 | + file, which is <filename>resultmap</filename>. |
| 287 | + </para> |
287 | 288 |
|
288 |
| - <para> |
289 |
| - Each line in the mapping file is of the form |
290 |
| - <programlisting> |
291 |
| - testname/platformnamepattern=comparisonfilename |
292 |
| - </programlisting> |
293 |
| - The test name is just the name of the particular regression test module. |
294 |
| - The platform name pattern is a pattern in the style of expr(1) (that is, |
295 |
| - a regular expression with an implicit ^ anchor at the start). It is matched |
296 |
| - against the platform name as printed by config.guess. The comparison |
297 |
| - file name is the name of the substitute result comparison file. |
298 |
| - </para> |
| 289 | + <para> |
| 290 | + Each line in the mapping file is of the form |
| 291 | +<synopsis> |
| 292 | +testname/platformnamepattern=comparisonfilename |
| 293 | +</synopsis> |
| 294 | + The test name is just the name of the particular regression test |
| 295 | + module. The platform name pattern is a pattern in the style of |
| 296 | + expr(1) (that is, a regular expression with an implicit ^ anchor |
| 297 | + at the start). It is matched against the platform name as printed |
| 298 | + by <filename>config.guess</filename> with an appended |
| 299 | + <literal>:gcc</literal> or <literal>:cc</literal>, depending on |
| 300 | + whether you use the GNU compiler or the system's native compiler |
| 301 | + (on systems where there is a difference). The comparison file |
| 302 | + name is the name of the substitute result comparison file. |
| 303 | + </para> |
299 | 304 |
|
300 |
| - <para> |
301 |
| - For example: the int2 regress test includes a deliberate entry of a value |
302 |
| - that is too large to fit in int2. The specific error message that is |
303 |
| - produced is platform-dependent; our reference platform emits |
304 |
| - <programlisting> |
305 |
| - ERROR: pg_atoi: error reading "100000": Numerical result out of range |
306 |
| - </programlisting> |
307 |
| - but a fair number of other Unix platforms emit |
308 |
| - <programlisting> |
309 |
| - ERROR: pg_atoi: error reading "100000": Result too large |
310 |
| - </programlisting> |
311 |
| - Therefore, we provide a variant comparison file, int2-too-large.out, |
312 |
| - that includes this spelling of the error message. To silence the |
313 |
| - bogus "failure" message on HPPA platforms, resultmap includes |
314 |
| - <programlisting> |
315 |
| - int2/hppa=int2-too-large |
316 |
| - </programlisting> |
317 |
| - which will trigger on any machine for which config.guess's output |
318 |
| - begins with 'hppa'. Other lines in resultmap select the variant |
319 |
| - comparison file for other platforms where it's appropriate. |
320 |
| - </para> |
| 305 | + <para> |
| 306 | + For example: the int2 regression test includes a deliberate entry |
| 307 | + of a value that is too large to fit in int2. The specific error |
| 308 | + message that is produced is platform-dependent; our reference |
| 309 | + platform emits |
| 310 | +<screen> |
| 311 | +<computeroutput>ERROR: pg_atoi: error reading "100000": Numerical result out of range</computeroutput> |
| 312 | +</screen> |
| 313 | + but a fair number of other Unix platforms emit |
| 314 | +<screen> |
| 315 | +<computeroutput>ERROR: pg_atoi: error reading "100000": Result too large</computeroutput> |
| 316 | +</screen> |
| 317 | + Therefore, we provide a variant comparison file, |
| 318 | + <filename>int2-too-large.out</filename>, that includes this |
| 319 | + spelling of the error message. To silence the bogus |
| 320 | + <quote>failure</quote> message on HPPA platforms, resultmap |
| 321 | + includes |
| 322 | +<programlisting> |
| 323 | +int2/hppa=int2-too-large |
| 324 | +</programlisting> |
| 325 | + which will trigger on any machine for which config.guess's output |
| 326 | + begins with <quote><literal>hppa</literal></quote>. Other lines |
| 327 | + in resultmap select the variant comparison file for other |
| 328 | + platforms where it's appropriate. |
| 329 | + </para> |
321 | 330 |
|
322 | 331 | </sect1>
|
323 | 332 |
|
|
0 commit comments