8174202: jtreg AOT tests should not assume library extension of .so
authoriignatyev
Fri, 11 Aug 2017 16:06:55 -0700
changeset 46244 b5e5ec91094d
parent 46243 eefffdb26909
child 46246 1109cf6be193
8174202: jtreg AOT tests should not assume library extension of .so Reviewed-by: kvn
test/lib/jdk/test/lib/Platform.java
--- a/test/lib/jdk/test/lib/Platform.java	Thu Aug 10 11:11:52 2017 -0400
+++ b/test/lib/jdk/test/lib/Platform.java	Fri Aug 11 16:06:55 2017 -0700
@@ -274,4 +274,18 @@
                       .matcher(osArch)
                       .matches();
     }
+
+    /**
+     * Returns file extension of shared library, e.g. "so" on linux, "dll" on windows.
+     * @return file extension
+     */
+    public static String sharedLibraryExt() {
+        if (isWindows()) {
+            return "dll";
+        } else if (isOSX()) {
+            return "dylib";
+        } else {
+            return "so";
+        }
+    }
 }