Difference between revisions of "GDC/Test Suite"

From D Wiki
Jump to: navigation, search
(Created page with "{{ParentArticle|GDC}} == Running the testsuite == Execute this command in the directory where you've run '''configure''' (see GDC/Installation) to run the D test sui...")
 
(Running the testsuite: Add info about timeouts)
Line 27: Line 27:
 
make check-d RUNTESTFLAGS="--target_board=unix/-fno-section-anchors/O3"
 
make check-d RUNTESTFLAGS="--target_board=unix/-fno-section-anchors/O3"
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
=== Adjusting the timeouts ===
 +
The test suite always enforces a certain timeout when compiling a testcase with gdc. If you see ''UNRESOLVED:'' lines in your build log with a ''program timed out'' warning your machine is too slow and you have to increase the default timeouts.
 +
 +
To change the timeout, edit ''/usr/share/dejagnu/config/unix.exp'' and add this line at the end:
 +
<syntaxhighlight lang="bash">
 +
set_board_info gcc,timeout 1200
 +
</syntaxhighlight>
 +
where 1200 is the new timeout in seconds.
  
 
== More information ==
 
== More information ==
 
[http://gcc.gnu.org/install/test.html GCC test suite documentation]
 
[http://gcc.gnu.org/install/test.html GCC test suite documentation]

Revision as of 07:30, 8 August 2013


Running the testsuite

Execute this command in the directory where you've run configure (see GDC/Installation) to run the D test suite:

make check-d

Note: You must have built the gdc compiler using make before running the tests.

The summary and log will be saved in gcc/testsuite/gdc/ as gdc.sum and gdc.log.

XML output

To obtain xml output for the summary, use this command:

make check-d RUNTESTFLAGS="--xml"

Passing options to gdc

To pass an option to gdc which is used in every test run, use this:

make check-d RUNTESTFLAGS="--target_board=unix/-fno-section-anchors"


The unix part must always be included. Flags are then separated by /. For example, to pass -O3 and -fno-section-anchors, use this:

make check-d RUNTESTFLAGS="--target_board=unix/-fno-section-anchors/O3"

Adjusting the timeouts

The test suite always enforces a certain timeout when compiling a testcase with gdc. If you see UNRESOLVED: lines in your build log with a program timed out warning your machine is too slow and you have to increase the default timeouts.

To change the timeout, edit /usr/share/dejagnu/config/unix.exp and add this line at the end:

set_board_info gcc,timeout 1200

where 1200 is the new timeout in seconds.

More information

GCC test suite documentation