Skip to content

Commit

Permalink
Added jtreg-buffer suite
Browse files Browse the repository at this point in the history
  • Loading branch information
judovana committed Mar 21, 2024
1 parent e2d12b6 commit a5a0e52
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 2 deletions.
2 changes: 1 addition & 1 deletion external/common_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ supported_packages="jdk jre"
supported_builds="full"

# Supported tests
supported_tests="external_custom camel criu-functional criu-portable-checkpoint criu-portable-restore criu-ubi-portable-checkpoint criu-ubi-portable-restore derby elasticsearch jacoco jenkins functional-test kafka lucene-solr openliberty-mp-tck payara-mp-tck quarkus quarkus_quickstarts scala system-test tomcat tomee wildfly wycheproof netty spring zookeeper"
supported_tests="external_custom camel criu-functional criu-portable-checkpoint criu-portable-restore criu-ubi-portable-checkpoint criu-ubi-portable-restore derby elasticsearch jacoco jenkins jtreg-buffer functional-test kafka lucene-solr openliberty-mp-tck payara-mp-tck quarkus quarkus_quickstarts scala system-test tomcat tomee wildfly wycheproof netty spring zookeeper"

function check_os() {
os=$1
Expand Down
2 changes: 1 addition & 1 deletion external/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ usage () {
echo 'Usage : external.sh --dir TESTDIR --tag DOCKERIMAGE_TAG --version JDK_VERSION --impl JDK_IMPL [--docker_os docker_os][--platform PLATFORM] [--portable portable] [--node_name node_name] [--node_labels node_labels] [--docker_registry_required docker_registry_required] [--docker_registry_url DOCKER_REGISTRY_URL] [--docker_registry_dir DOCKER_REGISTRY_DIR] [--base_docker_registry_url baseDockerRegistryUrl] [--base_docker_registry_dir baseDockerRegistryDir] [--mount_jdk mount_jdk] [--test_root TEST_ROOT] [--reportsrc appReportDir] [--reportdst REPORTDIR] [--testtarget target] [--docker_args EXTRA_DOCKER_ARGS] [--build|--run|--load|--clean]'
}

supported_tests="external_custom aot camel criu-functional criu-portable-checkpoint criu-portable-restore criu-ubi-portable-checkpoint criu-ubi-portable-restore derby elasticsearch jacoco jenkins functional-test kafka lucene-solr openliberty-mp-tck payara-mp-tck quarkus quarkus_quickstarts scala system-test tomcat tomee wildfly wycheproof netty spring"
supported_tests="external_custom aot camel criu-functional criu-portable-checkpoint criu-portable-restore criu-ubi-portable-checkpoint criu-ubi-portable-restore derby elasticsearch jacoco jenkins jtreg-buffer functional-test kafka lucene-solr openliberty-mp-tck payara-mp-tck quarkus quarkus_quickstarts scala system-test tomcat tomee wildfly wycheproof netty spring"

function check_test() {
test=$1
Expand Down
25 changes: 25 additions & 0 deletions external/jtreg-buffer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# External jtreg-buffer Tests

jtreg-buffer are tests, which under normal circumstances would end in OpenJDK regression test repositories, u they did not.
However, original authors disapeared, usptream did not accepted the change, or there was not proper time, or the author was simply lazy.
Those tests are pulled from https://github.com/rh-openjdk/jtreg-buffer repository. Buffer, like queue for waiting to be usptreamed.
On long run, all those tests shoud be upstreamed but it is aprox 2years of man work and maybe usptream will not accept them all.
If there is such test on yor side, feel free to contribute.

## Running jtreg-buffer tests locally
To run any AQA tests locally, you follow the same pattern:

0. Ensure your test machine is set up with [test prereqs](https://github.com/adoptium/aqa-tests/blob/master/doc/Prerequisites.md). For external tests, you do need Docker installed.
1. Download/unpack the SDK you want to your test machine
2. `export TEST_JDK_HOME=</pathToWhereYouInstalledSDK>`
3. `git clone https://github.com/adoptium/aqa-tests.git`
4. `cd aqa-tests`
5. `./get.sh`
6. `cd TKG`
7. export required environment variables, BUILD_LIST and EXTRA_DOCKER_ARGS (eg `export BUILD_LIST=external/jtreg-buffer` and `export EXTRA_DOCKER_ARGS="-v $TEST_JDK_HOME:/opt/java/openjdk"`)
8. `make compile` (This fetches test material and compiles it, based on build.xml files in the test directories)
9. runthe TARGET `make _jtreg-buffer-test` (When you defined BUILD_LIST to point to a directory in aqa-tests/external, then this is a testCaseName from the playlist.xml file within the directory you chose)

When [running these from the command-line](https://github.com/adoptium/aqa-tests/blob/master/doc/userGuide.md#local-testing-via-make-targets-on-the-commandline), these tests are grouped under a make target called 'external', so 'make external' would run the entire set of tests found in the aqa-tests/external directory. This is unadvisable! Limit what you compile and run, BUILD_LIST=external/`<someSubDirectory>`, and TARGET=`<testCaseNameFromSubdirPlaylist>`

These tests run regularly and results can be found in [TRSS Third Party Application view](https://trss.adoptopenjdk.net/ThirdPartyAppView).
27 changes: 27 additions & 0 deletions external/jtreg-buffer/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<project name="jtreg-buffer-test" default="build" basedir=".">
<taskdef resource="net/sf/antcontrib/antlib.xml" />
<description>
Build jtreg~buffer Docker image
</description>
<import file="${TEST_ROOT}/external/build.xml"/>

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

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

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

<target name="build">
<antcall target="dist" inheritall="true" />
</target>
</project>
29 changes: 29 additions & 0 deletions external/jtreg-buffer/playlist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?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-test</testCaseName>
<command> $(TEST_ROOT)$(D)external$(D)external.sh --run --tag "${DOCKERIMAGE_TAG}" --dir jtreg-buffer --reportdst $(REPORTDIR) --docker_args "$(EXTRA_DOCKER_ARGS)" ; \
$(TEST_STATUS); \
$(TEST_ROOT)$(D)external$(D)external.sh --clean --tag "${DOCKERIMAGE_TAG}" --dir jtreg-buffer
</command>
<levels>
<level>extended</level>
</levels>
<groups>
<group>external</group>
</groups>
</test>
</playlist>
5 changes: 5 additions & 0 deletions external/jtreg-buffer/test.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
github_url="https://github.com/rh-openjdk/jtreg-buffer.git"
test_results=""
tag_version="main"
ubuntu_packages="git wget tar"
maven_version="3.8.5"
23 changes: 23 additions & 0 deletions external/jtreg-buffer/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# 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.
#

source $(dirname "$0")/test_base_functions.sh
#Set up Java to be used by the jtreg-buffer test
echo_setup
printenv

set -ex

bash run.sh $JAVA_HOME
set +e

0 comments on commit a5a0e52

Please sign in to comment.