Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8347300

Don't exclude the "PATH" var from the environment when running app launchers in jpackage tests

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 25
    • 17, 25
    • tools
    • b06
    • generic
    • generic

      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 look up for dll-s in the PATH.

      A few jpackage tests run app launchers without removing the PATH var from the environment - WinChildProcessTest, AppLauncherEnvTest. They prove that removing the "PATH" var from the environment when testing app launchers is redundant.

      It still would be good to have API to remove variables from the environment when running external processes in jpackage tests. Update jdk.jpackage.test.Executor class (See [1]) to make it support removal of any var from the environment.

      Add support for boolean property 'jpackage.test.clear-app-launcher-java-env-vars' in jpackage tests. If set to true, "JAVA_TOOL_OPTIONS" and "_JAVA_OPTIONS" will be removed from the environment when running app launchers. This is needed to support local jpackage test configurations when JRE used to run jpackage tests relies on these variables, but they should not be applied to runtimes of app launchers.

      [1] https://github.com/openjdk/jdk/blob/2e00816ac30373df28a29dc938f7ce5489a3edfc/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/Executor.java

            asemenyuk Alexey Semenyuk
            asemenyuk Alexey Semenyuk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: