test/jdk/tools/jpackage/windows/WinConsoleTest.java
branchJDK-8200758-branch
changeset 58648 3bf53ffa9ae7
parent 58416 f09bf58c1f17
child 58994 b09ba68c6a19
equal deleted inserted replaced
58647:2c43b89b1679 58648:3bf53ffa9ae7
    34  * @test
    34  * @test
    35  * @summary jpackage with --win-console
    35  * @summary jpackage with --win-console
    36  * @library ../helpers
    36  * @library ../helpers
    37  * @build jdk.jpackage.test.*
    37  * @build jdk.jpackage.test.*
    38  * @requires (os.family == "windows")
    38  * @requires (os.family == "windows")
    39  * @modules jdk.jpackage
    39  * @modules jdk.jpackage/jdk.jpackage.internal
    40  * @compile WinConsoleTest.java
    40  * @compile WinConsoleTest.java
    41  *
    41  *
    42  * @run main/othervm/timeout=360 -Xmx512m jdk.jpackage.test.Main
    42  * @run main/othervm/timeout=360 -Xmx512m jdk.jpackage.test.Main
    43  *  --jpt-before-run=jdk.jpackage.test.JPackageCommand.useToolProviderByDefault
    43  *  --jpt-before-run=jdk.jpackage.test.JPackageCommand.useToolProviderByDefault
    44  *  --jpt-run=WinConsoleTest
    44  *  --jpt-run=WinConsoleTest
    55         JPackageCommand cmd = JPackageCommand.helloAppImage();
    55         JPackageCommand cmd = JPackageCommand.helloAppImage();
    56         if (!withWinConsole) {
    56         if (!withWinConsole) {
    57             cmd.removeArgument("--win-console");
    57             cmd.removeArgument("--win-console");
    58         }
    58         }
    59         cmd.executeAndAssertHelloAppImageCreated();
    59         cmd.executeAndAssertHelloAppImageCreated();
    60         checkSubsystem(cmd.appImage().resolve(cmd.launcherPathInAppImage()),
    60         checkSubsystem(cmd.appLauncherPath(), withWinConsole);
    61                 withWinConsole);
       
    62     }
    61     }
    63 
    62 
    64     private static void checkSubsystem(Path path, boolean isConsole) throws
    63     private static void checkSubsystem(Path path, boolean isConsole) throws
    65             IOException {
    64             IOException {
    66         final int subsystemGui = 2;
    65         final int subsystemGui = 2;