Path: blob/master/doc/compiler/jitserver/Testing.md
6000 views
Testing JITServer
There are currently 2 supported test procedures. Select the one that best suits your neeeds.
Testing locally. Choose this if you have build & test dependencies set up.
Testing in Docker. Choose this if you don't want to deal with build & test dependency setups.
LOCAL
These are the steps to run the tests on your machine.
Compile a build of openj9 from scratch. (Optional: compile a debug build if you need it. To do this pass the flag
--with-debug-level=slowdebug
toconfigure
. Please note that debug build is much slower and the tests will take very long time to finish).Install prerequisites
An example of how to install the prerequisites can be found here. Make sure that JAVA_HOME and JAVA_BIN are set (E.g.
export JAVA_HOME=/root/openj9-openjdk-jdk11/build/linux-x86_64-normal-server-release/images/jdk
andexport JAVA_BIN=/root/openj9-openjdk-jdk11/build/linux-x86_64-normal-server-release/images/jdk/bin
). Basically you want to test on the jdk you build, so point the environment variable to your personal build of jdk.Compile the tests (only need to compile once):
Either
TEST_FLAGS
orEXTRA_OPTIONS
can be used to run tests with JITServer. The following will launch both the server and the client during the test.The following sets up only the client side which requires manually starting the server before running the test.
NOTE: It's important to put spaces before and after
-XX:+UseJITServer
, otherwise some tests will not run properly.Set the path to native test libraries, otherwise some tests will not run properly
Compile the test
NOTE: to compile and run tests, ant-contrib.jar is needed, and on some systems just installing ant will not install ant-contrib. On Ubuntu, the easiest way to get it is to run:
Run the tests!
Manually start the server if
JITAAS
TEST_FLAG is not used.To rerun the failed tests, run
which tests will be rerun can be modified in
failedtargets.mk
.or, if you want to run an individual test, run
For more advanced testing features, refer to this guide.