RFR: 8347300: Don't exclude the "PATH" var from the environment when running app launchers in jpackage tests
Alexey Semenyuk
asemenyuk at openjdk.org
Wed Jan 8 22:34:47 UTC 2025
- Don't remove the `PATH` variable from the environment when running app launchers in jpackage tests;
- Replace `Executor.setRemovePathEnvVar()` with `Executor.removeEnvVar()` to support removal of any variable from the environment of a child process executed in jpackage tests;
- Add support of a new boolean property `jpackage.test.clear-app-launcher-java-env-vars` in jpackage tests. If it is set to "true", the `JAVA_TOOL_OPTIONS` and `_JAVA_OPTIONS` variables will be removed from the environment of app launchers executed in jpackage tests. It is handy in local testing using jpackage test runner instead of the jtreg.
The first change is unrelated to other changes. They are bundled together as they apply to the same source code.
-------------
Commit messages:
- - Don't exclude the "PATH" var from the environment when running app launchers in jpackage tests. Removal of the "PATH" var was a part of the JDK-8254920 fix. But this removal is redundant as JDK-8254920 was fixed by making jpackage app launcher not to look up for dll-s in the PATH. There are a few jpackage tests running app launchers without removing the PATH var from the environment - WinChildProcessTest, AppLauncherEnvTest. They proves that removal of the "PATH" var from the environment when testing app launchers is redundant.
Changes: https://git.openjdk.org/jdk/pull/22983/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22983&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8347300
Stats: 34 lines in 4 files changed: 19 ins; 3 del; 12 mod
Patch: https://git.openjdk.org/jdk/pull/22983.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22983/head:pull/22983
PR: https://git.openjdk.org/jdk/pull/22983
More information about the core-libs-dev
mailing list