3
Use the scripts testall or testone to run all, or just one of the Java
4
tests. You must be in this directory to run them. For example,
6
$ export LD_LIBRARY_PATH=/usr/local/Berkeley3.3/lib
7
$ ./testone TestAppendRecno
10
The scripts will use javac and java in your path. Set environment
11
variables $JAVAC and $JAVA to override this. It will also and honor
12
any $CLASSPATH that is already set, prepending ../../../../classes to
13
it, which is where the test .class files are put, and where the DB
14
.class files can normally be found after a build on Unix and Windows.
15
If none of these variables are set, everything will probably work
16
with whatever java/javac is in your path.
18
To run successfully, you will probably need to set $LD_LIBRARY_PATH
19
to be the directory containing libdb_java-X.Y.so
21
As an alternative, use the --prefix=<DIR> option, a la configure
22
to set the top of the BerkeleyDB install directory. This forces
23
the proper options to be added to $LD_LIBRARY_PATH.
26
$ ./testone --prefix=/usr/include/BerkeleyDB TestAppendRecno
27
$ ./testall --prefix=/usr/include/BerkeleyDB
29
The test framework is pretty simple. Any <name>.java file in this
30
directory that is not mentioned in the 'ignore' file represents a
31
test. If the test is not compiled successfully, the compiler output
32
is left in <name>.compileout . Otherwise, the java program is run in
33
a clean subdirectory using as input <name>.testin, or if that doesn't
34
exist, /dev/null. Output and error from the test run are put into
35
<name>.out, <name>.err . If <name>.testout, <name>.testerr exist,
36
they are used as reference files and any differences are reported.
37
If either of the reference files does not exist, /dev/null is used.