diff --git a/regression.html b/regression.html index ccbb979..789885c 100644 --- a/regression.html +++ b/regression.html @@ -3,7 +3,7 @@ - + Boost Regression Test User Documentation @@ -100,15 +100,23 @@ set:

operational. -

A full set of tests and status tables can then be run thusly -on a Window 2000 system:

+

Just running bjam for a specific library can be run like this on Windows, +using the Filesystem Library as an example:

+ +
+
cd \boost-root\libs\filesystem\test
+bjam
+
+

For POSIX systems, just change the backslashes to forward slashes.

+ +

A full set of tests and status tables can be run thusly +on a Windows system:

cd %BOOST_ROOT%\status
-md bin 2>nul
-bjam --dump-tests test >bin\bjam.log 2>&1
-start notepad bin\bjam.log
-process_jam_log <bin\bjam.log
+bjam --dump-tests test >bjam.log 2>&1
+start notepad bjam.log
+process_jam_log <bjam.log
 compiler_status %BOOST_ROOT% cs-win32.html
 rem Specify links file, even though it will be overwritten, so report html includes links
 rem This works because the generated bookmark names are the same regardless of other settings
@@ -118,8 +126,8 @@ compiler_status %BOOST_ROOT% cs-win32-full.html cs-win32-links.html

Modulo syntax adjustments, the same procedure should work on -other operating systems (an example shell script for this is provided, see the +other operating systems (an example a +UNIX shell script for this is provided, see the script itself for comments and directions).  Rename the cs-win-xxx output files as appropriate.

@@ -132,39 +140,61 @@ configurations, it might be useful to just run the config_info test, with a switch to force even up-to-date programs be rebuilt:

-
bjam -a --dump-tests config_info >bin\bjam.log 2>&1
-process_jam_log <bin\bjam.log
+    
bjam -a --dump-tests config_info >bjam.log 2>&1
+process_jam_log <bjam.log
 compiler_status %BOOST_ROOT% cs-win32.html
 

Adding a new test

-

Overall Boost regression tests

+

The best way - the subinclude approach

-

Adding tests is as simple as adding a single line to the The best way to add a test to the boost-root/status/Jamfile is usually to use the bjam  +subinclude feature, since it allows the same test specification to be run +either as part of the overall Boost regression test or as a standalone test of +only the library involved.

+ +

The test is specified in a Jamfile, which is usually placed in the library's +test subdirectory. See the +Filesystem Library's test Jamfile for an example, including the boilerplate +wrapped around the actual tests. By executing bjam +(with or without the status reporting programs) in the library's test +subdirectory, the library can be tested without the need to run the full Boost +regression tests.

+ +

Then by adding a subinclude statement to boost-root/status/Jamfile, the library's test +Jamfile will become part of the main Boost regression tests.  For example, +the Filesystem Library's tests are included by this line in the main +boost-root/status Jamfile:

+ +
+
subinclude libs/filesystem/test ;
+
+ +

Don't forget that Jamfiles are white-space sensitive; delete the +space before the semi-colon in the example above, and you will +get an introduction to Jam error messages.

+ +

Another way - direct inclusion in Boost regression tests

+ +

Adding a test is as simple as adding a single line to the boost-root/status/Jamfile:

run libs/mylib/test/mytest.cpp ;
-

Don't forget that Jam is white-space sensitive; delete the -space before the semi-colon in the example above, and you will -get an introduction to Jam error messages.

- -

For creating more complex tests and test-suites, look at -examples in the Jamfile.  +

For creating more complex tests and test-suites, use the +subinclude approach. Look at +examples in the boost-root/status/Jamfile.  The bind and config test-suites are simple examples, while the regex and threads test suites show more of the power of Jam based testing.

-

Private tests for a specific library

- -

A library can have its own private set of tests by creating a -Jamfile in one of the library's own sub-directories.  For an -example of this, see boost-root/libs/test/test/Jamfile.

-

Requirements

The test suite has been designed to meet to the following @@ -199,11 +229,11 @@ program by Beman Dawes.


Revised 09 January, 2003

+s-format="%d %B, %Y" -->20 January, 2003

Original author: Jens Maurer
Updates: Beman Dawes

- + \ No newline at end of file