Skip to content

Commit

Permalink
Added jtreg-buffer testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
judovana committed May 10, 2024
1 parent 61ebc47 commit 6487a36
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 0 deletions.
4 changes: 4 additions & 0 deletions functional/jtreg-buffer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Jtreg-buffer Tests

jtreg-buffer are tests, which ideally should end in OpenJDK regression test repositories.
These tests are pulled from the https://github.com/rh-openjdk/jtreg-buffer repository.
69 changes: 69 additions & 0 deletions functional/jtreg-buffer/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0"?>

<!--
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-->

<project name="jtreg-buffer" default="build" basedir=".">
<taskdef resource="net/sf/antcontrib/antlib.xml" />
<description>
Set of tests, running not yet upstreamed jtreg tests, or jtreg tests which were not accepted for some reason, and still have reason to keep.
</description>

<!-- set properties for this build -->
<property name="TEST" value="jtreg-buffer" />
<property name="DEST" value="${BUILD_ROOT}/functional/jtreg-buffer" />
<property name="src" location="./jtreg-buffer" />

<target name="jtreg-buffer.check">
<condition property="jtreg-buffer.exists">
<available file="jtreg-buffer" type="dir"/>
</condition>
</target>

<if>
<contains string="${SPEC}" substring="zos"/>
<then>
<property name="GIT_REPO" value="git@github.com:" />
</then>
<else>
<property name="GIT_REPO" value="https://github.com/" />
</else>
</if>
<target name="getJtreg-buffer" depends="jtreg-buffer.check" unless="jtreg-buffer.exists">
<getFileWithRetry file="jtreg-buffer" command="git clone --depth 1 -q ${GIT_REPO}rh-openjdk/jtreg-buffer.git -b main jtreg-buffer"/>
<checkGitRepoSha repoDir="jtreg-buffer"/>
</target>

<target name="init">
<mkdir dir="${DEST}"/>
</target>

<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml"/>


<target name="dist" depends="getJtreg-buffer" description="generate the distribution">
<copy todir="${DEST}">
<fileset dir="${src}" includes="*.xml,*.mk"/>
</copy>
</target>

<target name="clean" depends="dist" description="clean up">
<!-- Delete the ${build} directory trees -->
<delete dir="${build}" />
</target>

<target name="build" >
<antcall target="clean" inheritall="true" />
</target>
</project>
58 changes: 58 additions & 0 deletions functional/jtreg-buffer/playlist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-->
<playlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../TKG/resources/playlist.xsd">
<test>
<testCaseName>jtreg-buffer</testCaseName>
<disables>
<disable>
<comment>readlink -f is known to misbehave on selected platforms</comment>
<platform>^.*(s390x_linux|aarch64_mac).*$</platform>
</disable>
</disables>
<command>
JTREG_HOME="$(TEST_RESROOT)$(D)jtreg" \
$(TEST_ROOT)$(D)functional$(D)jtreg-buffer$(D)jtreg-buffer$(D)run.sh "$(TEST_JDK_HOME)" ; $(TEST_STATUS)
</command>
<levels>
<level>dev</level>
</levels>
<groups>
<group>functional</group>
</groups>
</test>
<test>
<testCaseName>jtreg-buffer_jtreg</testCaseName>
<disables>
<disable>
<comment>readlink -f is known to misbehave on selected platforms</comment>
<platform>^((?!(s390x_linux|aarch64_mac)).)*$</platform>
</disable>
</disables>
<command>$(JAVA_COMMAND) -Xmx512m -jar $(Q)$(TEST_RESROOT)$(D)jtreg$(D)lib$(D)jtreg.jar$(Q) \
-xml -v1 -a -ignore:quiet -timeoutFactor:2 \
-w $(Q)$(REPORTDIR)$(D)work$(Q) \
-r $(Q)$(REPORTDIR)$(D)report$(Q) \
-jdk:$(Q)$(TEST_JDK_HOME)$(Q) \
$(Q)$(TEST_ROOT)$(D)functional$(D)jtreg-buffer$(D)jtreg-buffer$(Q); \
$(TEST_STATUS)
</command>
<levels>
<level>dev</level>
</levels>
<groups>
<group>functional</group>
</groups>
</test>
</playlist>

0 comments on commit 6487a36

Please sign in to comment.