8174202: jtreg AOT tests should not assume library extension of .so
Reviewed-by: kvn
--- 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";
+ }
+ }
}