Integrated: 8350011: Convert jpackage test lib tests in JUnit format

Alexey Semenyuk asemenyuk at openjdk.org
Fri Feb 14 13:15:19 UTC 2025


On Thu, 13 Feb 2025 14:37:50 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

> Convert jpackage test library tests in JUnit format. This simplifies running them in IDE.
> 
> Added [JUnitAdapter](https://github.com/openjdk/jdk/pull/23615/files#diff-8719943fb769c04daf413427dc812650763f588cbd0ef6b50cccd11260353c0a) class to simplify running jpackage test-lib tests with JUnit. `JUnitAdapter.runJPackageTests()` will run the jpackage test-lib test as a JUnit test. The test work directory will be created in a temporary directory supplied by JUnit.
> 
> All jpackage test-lib test classes changed to extend `JUnitAdapter`. As they didn't have a default ctor, they were converted accordingly.
> 
> Important: Set `test.src` system property if run these tests outside of jtreg (from IDE) or ad-hoc replace `@@openJdkDir@@` token with the path to local OpenJDK repo at [JUnitAdapter.java:46](https://github.com/openjdk/jdk/pull/23615/files#diff-8719943fb769c04daf413427dc812650763f588cbd0ef6b50cccd11260353c0a).

This pull request has now been integrated.

Changeset: db42a48d
Author:    Alexey Semenyuk <asemenyuk at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/db42a48dc5d49783545757bd34aeead851f9288e
Stats:     327 lines in 10 files changed: 141 ins; 127 del; 59 mod

8350011: Convert jpackage test lib tests in JUnit format

Reviewed-by: almatvee

-------------

PR: https://git.openjdk.org/jdk/pull/23615


More information about the core-libs-dev mailing list