Berkeley DB Reference Guide:
Building Berkeley DB for Windows systems

PrevRefNext

Running the test suite under Windows

To build the test suite on Win32 platforms you will need Tcl, built from sources. You can download a copy of Tcl from the Scriptics Corporation web site. Before building Tcl, you will need to modify its makefile to make sure you are building a debug version, including thread support. This is because the set of DLLs linked into the Tcl executable must match the corresponding set of DLLs used by Berkeley DB. The test suite requires at least Tcl 8.1, but we found we needed to make local modifications to that version to make it run correctly, and so we recommend you use a newer version. These notes assume Tcl is installed as d:/tcl, but you can change that if you wish. If you run using a different version of Tcl than the one currently being used by Sleepycat Software, you will need to change the name of the Tcl library used in the build (e.g., tcl83d.lib) to the appropriate name. See Projects->Settings->Link in the db_tcl subproject.

You will also need sufficient main memory and disk. Something around 100MB of disk will be sufficient. For memory, 32MB is too small, we recommend at least 64MB.

Building the software needed by the tests

To build, perform the following steps. Note that steps #1, #4 and #5 are part of the normal build process for building Berkeley DB.

  1. Open the build_win32/Berkeley_DB.dsw workspace.

  2. Add the pathname for the Tcl include subdirectory to your include path. To do this, under the "Tools" menu item, select "Options". In the dialog, select the "Directories" tab, and choose directories for "Include Files". Add d:/tcl/include (or whatever directory contains tcl.h in your distribution) to the list.

  3. Add the pathname for the Tcl library subdirectory to your library path. To do this, under the "Tools" menu item, select "Options". In the dialog, select the "Directories" tab, and choose directories for "Library Files". Add d:/tcl/lib (or whatever directory contains tcl83d.lib in your distribution) to the list.

  4. Set the active configuration to db_test -- Debug. To set an active configuration, under the "Build" menu item in the IDE, select "Set Active Configuration". Then choose "db_test -- Debug".

  5. Build. The IDE menu for this is called "build dbkill.exe", even though dbkill is just one of the things that is built. This step builds the base Berkeley DB .dll, tcl support, and various tools that are needed by the test suite.

Running the test suite under Windows

Before running the tests for the first time, you must edit the file include.tcl in your build directory and change the line that reads:

set tclsh_path SET_YOUR_TCLSH_PATH

You will want to use the location of the tclsh program. For example, if Tcl is installed as d:/tcl, this line should be:

set tclsh_path d:/tcl/bin/tclsh83d.exe

Then, in a shell of your choice enter the following commands:

  1. cd build_win32

  2. run d:/tcl/bin/tclsh83d.exe, or the equivalent name of the Tcl shell for your distribution.

    You should get a "%" prompt.

  3. % source ../test/test.tcl.

    You should get a "%" prompt with no errors.

You are now ready to run tests in the test suite.

PrevRefNext

Copyright Sleepycat Software