|
![]() ![]() ![]() |
These notes are for building the test suite on Win32 platforms. Most of the issues with the test suite on Win* are due to the operating systems dependencies in the test suite itself, expressed as file names, process management or CR/NL issues.
The test suite was originally developed and maintained on UNIX platforms, so these dependencies crop up on every release as new tests are added or modified for changes to Berkeley DB. That much said, every release we work hard to fix or work around issues that cause failures on Win/NT, but we are not yet finished with Win/95.
Please read through all the instructions before you begin to ensure that you have everything you need.
First, you need a set of UNIX-like utilities to assist Tcl with various operations. Currently we require: cmp, cp, kill, mkdir, mv, rm, sed, sleep, sort and tr. We have tested using the MKS/NT package, which mostly works. (If you use this package, see MKS/NT notes below). The GNU utilities should work as well, but you may discover different issues. We assume that these tools are in c:/tools, but this can be changed by editing the include.tcl file. Note that a "PERL5" variable is referenced by the include.tcl file. It is not necessary to run the test suite, and may be left unset.
Second, you will need to get the Tcl toolkit. The test suite requires at least Tcl 8.1, and that is what we currently test with on our Win* platforms. These notes assume Tcl is installed as d:/tcl, but you can change this if you wish. We have found that we needed to rebuild a debug version of Tcl from the sources to get correct behavior. This is because the set of DLLs linked into the Tcl executable must match the corresponding set of DLLs used by Berkeley DB.
You will also need sufficient main memory and disk. Disk is not terribly demanding, something less than 100 MB should be sufficient. For memory, the more the better -- 32MB is too small, but 64MB should be fine.
To build, perform the following steps. Note that steps #1, #4 and #5 are part of the normal build process for building Berkeley DB.
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/tclsh81d.exe
In addition you may need to change the path names of your UNIX-like utilities. These path names are set as lines like:
set CP c:/tools/cp.exe
Then, in a shell of your choice enter the following commands:
You should get a "%" prompt.
You should get a "%" prompt with no errors.
You are now ready to run tests in the test suite.
We will not release Berkeley DB with a FAIL message on Windows/NT, unless we are sure it is a problem with the test suite, and not the Berkeley DB code. However, there may still be error messages or warnings from various tests.
Known places where the tests typically give error messages:
..../TESTDIR: expected 0, got memp_unlink: Error 0
Often this kind of error occurs when one test has the database or environment open at the time an unlink is done. Removing a file is always legal in UNIX, but on Win*, a file cannot generally be removed if a process has it open. We are slowly chasing these problems down.
If you are using MKS/NT, you will find that there are a few tests that do not work out of the box, because there are some tests that produce input/output data that has long lines (more than 2048 characters). These lines are longer than the MKS default limit. The "sort" command breaks on these long lines.
The "sort" problem can be fixed by changing the maximum record length on the command line. To do this, add a "-z16384" option to the sort command. You can change the .tcl script or hack up a replacement for sort.exe that calls the real sort.exe with the extra options. Unfortunately changing include.tcl to have the extra option does not work.
The test suite also needs its own "kill" program that accepts the same options as the UNIX kill. We provide the source for a simple kill program in build_win32/killfix.cpp. This should be compiled and installed as c:/tools/kill.exe.
![]() ![]() ![]() |