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

[testbug] Introduce Platform.sharedLibraryPathVariableName() and adapt all tests.

XMLWordPrintable

    • b04

        Different operating systems use different names for the environment variable that contains the search paths for native libraries. This path is used in a row of tests. A switch over all OSes is needed to find out the proper variable name in each test using it.

        This change introduces a central function
        Platform.sharedLibraryPathVariableName()
        that returns "LD_LIBRARY_PATH", "DYLD_LIBRARY_PATH", "PATH" or "LIBPATH" depending on the current OS.

        This change also adapts all usages of these variables in the tests to call this functions.

        A similar pattern appears in a lot of shell tests. This change does not fix the
        issue with those tests. This issue will be fixed once the tests are converted to Java.

        The change also replaces local checking for path separators by File.pathSeparator in jdk/com/sun/jdi/PrivateTransportTest.java.

              goetz Goetz Lindenmaier
              goetz Goetz Lindenmaier
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: