Berkeley DB Reference Guide:
Test Suite

PrevRefNext

Running the test suite

Once you have started tclsh and have loaded the test.tcl source file (see Running the test suite under UNIX and Running the test suite under Windows for more information), you are ready to run the test suite. At the tclsh prompt, to run the entire test suite, enter the following:

% run_std

Running all the tests can take from several hours to a few days to complete, depending on your hardware. For this reason, the output from this command is redirected to a file in the current directory named ALL.OUT. Periodically, a line will be written to the standard output, indicating what test is being run. When the test suite has finished, a single message indicating that the test suite completed successfully or that it failed will be written. If the run failed, you should review the file ALL.OUT to determine which tests failed. Errors will appear in that file as output lines, beginning with the string "FAIL".

It is also possible to run specific tests or tests for a particular subsystem:

% r archive
% r btree
% r env
% r frecno
% r hash
% r join
% r join
% r lock
% r log
% r mpool
% r mutex
% r queue
% r rbtree
% r recno
% r rrecno
% r subdb
% r txn

Or to run a single, individual test:

% test001 btree

It is also possible to modify the test run based on arguments on the command line. For example, the following command will run a greatly abbreviated form of test001, doing 10 operations instead of 10,000:

% test001 btree 10

In all cases, when not running the entire test suite as described previously, a successful test run will return you to the tclsh prompt. On failure, a message is displayed indicating what failed.

Tests are run, by default, in the directory TESTDIR. However, the test files are often very large. To use a different directory for the test directory, edit the file include.tcl in your build directory, and change the following line to a more appropriate value for your system:

set testdir ./TESTDIR

For example, you might change it to the following:

set testdir /var/tmp/db.test

Alternatively, you can create a symbolic link named TESTDIR in your build directory to an appropriate location for running the tests. Regardless of where you run the tests, the TESTDIR directory should be on a local filesystem, using a remote filesystem (for example, NFS) will almost certainly cause spurious test failures.

PrevRefNext

Copyright Sleepycat Software