Преглед на файлове

Added example shell script.

[SVN r16821]
John Maddock преди 23 години
родител
ревизия
5c546dd981
променени са 2 файла, в които са добавени 133 реда и са изтрити 18 реда
  1. 28 18
      tools/regression/index.htm
  2. 105 0
      tools/regression/run_tests.sh

+ 28 - 18
tools/regression/index.htm

@@ -2,33 +2,43 @@
 
 <head>
 <meta http-equiv="Content-Language" content="en-us">
-<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
+<meta http-equiv="Content-Type"
+content="text/html; charset=iso-8859-1">
 <meta name="ProgId" content="FrontPage.Editor.Document">
-<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
 <title>Regression Test Reporting Tools</title>
 </head>
 
 <body bgcolor="#FFFFFF">
 
-<h1>
-<img src="../../c++boost.gif" alt="c++boost.gif (8819 bytes)" align="center" width="277" height="86"> 
-Regression Test Reporting Tools</h1>
-<p>Boost regression testing uses <a href="../build/index.html">Boost.Build</a> 
-to run the actual builds and tests. A separate set of tools is used to generate 
-the actual status reports.</p>
+<h1><img src="../../c++boost.gif" alt="c++boost.gif (8819 bytes)"
+align="center" width="277" height="86"> Regression Test Reporting
+Tools</h1>
+
+<p>Boost regression testing uses <a href="../build/index.html">Boost.Build</a>
+to run the actual builds and tests. A separate set of tools is
+used to generate the actual status reports.</p>
+
 <ul>
-  <li>Regression test <a href="../../more/regression.html">user documentation</a>.</li>
-  <li><a href="process_jam_log.cpp">process_jam_log.cpp</a> - Processes the bjam 
-  outputs, creating a file named test_log.xml for each test encountered.</li>
-  <li><a href="compiler_status.cpp">compiler_status.cpp</a> - Generates HTML 
-  status tables from test_log.xml and other files.</li>
-  <li><a href="build/Jamfile">Jamfile</a> - Builds process_jam_log and 
-  compiler_status executables.</li>
+    <li>Regression test <a href="../../more/regression.html">user
+        documentation</a>.</li>
+    <li><a href="process_jam_log.cpp">process_jam_log.cpp</a> -
+        Processes the bjam outputs, creating a file named
+        test_log.xml for each test encountered.</li>
+    <li><a href="compiler_status.cpp">compiler_status.cpp</a> -
+        Generates HTML status tables from test_log.xml and other
+        files.</li>
+    <li><a href="build/Jamfile">Jamfile</a> - Builds
+        process_jam_log and compiler_status executables.</li>
+    <li><a href="run_tests.sh">run_tests.sh</a> - An example
+        shell script for running the tests and generating HTML
+        reports.</li>
 </ul>
+
 <hr>
-<p>Revised
-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->07 January, 2003<!--webbot bot="Timestamp" endspan i-checksum="38578" --></p>
 
+<p>Revised <!--webbot bot="Timestamp" startspan s-type="EDITED"
+s-format="%d %B, %Y" -->09 January, 2003<!--webbot bot="Timestamp"
+i-checksum="38582" endspan --></p>
 </body>
-
 </html>

+ 105 - 0
tools/regression/run_tests.sh

@@ -0,0 +1,105 @@
+#!/bin/sh
+#
+# shell script for running the boost regression test suite and generating
+# a html table of results.
+# This version requires a recent copy of gcc installed on the system, without 
+# it you will need to do a little editing.
+#
+# Start by setting the following shell variables as required:
+
+#
+# BOOST_ROOT points to the root of you boost installation:
+#
+export BOOST_ROOT=/home/jm/boost
+#
+# tool_subpath points to the subdirectory containing your built
+# helper tools, this should be boilerplate for gcc:
+#
+tool_subpath=gcc/release/runtime-link-dynamic
+#
+# exe_suffix the suffix used by exectable files:
+#
+exe_suffix=
+#
+# bjam points to your built bjam executable, should be boilerplate:
+#
+bjam=$BOOST_ROOT/tools/build/jam_src/bin/bjam
+#
+# paths to built helper programs, should be boilerplate:
+#
+process_jam_log=$BOOST_ROOT/tools/regression/build/bin/process_jam_log$exe_suffix/$tool_subpath/process_jam_log$exe_suffix
+compiler_status=$BOOST_ROOT/tools/regression/build/bin/compiler_status$exe_suffix/$tool_subpath/compiler_status$exe_suffix
+
+
+
+
+#
+# STEP 1:
+# rebuild bjam if required:
+#
+echo building bjam:
+cd $BOOST_ROOT/tools/build/jam_src && \
+make CC=gcc YACC="" LOCATE_TARGET=bin
+
+# error check:
+if [ $? != 0 ]; then
+	echo "bjam build failed."
+	exit 256
+fi
+
+#
+# STEP 2:
+# rebuild the regression test helper programs if required:
+#
+echo building regression test helper programs
+cd $BOOST_ROOT/tools/regression/build && \
+$bjam -sTOOLS=gcc -sBUILD=release -sLOCATE_TARGET=bin
+
+# error check:
+if [ $? != 0 ]; then
+	echo "helper program build failed."
+	exit 256
+fi
+
+#
+# STEP 3:
+# run the regression tests:
+#
+echo running the gcc regression tests
+cd $BOOST_ROOT/status
+$bjam -sTOOLS=gcc -sLOCATE_TARGET=bin --dump-tests test 2>&1 | tee regress.log
+
+#
+# STEP 4:
+# post process the results:
+#
+echo processing the regression test results for gcc:
+cat regress.log | $process_jam_log
+
+# error check:
+if [ $? != 0 ]; then
+	echo "Failed regression log post processing."
+	exit 256
+fi
+
+#
+# STEP 5:
+# repeat steps 3 and 4 for each additional toolset:
+#
+
+#
+# STEP 6:
+# create the html table:
+#
+echo generating html tables:
+$compiler_status $BOOST_ROOT cs-$(uname).html cs-$(uname)-links.html
+
+# error check:
+if [ $? != 0 ]; then
+	echo "Failed HTML result table generation."
+	exit 256
+fi
+
+echo done!
+
+

粤ICP备19079148号