source: trunk/src/gcc/INSTALL/test.html@ 1567

Last change on this file since 1567 was 1392, checked in by bird, 21 years ago

This commit was generated by cvs2svn to compensate for changes in r1391,
which included commits to RCS files with non-trunk default branches.

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