test/jdk/tools/jpackage/share/ModulePathTest.java
author herrick
Tue, 10 Sep 2019 14:57:03 -0400
branchJDK-8200758-branch
changeset 58114 42df7de58e39
parent 57446 5a5b85f00a63
child 58147 45a9084fe981
permissions -rw-r--r--
8230519: jpackage "--package-type" values and default Reviewed-by: asemenyuk, almatvee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
57324
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
     1
/*
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
     2
 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
     4
 *
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
     7
 * published by the Free Software Foundation.
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
     8
 *
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    13
 * accompanied this code).
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    14
 *
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    18
 *
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    21
 * questions.
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    22
 */
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    23
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    24
 /*
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    25
 * @test
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    26
 * @summary jpackage create image module test
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    27
 * @library ../helpers
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    28
 * @build JPackageHelper
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    29
 * @build JPackagePath
57446
5a5b85f00a63 8226891: rename and re-layout jpackage tests.
herrick
parents: 57414
diff changeset
    30
 * @build Base
57324
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    31
 * @modules jdk.jpackage
57446
5a5b85f00a63 8226891: rename and re-layout jpackage tests.
herrick
parents: 57414
diff changeset
    32
 * @run main/othervm -Xmx512m ModulePathTest
57324
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    33
 */
57326
603101a378fe 8222439: New jpackage test fails on mac, linux
herrick
parents: 57324
diff changeset
    34
603101a378fe 8222439: New jpackage test fails on mac, linux
herrick
parents: 57324
diff changeset
    35
import java.io.File;
603101a378fe 8222439: New jpackage test fails on mac, linux
herrick
parents: 57324
diff changeset
    36
57446
5a5b85f00a63 8226891: rename and re-layout jpackage tests.
herrick
parents: 57414
diff changeset
    37
public class ModulePathTest {
57324
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    38
    private static final String OUTPUT = "output";
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    39
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    40
    private static final String [] CMD1 = {
58114
42df7de58e39 8230519: jpackage "--package-type" values and default
herrick
parents: 57446
diff changeset
    41
        "--package-type", "app-image",
57324
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    42
        "--output", OUTPUT,
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    43
        "--name", "test",
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    44
        "--module", "com.hello/com.hello.Hello",
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    45
        "--module-path", "input",
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    46
    };
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    47
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    48
    private static final String [] CMD2 = {
58114
42df7de58e39 8230519: jpackage "--package-type" values and default
herrick
parents: 57446
diff changeset
    49
        "--package-type", "app-image",
57324
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    50
        "--output", OUTPUT,
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    51
        "--name", "test",
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    52
        "--module", "com.hello/com.hello.Hello",
57326
603101a378fe 8222439: New jpackage test fails on mac, linux
herrick
parents: 57324
diff changeset
    53
        "--module-path", "input" + File.pathSeparator + "input-other",
57324
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    54
    };
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    55
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    56
    private static final String [] CMD3 = {
58114
42df7de58e39 8230519: jpackage "--package-type" values and default
herrick
parents: 57446
diff changeset
    57
        "--package-type", "app-image",
57324
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    58
        "--output", OUTPUT,
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    59
        "--name", "test",
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    60
        "--module", "com.hello/com.hello.Hello",
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    61
        "--module-path", "input",
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    62
        "--module-path", "input-other",
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    63
    };
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    64
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    65
    public static void main(String[] args) throws Exception {
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    66
        JPackageHelper.createHelloModule();
57446
5a5b85f00a63 8226891: rename and re-layout jpackage tests.
herrick
parents: 57414
diff changeset
    67
        Base.testCreateAppImageToolProvider(CMD1);
57324
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    68
        JPackageHelper.deleteOutputFolder(OUTPUT);
57446
5a5b85f00a63 8226891: rename and re-layout jpackage tests.
herrick
parents: 57414
diff changeset
    69
        Base.testCreateAppImageToolProvider(CMD2);
57324
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    70
        JPackageHelper.deleteOutputFolder(OUTPUT);
57446
5a5b85f00a63 8226891: rename and re-layout jpackage tests.
herrick
parents: 57414
diff changeset
    71
        Base.testCreateAppImageToolProvider(CMD3);
57324
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    72
    }
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    73
c1d3935fbb79 8222406: Multiple arguments for the same option - aggragation broken
herrick
parents:
diff changeset
    74
}