| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <title>Chapter 14. Test Suite</title> |
| 7 | <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> |
| 8 | <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 | <link rel="start" href="index.html" title="Berkeley DB Installation and Build Guide" /> |
| 10 | <link rel="up" href="index.html" title="Berkeley DB Installation and Build Guide" /> |
| 11 | <link rel="prev" href="changelog_4_8.html" title="Berkeley DB 4.8.28 Change Log" /> |
| 12 | <link rel="next" href="test_faq.html" title="Test suite FAQ" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">Chapter 14. |
| 22 | Test Suite |
| 23 | </th> |
| 24 | </tr> |
| 25 | <tr> |
| 26 | <td width="20%" align="left"><a accesskey="p" href="changelog_4_8.html">Prev</a> </td> |
| 27 | <th width="60%" align="center"> </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="test_faq.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="chapter" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title"><a id="test"></a>Chapter 14. |
| 38 | Test Suite |
| 39 | </h2> |
| 40 | </div> |
| 41 | </div> |
| 42 | </div> |
| 43 | <div class="toc"> |
| 44 | <p> |
| 45 | <b>Table of Contents</b> |
| 46 | </p> |
| 47 | <dl> |
| 48 | <dt> |
| 49 | <span class="sect1"> |
| 50 | <a href="test.html#test_run">Running the test suite</a> |
| 51 | </span> |
| 52 | </dt> |
| 53 | <dd> |
| 54 | <dl> |
| 55 | <dt> |
| 56 | <span class="sect2"> |
| 57 | <a href="test.html#idp1298736">Running SQL Test Suite on Unix</a> |
| 58 | </span> |
| 59 | </dt> |
| 60 | <dt> |
| 61 | <span class="sect2"> |
| 62 | <a href="test.html#idp1289848">Running SQL Test Suite on Windows</a> |
| 63 | </span> |
| 64 | </dt> |
| 65 | </dl> |
| 66 | </dd> |
| 67 | <dt> |
| 68 | <span class="sect1"> |
| 69 | <a href="test_faq.html">Test suite FAQ</a> |
| 70 | </span> |
| 71 | </dt> |
| 72 | </dl> |
| 73 | </div> |
| 74 | <div class="sect1" lang="en" xml:lang="en"> |
| 75 | <div class="titlepage"> |
| 76 | <div> |
| 77 | <div> |
| 78 | <h2 class="title" style="clear: both"><a id="test_run"></a>Running the test suite</h2> |
| 79 | </div> |
| 80 | </div> |
| 81 | </div> |
| 82 | <div class="toc"> |
| 83 | <dl> |
| 84 | <dt> |
| 85 | <span class="sect2"> |
| 86 | <a href="test.html#idp1298736">Running SQL Test Suite on Unix</a> |
| 87 | </span> |
| 88 | </dt> |
| 89 | <dt> |
| 90 | <span class="sect2"> |
| 91 | <a href="test.html#idp1289848">Running SQL Test Suite on Windows</a> |
| 92 | </span> |
| 93 | </dt> |
| 94 | </dl> |
| 95 | </div> |
| 96 | <p>Once you have started tclsh and have loaded the test.tcl source file |
| 97 | (see <a class="xref" href="build_unix_test.html" title="Running the test suite under UNIX">Running the test suite under UNIX</a> and |
| 98 | <a class="xref" href="build_win_test.html" title="Running the test suite under Windows">Running the test suite under Windows</a> for more information), |
| 99 | you are ready to run the test |
| 100 | suite. At the tclsh prompt, to run the standard test suite, enter the |
| 101 | following:</p> |
| 102 | <pre class="programlisting">% run_std</pre> |
| 103 | <p>A more exhaustive version of the test suite runs all the tests several |
| 104 | more times, testing encryption, replication, and different page sizes. |
| 105 | After you have a clean run for run_std, you may choose to run this |
| 106 | lengthier set of tests. At the tclsh prompt, enter:</p> |
| 107 | <pre class="programlisting">% run_all</pre> |
| 108 | <p>Running the standard tests can take from several hours to a few days to |
| 109 | complete, depending on your hardware, and running all the tests will |
| 110 | take at least twice as long. For this reason, the output from these |
| 111 | commands are redirected to a file in the current directory named |
| 112 | <code class="filename">ALL.OUT</code>. Periodically, a line will be written to the standard |
| 113 | output, indicating what test is being run. When the test suite has |
| 114 | finished, a final message will be written indicating the test suite has |
| 115 | completed successfully or that it has failed. If the run failed, you |
| 116 | should review the <code class="filename">ALL.OUT</code> file to determine which tests failed. |
| 117 | Errors will appear in that file as output lines, beginning with the |
| 118 | string "FAIL".</p> |
| 119 | <p>Tests are run in the directory <code class="filename">TESTDIR</code>, by default. However, |
| 120 | the test files are often large, and you should use a filesystem with at |
| 121 | least several hundred megabytes of free space. To use a different |
| 122 | directory for the test directory, edit the file include.tcl in your |
| 123 | build directory, and change the following line to a more appropriate |
| 124 | value for your system:</p> |
| 125 | <pre class="programlisting">set testdir ./TESTDIR</pre> |
| 126 | <p>For example, you might change it to the following:</p> |
| 127 | <pre class="programlisting">set testdir /var/tmp/db.test</pre> |
| 128 | <p>Alternatively, you can create a symbolic link named TESTDIR in your |
| 129 | build directory to an appropriate location for running the tests. |
| 130 | Regardless of where you run the tests, the TESTDIR directory should be |
| 131 | on a local filesystem. Using a remote filesystem (for example, an NFS |
| 132 | mounted filesystem) will almost certainly cause spurious test |
| 133 | failures.</p> |
| 134 | <div class="sect2" lang="en" xml:lang="en"> |
| 135 | <div class="titlepage"> |
| 136 | <div> |
| 137 | <div> |
| 138 | <h3 class="title"><a id="idp1298736"></a>Running SQL Test Suite on Unix</h3> |
| 139 | </div> |
| 140 | </div> |
| 141 | </div> |
| 142 | <p> |
| 143 | Once the test suite is built (see <a class="xref" href="build_unix_test.html#build_unix_test_sql" title="Building SQL Test Suite on Unix">Building SQL Test Suite on Unix</a> for more information), run the entire test suite by executing the following command in the <code class="literal">../build_unix/sql</code> directory: |
| 144 | </p> |
| 145 | <pre class="programlisting"> |
| 146 | sh ../../test/sql/bdb-test.sh |
| 147 | </pre> |
| 148 | <p> |
| 149 | This runs a set of tests and lists the errors each test encountered, if any. A detailed list of the test results is written to <code class="literal">test.log</code>. |
| 150 | </p> |
| 151 | <p>To run an individual test, such as insert.test, execute the following command in the <code class="literal">../build_unix/sql</code> directory: |
| 152 | </p> |
| 153 | <pre class="programlisting"> |
| 154 | ./testfixture ../../lang/sql/sqlite/test/insert.test |
| 155 | </pre> |
| 156 | </div> |
| 157 | <div class="sect2" lang="en" xml:lang="en"> |
| 158 | <div class="titlepage"> |
| 159 | <div> |
| 160 | <div> |
| 161 | <h3 class="title"><a id="idp1289848"></a>Running SQL Test Suite on Windows</h3> |
| 162 | </div> |
| 163 | </div> |
| 164 | </div> |
| 165 | <p> |
| 166 | After the test suite is built (see <a class="xref" href="build_win_test.html#build_win_test_sql" title="Building the software needed by the SQL tests">Building the software needed by the SQL tests</a> for more information) and before running the entire test suite, go to <code class="literal">../sql/adapter/bdb-test.sh</code> and edit the line: |
| 167 | </p> |
| 168 | <pre class="programlisting"> |
| 169 | echo $t: `alarm $TIMEOUT ./testfixture.exe |
| 170 | $tpath 2>&1 | tee -a test.log | grep "errors out of" |
| 171 | || echo "failed"` |
| 172 | </pre> |
| 173 | <p>to</p> |
| 174 | <pre class="programlisting"> |
| 175 | echo $t: `alarm $TIMEOUT Win32/Debug/testfixture.exe |
| 176 | $tpath 2>&1 | tee -a test.log | grep "errors out of" |
| 177 | || echo "failed"` |
| 178 | </pre> |
| 179 | <p>Running the test suite requires an Unix emulator, such as Cygwin. In a Cygwin window go to the <code class="literal">../build_windows</code> directory and execute the command: |
| 180 | </p> |
| 181 | <pre class="programlisting"> |
| 182 | sh ../sql/adapter/bdb-test.sh |
| 183 | </pre> |
| 184 | <p>This runs a set of tests and lists errors that each test encountered, if any. A detailed list of the test results is written to <code class="literal">test.log</code>. |
| 185 | </p> |
| 186 | <p>To run an individual test, such as insert.test, execute the following command in the <code class="literal">../build_windows</code> directory: |
| 187 | </p> |
| 188 | <pre class="programlisting"> |
| 189 | Win32/Debug/testfixture.exe ../sql/sqlite/test/insert.test |
| 190 | </pre> |
| 191 | </div> |
| 192 | </div> |
| 193 | </div> |
| 194 | <div class="navfooter"> |
| 195 | <hr /> |
| 196 | <table width="100%" summary="Navigation footer"> |
| 197 | <tr> |
| 198 | <td width="40%" align="left"><a accesskey="p" href="changelog_4_8.html">Prev</a> </td> |
| 199 | <td width="20%" align="center"> </td> |
| 200 | <td width="40%" align="right"> <a accesskey="n" href="test_faq.html">Next</a></td> |
| 201 | </tr> |
| 202 | <tr> |
| 203 | <td width="40%" align="left" valign="top">Berkeley DB 4.8.28 Change Log </td> |
| 204 | <td width="20%" align="center"> |
| 205 | <a accesskey="h" href="index.html">Home</a> |
| 206 | </td> |
| 207 | <td width="40%" align="right" valign="top"> Test suite FAQ</td> |
| 208 | </tr> |
| 209 | </table> |
| 210 | </div> |
| 211 | </body> |
| 212 | </html> |