forked from eclipse-openj9/openj9
-
Notifications
You must be signed in to change notification settings - Fork 1
Quick guide on running OpenJDK tests for testing OpenJ9
Nazim Bhuiyan edited this page Nov 7, 2018
·
4 revisions
Assuming you just built OpenJDK with OpenJ9...
Ensure you have the following prerequisites: source
- ant 1.7.1 or above with ant-contrib.jar
- make 3.81 or above (recommend make 4.1 or above on windows)
- perl 5.10.1 or above with JSON and Text::CSV module installed (on Ubuntu 18.04:
apt-get install perl libjson-perl libtext-csv-perl
) - curl 7.20.0 or above (needs -J/--remote-header-name support)
- Clone the test repo somewhere:
git clone https://github.com/AdoptOpenJDK/openjdk-tests.git
cd openjdk-tests
-
./get.sh --testdir $PWD --platform x64_linux --jdk_impl openj9
- Note: Other valid platform options:
x64_linux
|x64_mac
|s390x_linux
|ppc64le_linux
|aarch64_linux
|ppc64_aix
- Note: Other valid platform options:
cd TestConfig
- Set necessary environment variables (assuming your OpenJ9-JDK repo was cloned in your home directory, and you are using JDK9):
export JAVA_BIN=~/openj9-openjdk-jdk9/build/linux-x86_64-normal-server-release/images/jdk/bin
export JDK_VERSION=9
JDK_IMPL=openj9
-
export SPEC=linux_x86-64_cmprssptrs
(default SPEC for x86-64 Linux openj9 builds) - optional:
export BUILD_LIST=functional
to restrict to functional test group only. By default, all test groups are enabled. Other options includesystem
,openjdk
,external
,perf
,jck
. You can specify multiple options using commas (eg BUILD_LIST=functional,system,...)
make -f run_configure.mk
make compile
- Now you are ready to execute the tests. There are 2 levels of tests:
sanity
andextended
. Every test target needs to be prepended with an underscore. Here are some ways of executing the tests:- To run all sanity level tests in all enabled groups:
make _sanity
- To run all sanity/extended level tests in
functional
group:make _functional
- To run all extended level tests in
functional
group:make _extended.functional
- To run a specific test:
make _<test_name>
- To run tests in a specific directory:
make -C ../functional/JIT_Test/ -f autoGen.mk _sanity
- To run all sanity level tests in all enabled groups:
- If any test targets fail,
failed.mk
will be generated. This gives you the opportunity to try and fix the issue in OpenJ9, rebuilding the images, and rerunning the failing tests usingmake _failed
.