1. Introduction

This document describes the B2000++ verification cases. These are found under directory tests/system_tests/verification of the b2000pp source package. The verification cases are also distributed in the <prefix>/share/b2000pp_data/verification directory (if the

-DBUILD_B2TESTDATA=ON

cmake option was specified during the build process). <prefix>/share/b2000pp_data contains (see also README.rst)

  • examples: Examples cases.

  • verification: Verification cases.

  • test_cases: “Old” test cases for Python2 and baspl++.

Note

Verification case descriptions refer to the B2VERIFICATION environment variable. B2VERIFICATION is an alias to the verification top-level directory, such as <prefix>/share/b2000pp_data/verification. It might be handy to define B2VERIFICATION in your $HOME/profile file (bash example):

export B2VERIFICATION=<prefix>/share/b2000pp_data/verification

Verification cases are launched with the b2testrunner application. Some cases can be launched with make scripts if available. Specific data processing capabilities by the Simples module or the baspl++ post-processor are described in the text and also documented in the scripts.

To launch an example case, run the test case with the b2testrunner from a shell:

b2testrunner [-j <njobs>] <path-to-tests>

To redirect output to a file:

b2testrunner  [-j <njobs>] . >b2testrunner.out 2>&1

Tests can be executed concurrently with the -j option. Example: Run with 12 threads:

b2testrunner -j 12 .

Individual tests can also be launched with the b2testrunner application from their respective directories.

Some verification cases can also be executed with make. Check with the relevant directories, where additional descriptive text in README files can be found. The Makefile files found in the relevant directories usually contain the following targets:

  • Typing make with the default target in a shell usually runs the test as documented, by executing B2000++ with the relevant MDL input file.

  • To clean up the directory by removing the generated model database (a file with the extension .b2m) and other files and directories created by the test, type

    make clean
    

Test cases can easily be added to the test case suite. Adding tests should be limited to testing features not captured by one of the existing tests or to testing bugged features. While SMR maintains the ‘official’ test case suite, users can add tests to the sub-directory additional. For information on how to use the B2000++ test program and how to write tests and documentation, please refer to the B2000++ Programming Manual.