| 1 | <html lang="en"> | 
|---|
| 2 | <head> | 
|---|
| 3 | <title>Installing GCC: Testing</title> | 
|---|
| 4 | <meta http-equiv="Content-Type" content="text/html"> | 
|---|
| 5 | <meta name="description" content="Installing GCC: Testing"> | 
|---|
| 6 | <meta name="generator" content="makeinfo 4.5"> | 
|---|
| 7 | <link href="http://www.gnu.org/software/texinfo/" rel="generator-home"> | 
|---|
| 8 | <!-- | 
|---|
| 9 | Copyright © 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, | 
|---|
| 10 | 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. | 
|---|
| 11 | <br><p> | 
|---|
| 12 | <p>Permission is granted to copy, distribute and/or modify this document | 
|---|
| 13 | under the terms of the GNU Free Documentation License, Version 1.2 or | 
|---|
| 14 | any later version published by the Free Software Foundation; with no | 
|---|
| 15 | Invariant Sections, the Front-Cover texts being (a) (see below), and | 
|---|
| 16 | with the Back-Cover Texts being (b) (see below).  A copy of the | 
|---|
| 17 | license is included in the section entitled "<a href="./gfdl.html">GNU Free Documentation License</a>". | 
|---|
| 18 |  | 
|---|
| 19 | <p>(a) The FSF's Front-Cover Text is: | 
|---|
| 20 |  | 
|---|
| 21 | <p>A GNU Manual | 
|---|
| 22 |  | 
|---|
| 23 | <p>(b) The FSF's Back-Cover Text is: | 
|---|
| 24 |  | 
|---|
| 25 | <p>You have freedom to copy and modify this GNU Manual, like GNU | 
|---|
| 26 | software.  Copies published by the Free Software Foundation raise | 
|---|
| 27 | funds for GNU development.--> | 
|---|
| 28 | </head> | 
|---|
| 29 | <body> | 
|---|
| 30 | <h1 class="settitle">Installing GCC: Testing</h1> | 
|---|
| 31 | Before you install GCC, we encourage you to run the testsuites and to | 
|---|
| 32 | compare your results with results from a similar configuration that have | 
|---|
| 33 | been submitted to the | 
|---|
| 34 | <a href="http://gcc.gnu.org/ml/gcc-testresults/">gcc-testresults mailing list</a>. | 
|---|
| 35 | Some of these archived results are linked from the build status lists | 
|---|
| 36 | at <a href="http://gcc.gnu.org/buildstat.html">http://gcc.gnu.org/buildstat.html</a>, although not everyone who | 
|---|
| 37 | reports a successful build runs the testsuites and submits the results. | 
|---|
| 38 | This step is optional and may require you to download additional software, | 
|---|
| 39 | but it can give you confidence in your new GCC installation or point out | 
|---|
| 40 | problems before you install and start using your new GCC. | 
|---|
| 41 |  | 
|---|
| 42 | <p>First, you must have <a href="download.html">downloaded the testsuites</a>. | 
|---|
| 43 | These are part of the full distribution, but if you downloaded the | 
|---|
| 44 | "core" compiler plus any front ends, you must download the testsuites | 
|---|
| 45 | separately. | 
|---|
| 46 |  | 
|---|
| 47 | <p>Second, you must have the testing tools installed.  This includes | 
|---|
| 48 | <a href="http://www.gnu.org/software/dejagnu/">DejaGnu</a> 1.4.1 or 1.4.3 | 
|---|
| 49 | and later, Tcl, and Expect; the DejaGnu site has links to these. | 
|---|
| 50 |  | 
|---|
| 51 | <p>If the directories where <code>runtest</code> and <code>expect</code> were | 
|---|
| 52 | installed are not in the <code>PATH</code>, you may need to set the following | 
|---|
| 53 | environment variables appropriately, as in the following example (which | 
|---|
| 54 | assumes that DejaGnu has been installed under <code>/usr/local</code>): | 
|---|
| 55 |  | 
|---|
| 56 | <pre class="example">          TCL_LIBRARY = /usr/local/share/tcl8.0 | 
|---|
| 57 | DEJAGNULIBS = /usr/local/share/dejagnu | 
|---|
| 58 | </pre> | 
|---|
| 59 |  | 
|---|
| 60 | <p>(On systems such as Cygwin, these paths are required to be actual | 
|---|
| 61 | paths, not mounts or links; presumably this is due to some lack of | 
|---|
| 62 | portability in the DejaGnu code.) | 
|---|
| 63 |  | 
|---|
| 64 | <p>Finally, you can run the testsuite (which may take a long time): | 
|---|
| 65 | <pre class="example">          cd <var>objdir</var>; make -k check | 
|---|
| 66 | </pre> | 
|---|
| 67 |  | 
|---|
| 68 | <p>This will test various components of GCC, such as compiler | 
|---|
| 69 | front ends and runtime libraries.  While running the testsuite, DejaGnu | 
|---|
| 70 | might emit some harmless messages resembling | 
|---|
| 71 | <code>WARNING: Couldn't find the global config file.</code> or | 
|---|
| 72 | <code>WARNING: Couldn't find tool init file</code> that can be ignored. | 
|---|
| 73 |  | 
|---|
| 74 | <h3 class="section"><a name="TOC0"></a>How can I run the test suite on selected tests?</h3> | 
|---|
| 75 |  | 
|---|
| 76 | <p>In order to run sets of tests selectively, there are targets | 
|---|
| 77 | <code>make check-gcc</code> and <code>make check-g++</code> | 
|---|
| 78 | in the <code>gcc</code> subdirectory of the object directory.  You can also | 
|---|
| 79 | just run <code>make check</code> in a subdirectory of the object directory. | 
|---|
| 80 |  | 
|---|
| 81 | <p>A more selective way to just run all <code>gcc</code> execute tests in the | 
|---|
| 82 | testsuite is to use | 
|---|
| 83 |  | 
|---|
| 84 | <pre class="example">         make check-gcc RUNTESTFLAGS="execute.exp <var>other-options</var>" | 
|---|
| 85 | </pre> | 
|---|
| 86 |  | 
|---|
| 87 | <p>Likewise, in order to run only the <code>g++</code> "old-deja" tests in | 
|---|
| 88 | the testsuite with filenames matching <code>9805*</code>, you would use | 
|---|
| 89 |  | 
|---|
| 90 | <pre class="example">         make check-g++ RUNTESTFLAGS="old-deja.exp=9805* <var>other-options</var>" | 
|---|
| 91 | </pre> | 
|---|
| 92 |  | 
|---|
| 93 | <p>The <code>*.exp</code> files are located in the testsuite directories of the GCC | 
|---|
| 94 | source, the most important ones being <code>compile.exp</code>, | 
|---|
| 95 | <code>execute.exp</code>, <code>dg.exp</code> and <code>old-deja.exp</code>. | 
|---|
| 96 | To get a list of the possible <code>*.exp</code> files, pipe the | 
|---|
| 97 | output of <code>make check</code> into a file and look at the | 
|---|
| 98 | <code>Running ...  .exp</code> lines. | 
|---|
| 99 |  | 
|---|
| 100 | <p>The Java runtime tests can be executed via <code>make check</code> | 
|---|
| 101 | in the <code></code><var>target</var><code>/libjava/testsuite</code> directory in | 
|---|
| 102 | the build tree. | 
|---|
| 103 |  | 
|---|
| 104 | <h3 class="section"><a name="TOC1"></a>Additional testing for Java Class Libraries</h3> | 
|---|
| 105 |  | 
|---|
| 106 | <p>The <a href="http://sources.redhat.com/mauve/">Mauve Project</a> provides | 
|---|
| 107 | a suite of tests for the Java Class Libraries.  This suite can be run | 
|---|
| 108 | as part of libgcj testing by placing the Mauve tree within the libjava | 
|---|
| 109 | testsuite at <code>libjava/testsuite/libjava.mauve/mauve</code>, or by | 
|---|
| 110 | specifying the location of that tree when invoking <code>make</code>, as in | 
|---|
| 111 | <code>make MAUVEDIR=~/mauve check</code>. | 
|---|
| 112 |  | 
|---|
| 113 | <a href="http://www-124.ibm.com/developerworks/oss/cvs/jikes/~checkout~/jacks/jacks.html">Jacks</a> | 
|---|
| 114 | is a free test suite that tests Java compiler front ends.  This suite | 
|---|
| 115 | can be run as part of libgcj testing by placing the Jacks tree within | 
|---|
| 116 | the libjava testsuite at <code>libjava/testsuite/libjava.jacks/jacks</code>. | 
|---|
| 117 |  | 
|---|
| 118 | <h3 class="section"><a name="TOC2"></a>How to interpret test results</h3> | 
|---|
| 119 |  | 
|---|
| 120 | <p>The result of running the testsuite are various <code>*.sum</code> and <code>*.log</code> | 
|---|
| 121 | files in the testsuite subdirectories.  The <code>*.log</code> files contain a | 
|---|
| 122 | detailed log of the compiler invocations and the corresponding | 
|---|
| 123 | results, the <code>*.sum</code> files summarize the results.  These summaries | 
|---|
| 124 | contain status codes for all tests: | 
|---|
| 125 |  | 
|---|
| 126 | <ul> | 
|---|
| 127 | <li>PASS: the test passed as expected | 
|---|
| 128 | <li>XPASS: the test unexpectedly passed | 
|---|
| 129 | <li>FAIL: the test unexpectedly failed | 
|---|
| 130 | <li>XFAIL: the test failed as expected | 
|---|
| 131 | <li>UNSUPPORTED: the test is not supported on this platform | 
|---|
| 132 | <li>ERROR: the testsuite detected an error | 
|---|
| 133 | <li>WARNING: the testsuite detected a possible problem | 
|---|
| 134 | </ul> | 
|---|
| 135 |  | 
|---|
| 136 | <p>It is normal for some tests to report unexpected failures.  At the | 
|---|
| 137 | current time our testing harness does not allow fine grained control | 
|---|
| 138 | over whether or not a test is expected to fail.  We expect to fix this | 
|---|
| 139 | problem in future releases. | 
|---|
| 140 |  | 
|---|
| 141 | <h3 class="section"><a name="TOC3"></a>Submitting test results</h3> | 
|---|
| 142 |  | 
|---|
| 143 | <p>If you want to report the results to the GCC project, use the | 
|---|
| 144 | <code>contrib/test_summary</code> shell script.  Start it in the <var>objdir</var> with | 
|---|
| 145 |  | 
|---|
| 146 | <pre class="example">         <var>srcdir</var>/contrib/test_summary -p your_commentary.txt \ | 
|---|
| 147 | -m gcc-testresults@gcc.gnu.org |sh | 
|---|
| 148 | </pre> | 
|---|
| 149 |  | 
|---|
| 150 | <p>This script uses the <code>Mail</code> program to send the results, so | 
|---|
| 151 | make sure it is in your <code>PATH</code>.  The file <code>your_commentary.txt</code> is | 
|---|
| 152 | prepended to the testsuite summary and should contain any special | 
|---|
| 153 | remarks you have on your results or your build environment.  Please | 
|---|
| 154 | do not edit the testsuite result block or the subject line, as these | 
|---|
| 155 | messages may be automatically processed. | 
|---|
| 156 |  | 
|---|
| 157 | <hr /> | 
|---|
| 158 | <p> | 
|---|
| 159 | <a href="./index.html">Return to the GCC Installation page</a> | 
|---|
| 160 |  | 
|---|
| 161 | </body></html> | 
|---|
| 162 |  | 
|---|