let us get some do what I meant not what I said stuff checked in. You would think...
[oota-llvm.git] / docs / TestingGuide.html
index b1e5059a68735c5308cf1e16b063d8863e0cefec..d2c3bd06637a1463f31921e18b2a523a184ecdc5 100644 (file)
@@ -102,7 +102,7 @@ regression tests are in the main "llvm" module under the directory
 programs in C and C++ is in the <tt>llvm-test</tt> module. This module should 
 be checked out to the <tt>llvm/projects</tt> directory. When you
 <tt>configure</tt> the <tt>llvm</tt> module, the <tt>llvm-test</tt> module
-will be automatically configured. Or you can do it manually.</p>
+will be automatically configured. Alternatively, you can configure the <tt>llvm-test</tt> module manually.</p>
 <p>To run all of the simple tests in LLVM using DejaGNU, use the master Makefile in the
 <tt>llvm/test</tt> directory:</p>
 <pre>
@@ -112,11 +112,17 @@ or<br>
 <pre>
 % gmake check
 </pre>
-<p>To run only a subdirectory of tests in llvm/test using DejaGNU (ie. Regression/Transforms). Just substitute the path to the subdirectory:</p>
+
+<p>To run only a subdirectory of tests in llvm/test using DejaGNU (ie.
+Regression/Transforms), just set the TESTSUITE variable to the path of the
+subdirectory (relative to <tt>llvm/test</tt>):</p>
 <pre>
 % gmake -C llvm/test TESTSUITE=Regression/Transforms
 </pre>
-<dd><b>Note: If you are running the tests with <tt>objdir != subdir</tt> you must have run the complete testsuite before you can specify a subdirectory.</b></dd>
+
+<p><b>Note: If you are running the tests with <tt>objdir != subdir</tt>, you
+must have run the complete testsuite before you can specify a
+subdirectory.</b></p>
 
 <p>To run the comprehensive test suite (tests that compile and execute whole 
 programs), run the <tt>llvm-test</tt> tests:</p>
@@ -139,8 +145,8 @@ programs), run the <tt>llvm-test</tt> tests:</p>
 
 <p>The LLVM test suite contains two major categories of tests: code
 fragments and whole programs. Code fragments are in the <tt>llvm</tt> module
-under the directory under the <tt>llvm/test</tt> directory. The whole programs
-test suite are n the <tt>llvm-test</tt> module under the main directory.</p>
+under the <tt>llvm/test</tt> directory. The whole programs
+test suite is in the <tt>llvm-test</tt> module under the main directory.</p>
 
 </div>
 
@@ -251,12 +257,13 @@ location of these external programs is configured by the llvm-test
 <div class="doc_text">
 <p>The LLVM test suite is partially driven by DejaGNU and partially
 driven by GNU Make. Specifically, the Features and Regression tests
-are all driven by DejaGNU. The llvm-test
+are all driven by DejaGNU. The <tt>llvm-test</tt>
 module is currently driven by a set of Makefiles.</p>
 
 <p>The DejaGNU structure is very simple, but does require some
-information to be set. This information is gathered via configure and
-is written to a file, <tt>site.exp</tt> in llvm/test. The llvm/test
+information to be set. This information is gathered via <tt>configure</tt> and
+is written to a file, <tt>site.exp</tt> in <tt>llvm/test</tt>. The
+<tt>llvm/test</tt>
 Makefile does this work for you.</p>
 
 <p>In order for DejaGNU to work, each directory of tests must have a
@@ -283,7 +290,8 @@ file:</p>
 <p>There are a couple patterns within a <tt>RUN</tt> line that the
 llvm-runtest procedure looks for and replaces with the appropriate
 syntax:</p>
-<ul>
+
+<dl style="margin-left: 25px">
 <dt>%p</dt> 
 <dd>The path to the source directory. This is for locating
 any supporting files that are not generated by the test, but used by
@@ -291,7 +299,7 @@ the test.</dd>
 <dt>%s</dt> 
 <dd>The test file.</dd> 
 
-<dt>$t</dt>
+<dt>%t</dt>
 <dd>Temporary filename: testscript.test_filename.tmp, where
 test_filename is the name of the test file. All temporary files are
 placed in the Output directory within the directory the test is
@@ -301,9 +309,9 @@ located.</dd>
 <dd>Path to a script that performs grep -C. Use this since not all
 platforms support grep -C.</dd>
 
-<dt>%llvmgcc</dt> <dd>Full path to the llvmgcc executable.</dd>
-<dt>%llvmgxx</dt> <dd>Full path to the llvmg++ executable.</dd>
-</ul>
+<dt>%llvmgcc</dt> <dd>Full path to the llvm-gcc executable.</dd>
+<dt>%llvmgxx</dt> <dd>Full path to the llvm-g++ executable.</dd>
+</dl>
 
 <p>There are also several scripts in the llvm/test/Scripts directory
 that you might find useful when writing <tt>RUN</tt> lines.</p>
@@ -392,7 +400,8 @@ test suite creates temporary files during execution.</p>
 tests. By default, it will run all of these tests.</p>
 
 <p>To run only the DejaGNU driven tests, run <tt>gmake</tt> at the
-command line in llvm/tests.  To run a specific directory of tests, specify the TESTSUITE.
+command line in <tt>llvm/test</tt>.  To run a specific directory of tests, use
+the TESTSUITE variable.
 </p>
 
 <p>For example, to run the Regression tests, type 
@@ -417,7 +426,7 @@ directory to run them.</p>
     properly configured.</li>
     <li>Use the <tt>configure</tt> script found in the <tt>llvm-test</tt> source
     directory:<br/>
-    <tt>$BUILD_SRC_DIR/configure --with-llvmsrc=$LLVM_SRC_ROOT --with-llvmobj=$LLVM_OBJ_ROOT</tt>
+    <tt>$LLVM_SRC_ROOT/projects/llvm-test/configure --with-llvmsrc=$LLVM_SRC_ROOT --with-llvmobj=$LLVM_OBJ_ROOT</tt>
     </li>
   </ol>
   <li>gmake</li>
@@ -445,7 +454,7 @@ others are features that we haven't added yet (or may never add).  In DejaGNU,
 the result for such tests will be XFAIL (eXpected FAILure).  In this way, you
 can tell the difference between an expected and unexpected failure.</p>
 
-<p>The tests in <tt>llvm-test</tt> have no such feature as of this time. If the
+<p>The tests in <tt>llvm-test</tt> have no such feature at this time. If the
 test passes, only warnings and other miscellaneous output will be generated.  If
 a test fails, a large &lt;program&gt; FAILED message will be displayed.  This
 will help you separate benign warnings from actual test failures.</p>
@@ -465,18 +474,21 @@ program test (described above), run  all of the feature and regression tests,
 and then delete the checked out tree.  This tester is designed to ensure that 
 programs don't break as well as keep track of LLVM's progress over time.</p>
 
-<p>
-If you'd like to set up an instance of the nightly tester to run on your 
-machine, take a look at the comments at the top of the utils/NightlyTester.pl
-file.  We usually run it from a crontab entry that looks ilke this:
-</p>
+<p>If you'd like to set up an instance of the nightly tester to run on your
+machine, take a look at the comments at the top of the
+<tt>utils/NightlyTester.pl</tt> file.  We usually run it from a crontab entry
+that looks ilke this:</p>
 
+<div class="doc_code">
 <pre>
-5 3 * * *       LLVM_LIB_SEARCH_PATH=.../llvm-gcc/bytecode-libs $HOME/llvm/utils/NightlyTest.pl -parallel -enable-linscan ...CVSREPOSTRING... $HOME/buildtest-X86 $HOME/cvs/testresults-X86
+5 3 * * *  $HOME/llvm/utils/NightlyTest.pl -parallel $CVSROOT $HOME/buildtest-X86 $HOME/cvs/testresults-X86
 </pre>
+</div>
 
 <p>Or, you can create a shell script to encapsulate the running of the script.
-The optimized x86 Linux nightly test is run from just such a script:
+The optimized x86 Linux nightly test is run from just such a script:</p>
+
+<div class="doc_code">
 <pre>
 #!/bin/bash
 BASE=/proj/work/llvm/nightlytest
@@ -486,18 +498,17 @@ export WEBDIR=$BASE/testresults
 export LLVMGCCDIR=/proj/work/llvm/cfrontend/install
 export PATH=/proj/install/bin:$LLVMGCCDIR/bin:$PATH
 export LD_LIBRARY_PATH=/proj/install/lib
-export LLVM_LIB_SEARCH_PATH=/proj/work/llvm/cfrontend/install/bytecode-libs
 cd $BASE
 cp /proj/work/llvm/llvm/utils/NightlyTest.pl .
-nice ./NightlyTest.pl -nice -release -verbose -parallel -enable-linscan -noexternals
+nice ./NightlyTest.pl -nice -release -verbose -parallel -enable-linscan -noexternals 2&gt;&amp;1 &gt; output.log
+mail -s 'X86 nightly tester results' <a href="http://mail.cs.uiuc.edu/mailman/listinfo/llvm-testresults">llvm-testresults@cs.uiuc.edu</a> &lt; output.log
 </pre>
+</div>
+
+<p>Take a look at the <tt>NightlyTest.pl</tt> file to see what all of the flags
+and strings do.  If you start running the nightly tests, please let us know and
+we'll link your page to the global tester page.  Thanks!</p>
 
-<p>
-Take a look at the NightlyTest.pl file to see what all of the flags and 
-strings do.  If you start running the nightly tests, please let us know and 
-we'll link your page to the global tester page.  Thanks!
-</p>
-      
 </div>
 
 <!-- *********************************************************************** -->
@@ -509,7 +520,7 @@ we'll link your page to the global tester page.  Thanks!
   <a href="http://validator.w3.org/check/referer"><img
   src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /></a>
 
-  John T. Criswell<br>
+  John T. Criswell, Reid Spencer, and Tanya Lattner<br>
   <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a><br/>
   Last modified: $Date$
 </address>