Running tests


This page explains the steps used to obtain test results displayed in the results page.

1. Setup

1. Bring over tests included in OpenJDK
$ git clone -b jdk-24+BUILD_NO https://orahub.oci.oraclecorp.com/jpg-mirrors/jdk-open.git jdklocal

2. Install OpenJDK 24 Early Access bundle. Download it from https://jdk.java.net/24/

3. Build jtreg harness. Instruction is at https://openjdk.java.net/jtreg/build.html

2. Running tests

The tests present in test/jdk, test/langtools and test/hotspot need to be run separately for now. While jtreg manual explains different way to run the tests, here is one example to show how the tests were run to produce the results.

2.1 Running tests in test/jdk
$ jtreg -dir:{openjdk source top directory}/test/jdk -verbose:summary -nativepath:{location of the jdk test native library} -exclude:{openjdk source top directory}/test/jdk/ProblemList.txt -conc:2 -Xmx512m -a -ignore:quiet -timeoutFactor:5 -agentvm -testjdk:{location of the test jdk} :jdk_stable

{location of the jdk test native library}: This has to be generated at build time of the test jdk by invoking "make test-image". These libraries are located in the build directory under "images/test/jdk/jtreg/native/"

2.2 Running tests in test/langtools
$ jtreg -dir:{openjdk source top directory}/test/langtools -verbose:summary -exclude:{openjdk source top directory}/test/langtools/ProblemList.txt -conc:auto -a -ignore:quiet -timeoutFactor:5 -agentvm -testjdk:{location of the test jdk} `echo jdk tools lib`

2.3 Running tests in test/hotspot
$ jtreg -dir:{openjdk source top directory}/test/hotspot/jtreg -verbose:summary -nativepath:{location of the hotspot test native library} -exclude:{openjdk source top directory}/test/hotspot/jtreg/ProblemList.txt -conc:auto -a -ignore:quiet -timeoutFactor:5 -agentvm -testjdk:{location of the test jdk} applications/ctw/modules :hotspot_all_no_apps

{location of the hotspot test native library}: This has to be generated at build time of the test jdk by invoking "make test-image". These libraries are located in the build directory under "images/test/hotspot/jtreg/native/"