diff --git a/more/regression.html b/more/regression.html index 92e565c0e4..9948744570 100644 --- a/more/regression.html +++ b/more/regression.html @@ -3,7 +3,7 @@ -Boost Internal Regression Test Suite +Boost Regression Test User Documentation @@ -20,249 +20,32 @@ -

Boost Internal Regression Test Suite

+

Boost Regression Test User Documentation

-Boost's internal regression test suite produces the -compiler status tables. + +

Introduction
+Preparation
+Execution
+Adding a new test
+Requirements
+History

+ +

Introduction

+

Boost's internal regression test suite produces the +compiler status tables.

Although not ordinarily run by Boost library users, it is documented here for the benefit of Boost developers, and for Boost users porting to a new platform.

-

Boost is transitioning to a new version of the regression tests.  During -the transition, both versions are available.

- -
-

Documentation for version 3
-Documentation for version 2

- -
- -

Requirements

- -The test suite has been designed to meet to the following requirements. - - -These requirements rule out any script-based approach such as dejagnu -(requires Tcl and expect) or even shell scripts. - - -

Regression Tests - Version Two

- -The implementation is provided in a single source file named -regression.cpp. -

-You should be able to compile and link this file using whatever C++ -compiler is at your disposition. However, you may need to configure -both the compiler and the standard library to use "strict" ISO -compliance mode. Also, you need to extend the search path for include -files with the main boost directory so that the header file -boost/config.hpp -can be found. This header file is required to work around compiler -deficiencies. -

- -You can then start the resulting executable to run regression tests. -By default, the regression test program reads the file "compiler.cfg" -in the current directory to determine the list of compilers and their -invocation syntax. After that, it reads the file "regression.cfg" in -the current directory to determine the regression tests to run. The -results of the regression tests are written in an HTML formatted text -file. This file is by default named "cs-OS.html" in the current -directory, where "OS" is a placeholder for the name of the operating -system (e.g., "linux" or "win32"). -

- -To generate the -compiler status tables, -boost uses the files -status/compiler.cfg -and -status/regression.cfg. -

- -The regression test program accepts some command-line options to alter -its behavior. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-h or --helpprints a help message -
--config fileUse file instead of "compiler.cfg" as the compiler -configuration file. This allows for private compiler setups.
--tests fileUse file instead of "regression.cfg" as the tests -configuration file. This allows individual libraries to specify -additional tests not to be published in the main -compiler status tables. -
--boost pathUse path as the filesystem path to the main boost -directory. The default is "..", i.e. the parent directory.
--output file
-o file
Write the HTML output to file instead of the default -"cs-OS.html".
--compiler nameRun the tests only with compiler name. The name -must be defined in the second line of an applicable compiler -configuration (see below). The default is to run the tests with all -compilers suitable for the platform.
--diffRead the HTML output file before writing it. In the HTML output, -highlight differences in test outcomes compared to the previous -run.
testRun only the named test. The syntax is the same as in the -configuration file (see below).
-

-When running only a selected test, you must also provide an alternate -HTML output filename with "--output" so that the full test output is -not accidentally overwritten. -

- -You should redirect the output (std::cout) and error -(std::cerr) channels to a suitable log file for later -inspection. - - -

Configuration Files

- -In both configuration files, single-line comments starting with "//" -at the leftmost column are ignored. - -

Compiler Configuration

- -The compiler configuration file can contain descriptions for an -arbitrary number of compilers. Each compiler is configured by a block -of six consecutive text lines. -
    -
  1. Name of the operating system for which the entry is applicable -(e.g., "linux" or "win32"). -
  2. Name of the compiler; should be unique within one operating -system. The name of the compiler should not contain the version -number, because it is expected that regression tests are always run -with the most recent compiler version available. -
  3. Name and version number of the compiler. This is printed on -std::cout prior to running a test with that compiler. -
  4. Command-line invocation of the compiler to compile a single source -file to an object file. -
  5. Command-line invocation of the compiler to compile a single source -file to an executable. -
  6. Identification of the compiler for inclusion in the HTML output; -may contain HTML tags such as <br>. -
- -The two command-lines are subject to the following substitutions: - - - -

Test Configuration

- -The test configuration file can contain descriptions for an arbitrary -number of tests. Each test is described by a single line. The first -word (up to the first space) is the type of the test, the next word -gives the filename of the test relative the directory to be given by the -"--boost" command-line option. Optionally, additional words are -passed on as command-line arguments when the test is executed (only -for types "run" and "run-fail"). In these arguments, "%boost" is -replaced by the path given by the "--boost" command-line option (".." -by default). -

- -The following test types are available: -

- -

Adapting for a New Platform

- -In order to adapt the regression test suite for a new platform, a few -changes to the regression.cpp -are required. - - - -You also need to configure the compilers available on your platform in -"compiler.cfg" as described above. -

You may need to add an entry for the compiler to boost/config.hpp, -but only if entries for the compiler is not already present, and the compiler -doesn't fully conform to the ISO C++ Standard.

-

Regression Tests - Version Three

Version 3 of the Boost regression testing framework is based on Boost.Build, and uses bjam to actually run the tests. Because Boost.Build does dependency analysis, only tests for which some dependency has change are rerun.

-

The reporting of test results as HTML files is accomplished by separate C++ -programs which process the residue and log files from the bjam run.

-

Preparation

+

The reporting of test results as HTML files is accomplished by separate +regression reporting +programs which process the residue and log files from the bjam run.

+

Preparation

Install the following programs on your system, in some location suitable for -program executables. Normally that location will be a directory which is part of +program executables. Normally that location must be in a directory which is part of your search path for executables.

-

Execution

+

Execution

These examples assume several environment variables have been set: