< prev index next >
test/jdk/tools/jpackage/createappimage/JPackageCreateAppImageRuntimeBase.java
Print this page
*** 24,34 ****
import java.io.File;
import java.nio.file.Files;
public class JPackageCreateAppImageRuntimeBase {
private static final String app = JPackagePath.getApp();
- private static final String appWorkingDir = JPackagePath.getAppWorkingDir();
private static final String runtimeJava = JPackagePath.getRuntimeJava();
private static final String runtimeJavaOutput = "javaOutput.txt";
private static final String appOutput = JPackagePath.getAppOutputFile();
private static void validateResult(String[] result) throws Exception {
--- 24,33 ----
*** 49,59 ****
int retVal = JPackageHelper.execute(null, app);
if (retVal != 0) {
throw new AssertionError("Test application exited with error: " + retVal);
}
! File outfile = new File(appWorkingDir + File.separator + appOutput);
if (!outfile.exists()) {
throw new AssertionError(appOutput + " was not created");
}
String output = Files.readString(outfile.toPath());
--- 48,58 ----
int retVal = JPackageHelper.execute(null, app);
if (retVal != 0) {
throw new AssertionError("Test application exited with error: " + retVal);
}
! File outfile = new File(appOutput);
if (!outfile.exists()) {
throw new AssertionError(appOutput + " was not created");
}
String output = Files.readString(outfile.toPath());
*** 82,98 ****
--- 81,101 ----
throw new AssertionError("Unexpected result: " + result[0]);
}
}
public static void testCreateAppImage(String [] cmd) throws Exception {
+ System.out.println("----- current dir = " + System.getProperty("user.dir"));
JPackageHelper.executeCLI(true, cmd);
+ System.out.println("----- current dir = " + System.getProperty("user.dir"));
validate();
validateRuntime();
}
public static void testCreateAppImageToolProvider(String [] cmd) throws Exception {
+ System.out.println("----- ToolProvider current dir = " + System.getProperty("user.dir"));
JPackageHelper.executeToolProvider(true, cmd);
+ System.out.println("----- ToolProvider current dir = " + System.getProperty("user.dir"));
validate();
validateRuntime();
}
}
< prev index next >