[
https://issues.apache.org/jira/browse/DERBY-7110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17401798#comment-17401798
]
Richard N. Hillegas commented on DERBY-7110:
--------------------------------------------
The following links may be helpful:
o https://db.apache.org/derby/derby_comm.html
o https://cwiki.apache.org/confluence/display/DERBY/DerbyJUnitTesting
o https://cwiki.apache.org/confluence/display/DERBY/DerbyTopLevelJunitTests
o https://cwiki.apache.org/confluence/display/DERBY/DerbyTesting
It looks like your JUnit tests are running, but you have some errors to
investigate. The testing target should have created a subdirectory containing
an xml-formatted report on what went wrong. Figuring out what went wrong with
that test run is probably the best thing to do.
Just in case you can't get the ant targets to work for you, here is the script
I use when I run tests against the classpath. The setupJarTests script
constructs a CLASSPATH from the jars in jars/sane and the jars in tools/java.
{noformat}
#!/bin/bash
cd $SW/derbyTests
export derbyallTestDir=TESTS_DERBYALL
export junitTestDir=TESTS_JUNIT
rm -rf $derbyallTestDir
rm -rf $junitTestDir
date
cd $SW/derbyTests
. setupJarTests
java -Dverbose=true org.apache.derbyTesting.functionTests.harness.RunSuite
derbyall
cd $SW/derbyTests
mv testRun $derbyallTestDir
cd $SW/derbyTests
. setupJarTests
java $vm_options -Xmx512m
-DderbyTesting.oldReleasePath=/Users/rh161140/derby/upgradeReleases
-DderbyTesting.oldVersionsPath=/Users/rh161140/derby/upgradeReleases/startingPoints
-Dderby.system.durability=test -Dderby.tests.ThreadsMinutes=2x1
junit.textui.TestRunner org.apache.derbyTesting.functionTests.suites.All
cd $SW/derbyTests
grep "tests passed" $derbyallTestDir/derbyall_report.txt
grep "tests failed" $derbyallTestDir/derbyall_report.txt
date
say "The tests are done."
{noformat}
Here is the script I use when I run tests against the modulepath:
{noformat}
#!/bin/bash
cd $SW/derbyTests
export derbyallTestDir=TESTS_DERBYALL
export junitTestDir=TESTS_JUNIT
oldReleaseDirectoryFlag=-DderbyTesting.oldReleasePath=/Users/rh161140/derby/upgradeReleases
startingPointsFlag=-DderbyTesting.oldVersionsPath=/Users/rhillegas/derby/mainline/startingPoints
rm -rf $derbyallTestDir
rm -rf $junitTestDir
TEST_DIR=testRun
OLD_TEST_RUN=oldTestRun
date
. setDerbyTestModulePath
cd $SW/derbyTests
mkdir $TEST_DIR
cd $TEST_DIR
#echo $MODULEPATH
java -Dverbose=true \
-p $MODULEPATH \
--add-modules org.apache.derby.tests,junit \
-m
org.apache.derby.tests/org.apache.derbyTesting.functionTests.harness.RunSuite \
derbyall
cd $SW/derbyTests
mv $TEST_DIR $derbyallTestDir
. setDerbyTestModulePath
cd $SW/derbyTests
mkdir $TEST_DIR
cd $TEST_DIR
java -Xmx1024m \
$debugFlag \
$oldReleaseDirectoryFlag $startingPointsFlag \
-p $MODULEPATH \
--add-modules org.apache.derby.tests \
-m junit/junit.textui.TestRunner \
org.apache.derbyTesting.functionTests.suites.All
#java $vm_options -Xmx512m
-DderbyTesting.oldReleasePath=/Users/rh161140/derby/upgradeReleases
-DderbyTesting.oldVersionsPath=/Users/rh161140/derby/upgradeReleases/startingPoints
-Dderby.system.durability=test -Dderby.tests.ThreadsMinutes=2x1
junit.textui.TestRunner org.apache.derbyTesting.functionTests.suites.All
#
cd $SW/derbyTests
grep "tests passed" $derbyallTestDir/derbyall_report.txt
grep "tests failed" $derbyallTestDir/derbyall_report.txt
date
say "The tests are done."
{noformat}
That script relies on another script (setDerbyTestModulePath) which sets up the
MODULEPATH:
{noformat}
#!/bin/bash
sanity=sane
HOME_DIR=/Users/rhillegas
CURRENT_BRANCH=$HOME_DIR/derby/$SANDBOX/$BRANCH
DERBY_JAR_DIR=$CURRENT_BRANCH/tools/java
BUILT_JAR_DIR=$CURRENT_BRANCH/jars/$sanity
#DB2JCC_DIR=$HOME_DIR/sw/db2jcc/lib
for jarFile in $DERBY_JAR_DIR/*.jar
do
if [ $jarFile != $DERBY_JAR_DIR/javacc.jar ]; then
if [ -z $MODULEPATH ]; then
MODULEPATH=$jarFile
else
MODULEPATH=$MODULEPATH:$jarFile
fi
fi
done
for jarFile in $BUILT_JAR_DIR/*.jar
do
export MODULEPATH=$MODULEPATH:$jarFile
done
export CLASSPATH=
#echo $MODULEPATH
{noformat}
> Make it possible to build and test Derby cleanly with OpenJDK 17
> ----------------------------------------------------------------
>
> Key: DERBY-7110
> URL: https://issues.apache.org/jira/browse/DERBY-7110
> Project: Derby
> Issue Type: Task
> Components: Build tools
> Affects Versions: 10.16.0.0
> Reporter: Richard N. Hillegas
> Assignee: Richard N. Hillegas
> Priority: Major
> Attachments: derby-7110-01-aa-removeAngleBrackets.diff,
> derby-7110-02-aa-suppressWarnings.diff,
> derby-7110-03-aa-forkAntJavaTask.diff, derby-7110-03-ab-forkAntJavaTask.diff
>
>
> Releases of Open JDK 17 can be found at https://jdk.java.net/17/. We should
> adjust Derby as necessary so that it builds cleanly (including javadoc) and
> tests cleanly with this version of the platform.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)