| 1 |
# $Id$ |
| 2 |
|
| 3 |
Use the scripts testall or testone to run all, or just one of the C++ |
| 4 |
tests. You must be in this directory to run them. For example, |
| 5 |
|
| 6 |
$ export LIBS="-L/usr/include/BerkeleyDB/lib" |
| 7 |
$ export CXXFLAGS="-I/usr/include/BerkeleyDB/include" |
| 8 |
$ export LD_LIBRARY_PATH="/usr/include/BerkeleyDB/lib" |
| 9 |
$ ./testone TestAppendRecno |
| 10 |
$ ./testall |
| 11 |
|
| 12 |
The scripts will use c++ in your path. Set environment variables $CXX |
| 13 |
to override this. It will also honor any $CXXFLAGS and $LIBS |
| 14 |
variables that are set, except that -c are silently removed from |
| 15 |
$CXXFLAGS (since we do the compilation in one step). |
| 16 |
|
| 17 |
To run successfully, you will probably need to set $LD_LIBRARY_PATH |
| 18 |
to be the directory containing libdb_cxx-X.Y.so |
| 19 |
|
| 20 |
As an alternative, use the --prefix=<DIR> option, a la configure |
| 21 |
to set the top of the BerkeleyDB install directory. This forces |
| 22 |
the proper options to be added to $LIBS, $CXXFLAGS $LD_LIBRARY_PATH. |
| 23 |
For example, |
| 24 |
|
| 25 |
$ ./testone --prefix=/usr/include/BerkeleyDB TestAppendRecno |
| 26 |
$ ./testall --prefix=/usr/include/BerkeleyDB |
| 27 |
|
| 28 |
The test framework is pretty simple. Any <name>.cpp file in this |
| 29 |
directory that is not mentioned in the 'ignore' file represents a |
| 30 |
test. If the test is not compiled successfully, the compiler output |
| 31 |
is left in <name>.compileout . Otherwise, the java program is run in |
| 32 |
a clean subdirectory using as input <name>.testin, or if that doesn't |
| 33 |
exist, /dev/null. Output and error from the test run are put into |
| 34 |
<name>.out, <name>.err . If <name>.testout, <name>.testerr exist, |
| 35 |
they are used as reference files and any differences are reported. |
| 36 |
If either of the reference files does not exist, /dev/null is used. |