< prev index next >

test/java/security/Provider/SecurityProviderModularTest.java

Print this page
rev 17315 : 8181335: remove packageless CompilerUtils
Reviewed-by: duke
   1 /*
   2  * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.nio.file.Files;
  25 import java.nio.file.Path;
  26 import java.nio.file.Paths;
  27 import java.util.ArrayList;
  28 import java.util.LinkedHashMap;
  29 import java.util.List;
  30 import java.util.Map;
  31 import java.util.Arrays;
  32 import java.io.IOException;
  33 import java.lang.module.ModuleDescriptor;
  34 import jdk.testlibrary.ProcessTools;
  35 import jdk.testlibrary.OutputAnalyzer;

  36 import org.testng.annotations.BeforeTest;
  37 
  38 /**
  39  * @test
  40  * @bug 8130360
  41  * @library /lib/testlibrary
  42  * @library /java/security/modules

  43  * @modules java.base/jdk.internal.module
  44  * @build CompilerUtils JarUtils
  45  * @summary Test custom security provider module with all possible modular
  46  *          condition. The test includes different combination of security
  47  *          client/provider modules interaction with or without service
  48  *          description.
  49  * @run testng SecurityProviderModularTest
  50  */
  51 public class SecurityProviderModularTest extends ModularTest {
  52 
  53     private static final Path S_SRC = SRC.resolve("TestSecurityProvider.java");
  54     private static final String S_PKG = "provider";
  55     private static final String S_JAR_NAME = S_PKG + JAR_EXTN;
  56     private static final String S_WITH_DESCR_JAR_NAME = S_PKG + DESCRIPTOR
  57             + JAR_EXTN;
  58     private static final String MS_JAR_NAME = MODULAR + S_PKG + JAR_EXTN;
  59     private static final String MS_WITH_DESCR_JAR_NAME = MODULAR + S_PKG
  60             + DESCRIPTOR + JAR_EXTN;
  61 
  62     private static final Path C_SRC = SRC.resolve(
  63             "TestSecurityProviderClient.java");
  64     private static final String C_PKG = "client";


   1 /*
   2  * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.nio.file.Files;
  25 import java.nio.file.Path;
  26 import java.nio.file.Paths;
  27 import java.util.ArrayList;
  28 import java.util.LinkedHashMap;
  29 import java.util.List;
  30 import java.util.Map;
  31 import java.util.Arrays;
  32 import java.io.IOException;
  33 import java.lang.module.ModuleDescriptor;
  34 import jdk.testlibrary.ProcessTools;
  35 import jdk.testlibrary.OutputAnalyzer;
  36 import jdk.test.lib.compiler.CompilerUtils;
  37 import org.testng.annotations.BeforeTest;
  38 
  39 /**
  40  * @test
  41  * @bug 8130360
  42  * @library /lib/testlibrary
  43  * @library /java/security/modules
  44  * @library /test/lib
  45  * @modules java.base/jdk.internal.module
  46  * @build jdk.test.lib.compiler.CompilerUtils JarUtils
  47  * @summary Test custom security provider module with all possible modular
  48  *          condition. The test includes different combination of security
  49  *          client/provider modules interaction with or without service
  50  *          description.
  51  * @run testng SecurityProviderModularTest
  52  */
  53 public class SecurityProviderModularTest extends ModularTest {
  54 
  55     private static final Path S_SRC = SRC.resolve("TestSecurityProvider.java");
  56     private static final String S_PKG = "provider";
  57     private static final String S_JAR_NAME = S_PKG + JAR_EXTN;
  58     private static final String S_WITH_DESCR_JAR_NAME = S_PKG + DESCRIPTOR
  59             + JAR_EXTN;
  60     private static final String MS_JAR_NAME = MODULAR + S_PKG + JAR_EXTN;
  61     private static final String MS_WITH_DESCR_JAR_NAME = MODULAR + S_PKG
  62             + DESCRIPTOR + JAR_EXTN;
  63 
  64     private static final Path C_SRC = SRC.resolve(
  65             "TestSecurityProviderClient.java");
  66     private static final String C_PKG = "client";


< prev index next >