diff --git a/.hgtags b/.hgtags index 8c42438e208..9014cdb9085 100644 --- a/.hgtags +++ b/.hgtags @@ -522,3 +522,5 @@ f8626bcc169813a4b2a15880386b952719d1d6d1 jdk-12+15 eefa65e142af305923d2adcd596fab9c639723a1 jdk-12+17 e38473506688e0995e701fc7f77d5a91b438ef93 jdk-12+18 dc1f9dec2018a37fedba47d8a2aedef99faaec64 jdk-12+19 +40098289d5804c3b5e7074bc75501a81e70d9b0d jdk-12+20 +f8fb0c86f2b3d24294d39c5685a628e1beb14ba7 jdk-12+21 diff --git a/doc/building.html b/doc/building.html index fbb13f9626c..5df2e305676 100644 --- a/doc/building.html +++ b/doc/building.html @@ -69,6 +69,7 @@
  • Running Tests
  • Cross-compiling
  • Hints and Suggestions for Advanced Users @@ -44,9 +46,11 @@ $ make test TEST=jdk_lang $ make test-only TEST="gtest:LogTagSet gtest:LogTagSetDescriptions" GTEST="REPEAT=-1" $ make test TEST="hotspot:hotspot_gc" JTREG="JOBS=1;TIMEOUT=8;VM_OPTIONS=-XshowSettings -Xlog:gc+ref=debug" $ make test TEST="jtreg:test/hotspot:hotspot_gc test/hotspot/jtreg/native_sanity/JniVersion.java" +$ make test TEST="micro:java.lang.reflect" MICRO="FORK=1;WARMUP_ITER=2" $ make exploded-test TEST=tier2

    Configuration

    To be able to run JTReg tests, configure needs to know where to find the JTReg test framework. If it is not picked up automatically by configure, use the --with-jtreg=<path to jtreg home> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing lib/jtreg.jar etc. (An alternative is to set the JT_HOME environment variable to point to the JTReg home before running configure.)

    +

    To be able to run microbenchmarks, configure needs to know where to find the JMH dependency. Use --with-jmh=<path to JMH jars> to point to a directory containing the core JMH and transitive dependencies. The recommended dependencies can be retrieved by running sh make/devkit/createJMHBundle.sh, after which --with-jmh=build/jmh/jars should work.

    Test selection

    All functionality is available using the test make target. In this use case, the test or tests to be executed is controlled using the TEST variable. To speed up subsequent test runs with no source code changes, test-only can be used instead, which do not depend on the source and test image build.

    For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that make test-tier1 is equivalent to make test TEST="tier1", but the latter is more tab-completion friendly. For more complex test runs, the test TEST="x" solution needs to be used.

    @@ -61,6 +65,9 @@ $ make exploded-test TEST=tier2

    Since the Hotspot Gtest suite is so quick, the default is to run all tests. This is specified by just gtest, or as a fully qualified test descriptor gtest:all.

    If you want, you can single out an individual test or a group of tests, for instance gtest:LogDecorations or gtest:LogDecorations.level_test_vm. This can be particularly useful if you want to run a shaky test repeatedly.

    For Gtest, there is a separate test suite for each JVM variant. The JVM variant is defined by adding /<variant> to the test descriptor, e.g. gtest:Log/client. If you specify no variant, gtest will run once for each JVM variant present (e.g. server, client). So if you only have the server JVM present, then gtest:all will be equivalent to gtest:all/server.

    +

    Microbenchmarks

    +

    Which microbenchmarks to run is selected using a regular expression following the micro: test descriptor, e.g., micro:java.lang.reflect. This delegates the test selection to JMH, meaning package name, class name and even benchmark method names can be used to select tests.

    +

    Using special characters like | in the regular expression is possible, but needs to be escaped multiple times: micro:ArrayCopy\\\\\|reflect.

    Special tests

    A handful of odd tests that are not covered by any other testing framework are accessible using the special: test descriptor. Currently, this includes failure-handler and make.