< prev index next >

test/jdk/tools/jpackage/windows/WinConsoleTest.java

Print this page

        

*** 35,62 **** * @test * @summary jpackage with --win-console * @library ../helpers * @requires (os.family == "windows") * @modules jdk.jpackage/jdk.jpackage.internal ! * @run main/othervm -Xmx512m WinConsoleTest */ public class WinConsoleTest { ! public static void main(String[] args) throws IOException { JPackageCommand cmd = JPackageCommand.helloAppImage(); final Path launcherPath = cmd.appImage().resolve( cmd.launcherPathInAppImage()); IOUtils.deleteRecursive(cmd.outputDir().toFile()); cmd.execute().assertExitCodeIsZero(); ! HelloApp.executeAndVerifyOutput(launcherPath); checkSubsystem(launcherPath, false); IOUtils.deleteRecursive(cmd.outputDir().toFile()); cmd.addArgument("--win-console").execute().assertExitCodeIsZero(); ! HelloApp.executeAndVerifyOutput(launcherPath); checkSubsystem(launcherPath, true); } private static void checkSubsystem(Path path, boolean isConsole) throws IOException { final int subsystemGui = 2; --- 35,64 ---- * @test * @summary jpackage with --win-console * @library ../helpers * @requires (os.family == "windows") * @modules jdk.jpackage/jdk.jpackage.internal ! * @run main/othervm/timeout=360 -Xmx512m WinConsoleTest */ public class WinConsoleTest { ! public static void main(String[] args) { ! Test.run(args, () -> { JPackageCommand cmd = JPackageCommand.helloAppImage(); final Path launcherPath = cmd.appImage().resolve( cmd.launcherPathInAppImage()); IOUtils.deleteRecursive(cmd.outputDir().toFile()); cmd.execute().assertExitCodeIsZero(); ! HelloApp.executeLauncherAndVerifyOutput(cmd); checkSubsystem(launcherPath, false); IOUtils.deleteRecursive(cmd.outputDir().toFile()); cmd.addArgument("--win-console").execute().assertExitCodeIsZero(); ! HelloApp.executeLauncherAndVerifyOutput(cmd); checkSubsystem(launcherPath, true); + }); } private static void checkSubsystem(Path path, boolean isConsole) throws IOException { final int subsystemGui = 2;
< prev index next >