test/jdk/tools/jpackage/helpers/JPackageHelper.java
branchJDK-8200758-branch
changeset 57414 6eda749d3117
parent 57405 539d8b3f9e1e
child 57419 44c2481650ce
--- a/test/jdk/tools/jpackage/helpers/JPackageHelper.java	Mon Jun 17 15:38:04 2019 -0400
+++ b/test/jdk/tools/jpackage/helpers/JPackageHelper.java	Thu Jun 20 14:13:50 2019 -0400
@@ -210,8 +210,8 @@
     public static String executeCLI(boolean retValZero, String... args) throws Exception {
         int retVal;
         File outfile = new File("output.log");
+        String[] command = getCommand(args);
         try {
-            String[] command = getCommand(args);
             retVal = execute(outfile, command);
         } catch (Exception ex) {
             if (outfile.exists()) {
@@ -223,6 +223,9 @@
         String output = Files.readString(outfile.toPath());
         if (retValZero) {
             if (retVal != 0) {
+                System.err.println("command run:");
+                for (String s : command) { System.err.println(s); }
+                System.err.println("command output:");
                 System.err.println(output);
                 throw new AssertionError("jpackage exited with error: " + retVal);
             }