1 % Testing OpenJDK |
1 % Testing the JDK |
2 |
2 |
3 ## Using the run-test framework |
3 ## Using the run-test framework |
4 |
4 |
5 This new way of running tests is developer-centric. It assumes that you have |
5 This new way of running tests is developer-centric. It assumes that you have |
6 built a jdk locally and want to test it. Running common test targets is simple, |
6 built a JDK locally and want to test it. Running common test targets is simple, |
7 and more complex ad-hoc combination of tests is possible. The user interface is |
7 and more complex ad-hoc combination of tests is possible. The user interface is |
8 forgiving, and clearly report errors it cannot resolve. |
8 forgiving, and clearly report errors it cannot resolve. |
9 |
9 |
10 The main target "run-test" uses the jdk-image as the tested product. There is |
10 The main target "run-test" uses the jdk-image as the tested product. There is |
11 also an alternate target "exploded-run-test" that uses the exploded image |
11 also an alternate target "exploded-run-test" that uses the exploded image |
59 |
59 |
60 JTReg test groups can be specified either without a test root, e.g. `:tier1` |
60 JTReg test groups can be specified either without a test root, e.g. `:tier1` |
61 (or `tier1`, the initial colon is optional), or with, e.g. `hotspot:tier1`, |
61 (or `tier1`, the initial colon is optional), or with, e.g. `hotspot:tier1`, |
62 `test/jdk:jdk_util` or `$(TOPDIR)/test/hotspot/jtreg:hotspot_all`. The test |
62 `test/jdk:jdk_util` or `$(TOPDIR)/test/hotspot/jtreg:hotspot_all`. The test |
63 root can be specified either as an absolute path, or a path relative to the |
63 root can be specified either as an absolute path, or a path relative to the |
64 OpenJDK top directory, or the `test` directory. For simplicity, the hotspot |
64 JDK top directory, or the `test` directory. For simplicity, the hotspot |
65 JTReg test root, which really is `hotspot/jtreg` can be abbreviated as |
65 JTReg test root, which really is `hotspot/jtreg` can be abbreviated as |
66 just `hotspot`. |
66 just `hotspot`. |
67 |
67 |
68 When specified without a test root, all matching groups from all test roots |
68 When specified without a test root, all matching groups from all test roots |
69 will be added. Otherwise, only the group from the specified test root will be |
69 will be added. Otherwise, only the group from the specified test root will be |
71 |
71 |
72 Individual JTReg tests or directories containing JTReg tests can also be |
72 Individual JTReg tests or directories containing JTReg tests can also be |
73 specified, like `test/hotspot/jtreg/native_sanity/JniVersion.java` or |
73 specified, like `test/hotspot/jtreg/native_sanity/JniVersion.java` or |
74 `hotspot/jtreg/native_sanity`. Just like for test root selection, you can |
74 `hotspot/jtreg/native_sanity`. Just like for test root selection, you can |
75 either specify an absolute path (which can even point to JTReg tests outside |
75 either specify an absolute path (which can even point to JTReg tests outside |
76 the source tree), or a path relative to either the OpenJDK top directory or the |
76 the source tree), or a path relative to either the JDK top directory or the |
77 `test` directory. `hotspot` can be used as an alias for `hotspot/jtreg` here as |
77 `test` directory. `hotspot` can be used as an alias for `hotspot/jtreg` here as |
78 well. |
78 well. |
79 |
79 |
80 As long as the test groups or test paths can be uniquely resolved, you do not |
80 As long as the test groups or test paths can be uniquely resolved, you do not |
81 need to enter the `jtreg:` prefix. If this is not possible, or if you want to |
81 need to enter the `jtreg:` prefix. If this is not possible, or if you want to |