2
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
4
<!--See the file LICENSE for redistribution information.-->
7
<title>Berkeley DB Reference Guide: Running the test suite</title>
8
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
12
<a name="2"><!--meow--></a>
13
<table width="100%"><tr valign=top>
14
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Test Suite</dl></h3></td>
15
<td align=right><a href="../../ref/upgrade.4.1/disk.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/test/faq.html"><img src="../../images/next.gif" alt="Next"></a>
18
<h1 align=center>Running the test suite</h1>
19
<p>Once you have started tclsh and have loaded the test.tcl source file (see
20
<a href="../../ref/build_unix/test.html">Running the test suite under UNIX</a>
21
and <a href="../../ref/build_win/test.html">Running the test suite under
22
Windows</a> for more information), you are ready to run the test suite. At
23
the tclsh prompt, to run the entire test suite, enter the following:
24
<p><blockquote><pre>% run_std</pre></blockquote>
25
<p>Running all the tests can take from several hours to a few days to
26
complete, depending on your hardware. For this reason, the output from
27
this command is redirected to a file in the current directory named
28
<b>ALL.OUT</b>. Periodically, a line will be written to the standard
29
output, indicating what test is being run. When the test suite has
30
finished, a single message indicating that the test suite completed
31
successfully or that it failed will be written. If the run failed, you
32
should review the file <b>ALL.OUT</b> to determine which tests failed.
33
Errors will appear in that file as output lines, beginning with the
35
<p>It is also possible to run specific tests or tests for a particular
37
<p><blockquote><pre>% r archive
53
% r txn</pre></blockquote>
54
<p>Or to run a single, individual test:
55
<p><blockquote><pre>% test001 btree</pre></blockquote>
56
<p>It is also possible to modify the test run based on arguments on the
57
command line. For example, the following command will run a greatly
58
abbreviated form of test001, doing 10 operations instead of 10,000:
59
<p><blockquote><pre>% test001 btree 10</pre></blockquote>
60
<p>In all cases, when not running the entire test suite as described
61
previously, a successful test run will return you to the tclsh prompt.
62
On failure, a message is displayed indicating what failed.
63
<p>Tests are run, by default, in the directory <b>TESTDIR</b>. However,
64
the test files are often very large. To use a different directory for
65
the test directory, edit the file include.tcl in your build directory,
66
and change the following line to a more appropriate value for your
68
<p><blockquote><pre>set testdir ./TESTDIR</pre></blockquote>
69
<p>For example, you might change it to the following:
70
<p><blockquote><pre>set testdir /var/tmp/db.test</pre></blockquote>
71
<p>Alternatively, you can create a symbolic link named TESTDIR in your
72
build directory to an appropriate location for running the tests.
73
Regardless of where you run the tests, the TESTDIR directory should be
74
on a local filesystem, using a remote filesystem (for example, NFS) will
75
almost certainly cause spurious test failures.
76
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/upgrade.4.1/disk.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/test/faq.html"><img src="../../images/next.gif" alt="Next"></a>
78
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>