Skip to content

Commit

Permalink
7903683: Document how to run individual self-tests
Browse files Browse the repository at this point in the history
Reviewed-by: jpai, jjg
  • Loading branch information
Ludvig Janiuk authored and jonathan-gibbons committed Mar 27, 2024
1 parent bdd91d3 commit d2c9cb0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion doc/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ of the `legal` directory in the generated image.
## Running `jtreg` Self-Tests

The tests can be invoked with individual make targets, or collectively via the
`test` target.
`test` target. Individual make targets for self-tests are explained
[here](../test/README.md#makefiles). For example, the
[ControlTest.gmk](../test/ctrl/ControlTest.gmk) makefile has a `$(BUILDTESTDIR)/ControlTest.ok`
target which runs one of the self-tests. In order to run that individual test,
use a command such as the following:

```shell
bash build/make.sh $(pwd)/build/test/ControlTest.ok
```

Some tests depend on specific versions of JDK being available, specified
by the following variables: `JDK8HOME`, `JDK9HOME`, `JDK14HOME`, `JDK18HOME`.
Expand Down
4 changes: 2 additions & 2 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ needed to test jtreg.

At the top level, all tests have an associated `make` target, which by convention
is of the form _testName_`.ok`. This corresponds to the path for a "marker file",
which is updated when the thest has been executed successfully.
which is updated when the test has been executed successfully.

With only a few exceptions, the files for each test are grouped in a subdirectory
of the main `test` directory. Each such directory contains a `*.gmk` file defining
Expand Down Expand Up @@ -53,7 +53,7 @@ the test target can be conditionally included in `TESTS.jtreg` using `ifdef` or
mechanisms.

Any individual test can be run in isolation by running `make` with the full
absolute pathname for the marker file (that is, the `*.ok` target fort the test)
absolute pathname for the marker file (that is, the `*.ok` target for the test)
as the target to be built.

## Tests
Expand Down

0 comments on commit d2c9cb0

Please sign in to comment.