Skip to content

Commit

Permalink
Merge pull request #10689 from ctomc/testsuite-diet
Browse files Browse the repository at this point in the history
WFLY-7298 use slim build for testsuite
  • Loading branch information
bstansberry committed Dec 15, 2017
2 parents a3b49de + 3c3ac91 commit c81bd55
Show file tree
Hide file tree
Showing 65 changed files with 507 additions and 407 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -126,7 +126,7 @@
<version.org.apache.james.apache-mime4j>0.6</version.org.apache.james.apache-mime4j>
<version.org.apache.lucene>5.3.1</version.org.apache.lucene>
<version.org.apache.myfaces.core>2.2.11</version.org.apache.myfaces.core>
<version.org.apache.openjpa>2.4.1</version.org.apache.openjpa>
<version.org.apache.openjpa>2.4.2</version.org.apache.openjpa>
<version.org.eclipselink.version>2.6.3</version.org.eclipselink.version>
<version.org.apache.neethi>3.0.3</version.org.apache.neethi>
<version.org.apache.qpid.proton>0.16.0</version.org.apache.qpid.proton>
Expand Down Expand Up @@ -252,7 +252,7 @@
<linkXRef>false</linkXRef>

<server.output.dir.prefix>wildfly</server.output.dir.prefix>
<wildfly.build.output.dir>dist/target/${server.output.dir.prefix}-${jboss.as.release.version}</wildfly.build.output.dir>
<wildfly.build.output.dir>build/target/${server.output.dir.prefix}-${jboss.as.release.version}</wildfly.build.output.dir>
<wildfly.web.build.output.dir>servlet-dist/target/${server.output.dir.prefix}-servlet-${jboss.as.release.version}</wildfly.web.build.output.dir>

<!--
Expand Down
79 changes: 20 additions & 59 deletions testsuite/compat/pom.xml
Expand Up @@ -38,20 +38,10 @@

<!-- This project's testsuite dir. To be changed for every submodule (until we figure out how to do it automatically). -->
<jbossas.ts.dir>${basedir}/..</jbossas.ts.dir>

<!-- ${jbossas.project.dir} defined in /testsuite. But for separated runs runs, let's duplicate it here. -->
<jbossas.project.dir>${jbossas.ts.dir}/..</jbossas.project.dir>


<!-- Used to provide an absolute location for the distribution under test. -->
<!-- This value is overridden in modules with the correct relative pathname. -->
<jboss.dist>${jbossas.project.dir}/${wildfly.build.output.dir}</jboss.dist>
<jboss.home>${jboss.dist}</jboss.home>

<!-- Used to provide an absolute location for the XSLT scripts. -->
<!-- This value is overridden in submodules with the correct relative path. -->
<xslt.scripts.dir>${basedir}/../integration/src/test/xslt</xslt.scripts.dir>
<surefire.excludeTests />

<ts.elytron.cli>../shared/enable-elytron.cli</ts.elytron.cli>
</properties>

Expand Down Expand Up @@ -190,31 +180,14 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!--<basedir>${jbossas.ts.integ.dir}</basedir> <!- - "The base directory of the project being tested." Sets ${basedir}. -->
<workingDirectory>${basedir}/target/workdir</workingDirectory> <!-- Work in submodule's own dir. -->

<!-- System properties to forked surefire JVM which runs clients. -->
<argLine>${jvm.args.ip.client} ${jvm.args.timeouts} ${surefire.system.args}</argLine>
<excludes>
<exclude>${surefire.excludeTests}</exclude>
</excludes>
<!-- System properties passed to test cases -->
<systemPropertyVariables combine.children="append">
<node0>${node0}</node0>
<node1>${node1}</node1>
<mcast>${mcast}</mcast>

<jbossas.ts.submodule.dir>${basedir}</jbossas.ts.submodule.dir>
<jbossas.ts.integ.dir>${jbossas.ts.integ.dir}</jbossas.ts.integ.dir>
<jbossas.ts.dir>${jbossas.ts.dir}</jbossas.ts.dir>
<jbossas.project.dir>${jbossas.project.dir}</jbossas.project.dir>
<jboss.dist>${jboss.dist}</jboss.dist>

<!--
Used in arquillian.xml - arguments for all JBoss AS instances.
System properties are duplicated here until ARQ-647 is implemented.
-->
<server.jvm.args>${surefire.system.args} ${jvm.args.ip.server} ${jvm.args.timeouts} -Dnode0=${node0} -Dnode1=${node1} -Dmcast=${mcast} -Declipselink.archive.factory=org.jipijapa.eclipselink.JBossArchiveFactoryImpl ${extra.server.jvm.args}</server.jvm.args>
<server.jvm.args>${surefire.system.args} ${jvm.args.ip.server} ${jvm.args.timeouts} -Declipselink.archive.factory=org.jipijapa.eclipselink.JBossArchiveFactoryImpl ${extra.server.jvm.args}</server.jvm.args>
</systemPropertyVariables>

</configuration>
Expand All @@ -223,17 +196,6 @@
</build>

<profiles>
<profile>
<id>jdk9</id>
<activation>
<jdk>9</jdk>
</activation>
<properties>
<!--WFLY-6777 We disable OpenJPA test on JDK9, as openjdk-s serp bytecode enhancer hangs deployment. -->
<surefire.excludeTests>**/OpenJPASharedModuleProviderTestCase.java</surefire.excludeTests>
</properties>
</profile>

<profile>
<id>elytron.profile</id>
<activation>
Expand All @@ -247,31 +209,30 @@
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.org.wildfly.plugin}</version>
<executions>
<execution>
<id>enable-elytron-cli</id>
<phase>test-compile</phase>
<phase>process-test-resources</phase>
<goals>
<goal>exec</goal>
<goal>execute-commands</goal>
</goals>
<configuration>
<executable>${java.home}/bin/java</executable>
<arguments>
<argument>-jar</argument>
<argument>${project.build.directory}/jbossas/jboss-modules.jar</argument>
<argument>-mp</argument>
<argument>${jboss.dist}/modules</argument>
<argument>org.jboss.as.cli</argument>
<argument>--file=${ts.elytron.cli}</argument>
</arguments>
<environmentVariables>
<JBOSS_HOME>${project.build.directory}/jbossas</JBOSS_HOME>
</environmentVariables>
</configuration>
</execution>
</executions>
<configuration>
<offline>true</offline>
<scripts>
<script>${ts.elytron.cli}</script>
</scripts>
<jboss-home>${project.build.directory}/wildfly</jboss-home>
<stdout>none</stdout>
<java-opts>${modular.jdk.args}</java-opts>
<system-properties>
<maven.repo.local>${settings.localRepository}</maven.repo.local>
<module.path>${jboss.dist}/modules</module.path>
</system-properties>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
4 changes: 2 additions & 2 deletions testsuite/compat/src/test/resources/arquillian.xml
Expand Up @@ -6,8 +6,8 @@

<container qualifier="jboss" default="true">
<configuration>
<property name="jbossHome">${basedir}/target/jbossas</property>
<property name="javaVmArguments">${server.jvm.args} -Djboss.inst=${basedir}/target/jbossas</property>
<property name="jbossHome">${basedir}/target/wildfly</property>
<property name="javaVmArguments">${server.jvm.args}</property>
<property name="jbossArguments">${jboss.args}</property>
<property name="serverConfig">${jboss.server.config.file.name:standalone.xml}</property>
<property name="allowConnectingToRunningServer">true</property>
Expand Down
9 changes: 3 additions & 6 deletions testsuite/domain/pom.xml
Expand Up @@ -44,9 +44,6 @@
ts.copy-jbossas.groups execution assumes it's the same as jboss.dist -->
<jboss.home>${jboss.dist}</jboss.home>

<!-- Used to provide an absolute location for the XSLT scripts. -->
<!-- This value is overridden in submodules with the correct relative path. -->
<xslt.scripts.dir>${basedir}/../integration/src/test/xslt</xslt.scripts.dir>
<enforcer.skip>true</enforcer.skip>
<jbossas.ts.dir>${basedir}/..</jbossas.ts.dir>

Expand Down Expand Up @@ -202,7 +199,7 @@
<!-- Disabled assertions until new version of core with fix for WFCORE-1630 is used -->
<!--<jboss.options>-ea</jboss.options>-->
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<jboss.home>${project.basedir}/target/jbossas</jboss.home>
<jboss.home>${project.basedir}/target/wildfly</jboss.home>
<module.path>${jboss.dist}/modules</module.path>
<jboss.test.host.master.address>${node0}</jboss.test.host.master.address>
<jboss.test.host.slave.address>${node1}</jboss.test.host.slave.address>
Expand Down Expand Up @@ -247,7 +244,7 @@
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<jboss.options>-ea</jboss.options>
<jboss.home>${project.basedir}/target/jbossas</jboss.home>
<jboss.home>${project.basedir}/target/wildfly</jboss.home>
<module.path>${jboss.dist}/modules</module.path>
<jboss.test.host.master.address>${node0}</jboss.test.host.master.address>
<jboss.test.host.slave.address>${node1}</jboss.test.host.slave.address>
Expand Down Expand Up @@ -294,7 +291,7 @@
<scripts>
<script>${ts.elytron.cli}</script>
</scripts>
<jboss-home>${project.build.directory}/jbossas</jboss-home>
<jboss-home>${project.build.directory}/wildfly</jboss-home>
<stdout>none</stdout>
<java-opts>${modular.jdk.args}</java-opts>
<system-properties>
Expand Down
Expand Up @@ -47,7 +47,7 @@ public abstract class BuildConfigurationTestBase {

static final String masterAddress = System.getProperty("jboss.test.host.master.address", "localhost");

static final File CONFIG_DIR = new File("target/jbossas/domain/configuration/");
static final File CONFIG_DIR = new File("target/wildfly/domain/configuration/");

static WildFlyManagedConfiguration createConfiguration(final String domainXmlName, final String hostXmlName, final String testConfiguration) {
return createConfiguration(domainXmlName, hostXmlName, testConfiguration, "master", masterAddress, 9999);
Expand Down Expand Up @@ -143,7 +143,7 @@ private static File hackFixHostConfig(File hostConfigFile, String hostName, Stri
return file.toFile();
}

static File hackFixDomainConfig(File domainConfigFile) {
private static File hackFixDomainConfig(File domainConfigFile) {
final File file;

try {
Expand Down
2 changes: 1 addition & 1 deletion testsuite/integration/basic/pom.xml
Expand Up @@ -166,7 +166,7 @@
<!-- Parameters to test cases. -->
<systemPropertyVariables combine.children="append">
<jboss.server.config.file.name>standalone-full.xml</jboss.server.config.file.name>
<jboss.inst>${basedir}/target/jbossas</jboss.inst>
<jboss.inst>${basedir}/target/wildfly</jboss.inst>
<!-- Needed for the IIOP tests-->
<com.sun.CORBA.ORBUseDynamicStub>true</com.sun.CORBA.ORBUseDynamicStub>
<!-- EJB client library hack, see WFLY-4973-->
Expand Down
Expand Up @@ -6,8 +6,8 @@

<container qualifier="jboss" default="true">
<configuration>
<property name="jbossHome">${basedir}/target/jbossas</property>
<property name="javaVmArguments">${server.jvm.args} -Djboss.inst=${basedir}/target/jbossas</property>
<property name="jbossHome">${basedir}/target/wildfly</property>
<property name="javaVmArguments">${server.jvm.args}</property>
<property name="serverConfig">${jboss.server.config.file.name:standalone.xml}</property>
<property name="jbossArguments">${jboss.args}</property>
<!-- -Djboss.inst is not necessarily needed, only in case the test case neeeds path to the instance it runs in.
Expand Down
Expand Up @@ -60,8 +60,7 @@ public class ControllerServlet extends HttpServlet {
public void init(ServletConfig config) throws ServletException {
try {
final KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());

try (final InputStream in = Files.newInputStream(Paths.get("../jcetest.keystore"))){
try (final InputStream in = Files.newInputStream(Paths.get("target/jcetest.keystore"))){
keyStore.load(in, "password".toCharArray());
}
final X509Certificate testCertificate = (X509Certificate) keyStore.getCertificate("test");
Expand Down
Expand Up @@ -64,13 +64,13 @@ public class JCETestCase {
public static Archive<?> deployment() throws Exception {
final JavaArchive jce = ShrinkWrap.create(JavaArchive.class, "jcetest.jar")
.addPackage(DummyProvider.class.getPackage());
final File jceJar = new File("jcetest.jar");
final File jceJar = new File("target/jcetest.jar");
jce.as(ZipExporter.class).exportTo(jceJar, true);
final File signedJceJar = new File("jcetestsigned.jar");
final File signedJceJar = new File("target/jcetestsigned.jar");
JavaArchive signedJce;
if (isJCETestable()) {
// see genkey-jcetest-keystore in pom.xml for the keystore creation
final JarSignerUtil signer = new JarSignerUtil(new File("../jcetest.keystore"), "password", "password", /* alias */ "test");
final JarSignerUtil signer = new JarSignerUtil(new File("target/jcetest.keystore"), "password", "password", /* alias */ "test");
signer.sign(jceJar, signedJceJar);
signer.verify(signedJceJar);
signedJce = ShrinkWrap.create(ZipImporter.class, "jcetestsigned.jar")
Expand All @@ -89,7 +89,7 @@ public static Archive<?> deployment() throws Exception {

// ControllerServlet and DummyProvider need the following perms for their "dirty" game
ear.addAsManifestResource(createPermissionsXmlAsset(
new FilePermission("../jcetest.keystore", "read"),
new FilePermission("target/jcetest.keystore", "read"),
new RuntimePermission("accessDeclaredMembers"),
new ReflectPermission("suppressAccessChecks"),
new RuntimePermission("accessClassInPackage.sun.security.validator"),
Expand Down
@@ -1,3 +1,25 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2017, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

package org.jboss.as.test.integration.ee.appclient.basic;

import javax.annotation.Resource;
Expand Down
@@ -1,3 +1,25 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2017, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

package org.jboss.as.test.integration.ee.appclient.basic;

import javax.ejb.Remote;
Expand Down
@@ -1,3 +1,25 @@
/*
* JBoss, Home of Professional Open Source.
* Copyright 2017, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/

package org.jboss.as.test.integration.ee.appclient.basic;

import java.lang.management.ManagementFactory;
Expand Down

0 comments on commit c81bd55

Please sign in to comment.