Hi Bryan,
(1) The tests will create their own databases. That one you don't have
to worry about.
(2) I'm guessing your problem is that you don't have a properly
configured classpath.
(3) I'm enclosing the scripts which I use to run tests. You should
probably do a test run with just a single test to make sure that
everything's ok. Here's what my various scripts do:
setupClasspath - this script wires together the Derby class tree and the
jar files in trunk/tools/java
setupTests - this script deletes the old test run and invokes the
previous script
runtestsuite - this script invokes the previous script and then runs a
single test suite
runtests - this script invokes the previous script to run the full
derbyall master suite
runonetest - this script invokes setupTests, then runs a single test
If you put these scripts in some directory in your $PATH, you can do the
following:
# this runs derbyall
runtests
# run the bit.sql test from the lang suite
runonetest lang/bit.sql
Hope this helps,
-Rick
Bryan Pendleton wrote:
Hi all,
I'm still struggling, trying to get a configuration of
my system such that I can run 'derbyall' successfully.
Three questions:
1) java/testing/README.htm does not say anything about
creating a database; it just says to "cd into a directory
that does not have any colons or spaces in it." Do I
need to create a database for the tests to use? Or do they
all create their own databases? If I need to create a
database first, does it need to have any particular
configuration?
2) I'm seeing a bunch of diffs/failures that say "No
Suitable Driver". I'm wondering whether this means that
I don't have my db2jcc driver set up correctly. All I
did was to download the two jar files and put them in
my CLASSPATH before starting derbyall. Should that have
been sufficient? How can I confirm that I've got the
db2jcc driver configured correctly? What else might cause
me to get "No Suitable Driver"?
3) Running 'derbyall', then waiting 6 hours, then staring
at a giant pile of diffs is not really helping me very
much; is there a smaller simple test that I can run to
confirm my environment is set up correcly?
Thanks,
bryan
#! /usr/bin/bash
#
# Setup derby classpath
HOME_DIR=c:/cygwin/home/rh161140
CURRENT_BRANCH=$HOME_DIR/derby/$SANDBOX/$BRANCH
DERBY_JAR_DIR=$CURRENT_BRANCH/tools/java
DB2JCC_DIR=$HOME_DIR/sw/db2jcc/lib
CLASSPATH=$CURRENT_BRANCH/classes
for jarFile in $DERBY_JAR_DIR/*
do
export CLASSPATH=$CLASSPATH\;$jarFile
done
export
CLASSPATH=$CLASSPATH\;$DB2JCC_DIR/db2jcc.jar\;$DB2JCC_DIR/db2jcc_license_c.jar
#! /usr/bin/bash
#
# Setup for derby tests.
TEST_DIR=$1
OLD_TEST_RUN=oldTestRun
#
# Recreate directory for test output
#
date
echo Deleting old test run...
mv $TEST_DIR $OLD_TEST_RUN
rm -rf $OLD_TEST_RUN &
echo Old test run deleted.
date
mkdir $TEST_DIR
cd $TEST_DIR
. setupClasspath
#! /usr/bin/bash
#
# Run a suite of derby tests.
#
# $1 suite name. E.g.: xa
SUITE=$1
TEST_DIR=testRun
. setupTests $TEST_DIR
#
# Now run the tests.
#
java -Dverbose=true org.apache.derbyTesting.functionTests.harness.RunSuite
$SUITE
#! /usr/bin/bash
#
# Run derby tests.
runtestsuite derbyall
date
#! /usr/bin/bash
#
# Run a single derby test.
#
# $1 the test name. E.g.: lang/supersimple.sql
SINGLE_TEST=$1
TEST_DIR=testRun
. setupTests $TEST_DIR
#
# Now run the tests.
#
java org.apache.derbyTesting.functionTests.harness.RunTest $SINGLE_TEST
#java -Dframework=DerbyNet
org.apache.derbyTesting.functionTests.harness.RunTest $SINGLE_TEST