jdk/test/sun/security/pkcs11/PKCS11Test.java
changeset 32138 23830562d3d1
parent 31270 e6470b24700d
child 32635 d7e4ba3c2e0d
--- a/jdk/test/sun/security/pkcs11/PKCS11Test.java	Tue Aug 11 12:33:25 2015 -0700
+++ b/jdk/test/sun/security/pkcs11/PKCS11Test.java	Wed Aug 12 14:38:09 2015 +0100
@@ -630,4 +630,18 @@
         return algorithms;
     }
 
+    /**
+     * Get the identifier for the operating system distribution
+     */
+    public String getDistro() {
+
+        try (BufferedReader in =
+            new BufferedReader(new InputStreamReader(
+                Runtime.getRuntime().exec("uname -v").getInputStream()))) {
+
+            return in.readLine();
+        } catch (Exception e) {
+            return "";
+        }
+    }
 }