changeset 12055:494d27357b8c jdk8u121-b09

8166432: Bad 8u112 merge of sun/security/tools/jarsigner/warnings/Test.java Reviewed-by: vinnie
author coffeys
date Mon, 14 Nov 2016 10:29:58 -0800
parents 368cac4db680
children c6ca9e2c7e7b
files test/sun/security/tools/jarsigner/warnings/Test.java
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/security/tools/jarsigner/warnings/Test.java	Tue Oct 11 09:11:34 2016 +0000
+++ b/test/sun/security/tools/jarsigner/warnings/Test.java	Mon Nov 14 10:29:58 2016 -0800
@@ -197,4 +197,21 @@
         cmd.addAll(Arrays.asList(args));
         return ProcessTools.executeCommand(cmd.toArray(new String[cmd.size()]));
     }
+
+    protected OutputAnalyzer keytool(String... cmd) throws Throwable {
+        return tool(KEYTOOL, cmd);
+    }
+
+    protected OutputAnalyzer jarsigner(String... cmd) throws Throwable {
+        return tool(JARSIGNER, cmd);
+    }
+
+    private OutputAnalyzer tool(String tool, String... args) throws Throwable {
+        List<String> cmd = new ArrayList<>();
+        cmd.add(tool);
+        cmd.add("-J-Duser.language=en");
+        cmd.add("-J-Duser.country=US");
+        cmd.addAll(Arrays.asList(args));
+        return ProcessTools.executeCommand(cmd.toArray(new String[cmd.size()]));
+    }
 }