changeset 2781:e2a74fa085ea

8174202: jtreg AOT tests should not assume library extension of .so Reviewed-by: kvn
author iignatyev
date Fri, 11 Aug 2017 16:06:55 -0700
parents 730f776ffa59
children 3e449870be57
files test/lib/jdk/test/lib/Platform.java
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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";
+        }
+    }
 }