Skip to content

Commit

Permalink
Merge pull request eclipse-openj9#19062 from keithc-ca/crac_test
Browse files Browse the repository at this point in the history
Move CRaC tests to separate suite
  • Loading branch information
pshipton authored Mar 4, 2024
2 parents a4b1b81 + 7cf33b2 commit 3c621f2
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 93 deletions.
60 changes: 21 additions & 39 deletions test/functional/JLM_Tests/build.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
<?xml version="1.0"?>

<!--
Copyright IBM Corp. and others 2016
Copyright IBM Corp. and others 2016
This program and the accompanying materials are made available under
the terms of the Eclipse Public License 2.0 which accompanies this
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
or the Apache License, Version 2.0 which accompanies this distribution and
is available at https://www.apache.org/licenses/LICENSE-2.0.
This program and the accompanying materials are made available under
the terms of the Eclipse Public License 2.0 which accompanies this
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
or the Apache License, Version 2.0 which accompanies this distribution and
is available at https://www.apache.org/licenses/LICENSE-2.0.
This Source Code may also be made available under the following
Secondary Licenses when the conditions for such availability set
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
General Public License, version 2 with the GNU Classpath
Exception [1] and GNU General Public License, version 2 with the
OpenJDK Assembly Exception [2].
This Source Code may also be made available under the following
Secondary Licenses when the conditions for such availability set
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
General Public License, version 2 with the GNU Classpath
Exception [1] and GNU General Public License, version 2 with the
OpenJDK Assembly Exception [2].
[1] https://www.gnu.org/software/classpath/license.html
[2] https://openjdk.org/legal/assembly-exception.html
[1] https://www.gnu.org/software/classpath/license.html
[2] https://openjdk.org/legal/assembly-exception.html
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
-->

<project name="JLM_Tests" default="build" basedir=".">

<description>
Expand All @@ -44,18 +42,9 @@
<fail message="BUILD_ROOT must be defined." unless="BUILD_ROOT" />
<mkdir dir="${DEST}" />
<mkdir dir="${build}" />
<if>
<not>
<contains string="${TEST_FLAG}" substring="CRAC" />
</not>
<then>
<property name="excludeTestCRaCMXBean" value="org/openj9/test/java/lang/management/TestCRaCMXBean.java"/>
<property name="replaceTestng" value="testng.xml" />
<xslt in="testng.xml" out="${build}/testng.xml" style="testng_filter.xsl">
<param name="testName" expression="testCRaCMXBean"/>
</xslt>
</then>
</if>
<condition property="excludeTestCRaCMXBean" value="" else="org/openj9/test/java/lang/management/TestCRaCMXBean.java">
<contains string="${TEST_FLAG}" substring="CRAC" />
</condition>
</target>

<target name="compile" depends="init,getDependentLibs" description="using java ${JDK_VERSION} to compile the source ">
Expand All @@ -65,7 +54,7 @@
<echo>===executable: ${compiler.javac}</echo>
<echo>===debug: on</echo>
<echo>===destdir: ${build}</echo>

<if>
<equals arg1="${JDK_VERSION}" arg2="8"/>
<then>
Expand Down Expand Up @@ -133,17 +122,10 @@
<exclude name="${excludeTestCRaCMXBean}" />
</fileset>
<fileset dir="${src}/../" includes="*.properties,*.xml">
<exclude name="${replaceTestng}" />
</fileset>
</jar>
<copy todir="${DEST}">
<fileset dir="${src}/../" includes="*.xml">
<exclude name="${replaceTestng}" />
</fileset>
<fileset dir="${src}/../" includes="*.mk" />
<fileset dir="${build}">
<include name="${replaceTestng}" />
</fileset>
<fileset dir="${src}/../" includes="*.mk,*.xml" />
</copy>
</target>

Expand All @@ -155,7 +137,7 @@
<target name="build" >
<if>
<or>
<equals arg1="${JDK_IMPL}" arg2="ibm" />
<equals arg1="${JDK_IMPL}" arg2="ibm" />
<equals arg1="${JDK_IMPL}" arg2="openj9" />
</or>
<then>
Expand Down
32 changes: 16 additions & 16 deletions test/functional/JLM_Tests/playlist.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
Copyright IBM Corp. and others 2016
Copyright IBM Corp. and others 2016
This program and the accompanying materials are made available under
the terms of the Eclipse Public License 2.0 which accompanies this
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
or the Apache License, Version 2.0 which accompanies this distribution and
is available at https://www.apache.org/licenses/LICENSE-2.0.
This program and the accompanying materials are made available under
the terms of the Eclipse Public License 2.0 which accompanies this
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
or the Apache License, Version 2.0 which accompanies this distribution and
is available at https://www.apache.org/licenses/LICENSE-2.0.
This Source Code may also be made available under the following
Secondary Licenses when the conditions for such availability set
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
General Public License, version 2 with the GNU Classpath
Exception [1] and GNU General Public License, version 2 with the
OpenJDK Assembly Exception [2].
This Source Code may also be made available under the following
Secondary Licenses when the conditions for such availability set
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
General Public License, version 2 with the GNU Classpath
Exception [1] and GNU General Public License, version 2 with the
OpenJDK Assembly Exception [2].
[1] https://www.gnu.org/software/classpath/license.html
[2] https://openjdk.org/legal/assembly-exception.html
[1] https://www.gnu.org/software/classpath/license.html
[2] https://openjdk.org/legal/assembly-exception.html
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
-->
<playlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../TKG/playlist.xsd">
<test>
Expand Down Expand Up @@ -1324,7 +1324,7 @@
<command>$(ADD_JVM_LIB_DIR_TO_LIBPATH) \
$(JAVA_COMMAND) $(JVM_OPTIONS) \
-cp $(Q)$(RESOURCES_DIR)$(P)$(TESTNG)$(P)$(TEST_RESROOT)$(D)jlm_tests.jar$(Q) \
org.testng.TestNG -d $(REPORTDIR) $(Q)$(TEST_RESROOT)$(D)testng.xml$(Q) \
org.testng.TestNG -d $(REPORTDIR) $(Q)$(TEST_RESROOT)$(D)testng-crac.xml$(Q) \
-testnames testCRaCMXBean \
-groups $(TEST_GROUP) \
-excludegroups $(DEFAULT_EXCLUDE); \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright IBM Corp. and others 2024
Expand All @@ -19,18 +20,14 @@ OpenJDK Assembly Exception [2].
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="testName"/>
<!--
This template matches any attribute or node and copies it to the output xml file,
and only applies if there is not a more specific match,
such as a template that matches <test> elements with the name $testName.
-->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!-- This template finds <test> elements with the name $testName and excludes them from the output xml file. -->
<xsl:template match="test[@name=$testName]"/>
</xsl:stylesheet>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="JLM_Tests_Suite" parallel="none" verbose="2">
<listeners>
<listener class-name="org.openj9.test.util.IncludeExcludeTestAnnotationTransformer" />
</listeners>
<test name="testCRaCMXBean">
<classes>
<class name="org.openj9.test.java.lang.management.TestCRaCMXBean" />
</classes>
</test>
</suite> <!-- JLM_Tests_Suite -->
39 changes: 16 additions & 23 deletions test/functional/JLM_Tests/testng.xml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
Copyright IBM Corp. and others 2016
Copyright IBM Corp. and others 2016
This program and the accompanying materials are made available under
the terms of the Eclipse Public License 2.0 which accompanies this
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
or the Apache License, Version 2.0 which accompanies this distribution and
is available at https://www.apache.org/licenses/LICENSE-2.0.
This program and the accompanying materials are made available under
the terms of the Eclipse Public License 2.0 which accompanies this
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
or the Apache License, Version 2.0 which accompanies this distribution and
is available at https://www.apache.org/licenses/LICENSE-2.0.
This Source Code may also be made available under the following
Secondary Licenses when the conditions for such availability set
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
General Public License, version 2 with the GNU Classpath
Exception [1] and GNU General Public License, version 2 with the
OpenJDK Assembly Exception [2].
This Source Code may also be made available under the following
Secondary Licenses when the conditions for such availability set
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
General Public License, version 2 with the GNU Classpath
Exception [1] and GNU General Public License, version 2 with the
OpenJDK Assembly Exception [2].
[1] https://www.gnu.org/software/classpath/license.html
[2] https://openjdk.org/legal/assembly-exception.html
[1] https://www.gnu.org/software/classpath/license.html
[2] https://openjdk.org/legal/assembly-exception.html
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 OR GPL-2.0-only WITH OpenJDK-assembly-exception-1.0
-->

<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="JLM_Tests_Suite" parallel="none" verbose="2">
<listeners>
<listener class-name="org.openj9.test.util.IncludeExcludeTestAnnotationTransformer" />
Expand Down Expand Up @@ -173,9 +171,4 @@
<class name="org.openj9.test.softmx.SoftmxUserScenarioTest" />
</classes>
</test>
<test name="testCRaCMXBean">
<classes>
<class name="org.openj9.test.java.lang.management.TestCRaCMXBean" />
</classes>
</test>
</suite> <!-- JLM_Tests_Suite -->

0 comments on commit 3c621f2

Please sign in to comment.