From 070e03cca78f2a4f04b5b8b26e6f2ec2ebf10bc9 Mon Sep 17 00:00:00 2001 From: Marina Date: Fri, 23 Apr 2021 23:51:52 +0100 Subject: [PATCH 1/4] add README, test.properties files --- external/jacoco/README.md | 22 ++++++++++ external/jacoco/dockerfile/Dockerfile | 51 ----------------------- external/jacoco/dockerfile/jacoco-test.sh | 4 +- external/jacoco/test.properties | 14 +++++++ 4 files changed, 39 insertions(+), 52 deletions(-) create mode 100644 external/jacoco/README.md delete mode 100644 external/jacoco/dockerfile/Dockerfile create mode 100644 external/jacoco/test.properties diff --git a/external/jacoco/README.md b/external/jacoco/README.md new file mode 100644 index 0000000000..d26fb5cfcc --- /dev/null +++ b/external/jacoco/README.md @@ -0,0 +1,22 @@ +Running External tests locally + To run any AQA tests locally, you follow the same pattern: + + Ensure your test machine is set up with test prereqs. For external tests, you do need Docker installed. + +1. Download/unpack the SDK that you want to test to your test machine + +2. export TEST_JDK_HOME= + +3. git clone https://github.com/AdoptOpenJDK/openjdk-tests.git + +4. cd openjdk-tests + +5. ./get.sh + +6. cd TKG + +7. export required environment variables, BUILD_LIST and EXTRA_DOCKER_ARGS ( and ) + +8. (This fetches test material and compiles it, based on build.xml files in the test directories) + +9. (When you defined BUILD_LIST to point to a directory in openjdk-tests/external, then this is a testCaseName from the playlist.xml file within the directory you chose) \ No newline at end of file diff --git a/external/jacoco/dockerfile/Dockerfile b/external/jacoco/dockerfile/Dockerfile deleted file mode 100644 index b9f3e2199e..0000000000 --- a/external/jacoco/dockerfile/Dockerfile +++ /dev/null @@ -1,51 +0,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. - -# This Dockerfile in external/jacoco/dockerfile dir is used to create an image with -# AdoptOpenJDK jdk binary installed. Basic test dependent executions -# are installed during the building process. -# -# Build example: `docker build -t adoptopenjdk-jacoco-test -f Dockerfile ../.` -# -# This Dockerfile builds image based on adoptopenjdk/openjdk8:latest. -# If you want to build image based on other images, please use -# `--build-arg list` to specify your base image -# -# Build example: `docker build --build-arg IMAGE_NAME= --build-arg IMAGE_VERSION=-t adoptopenjdk-jacoco-test .` - - -ARG SDK=openjdk8 -ARG IMAGE_NAME=adoptopenjdk/$SDK -ARG IMAGE_VERSION=nightly - -FROM $IMAGE_NAME:$IMAGE_VERSION - -# Install test dependent executable files -RUN apt-get update \ - && apt-get -y install \ - maven \ - git \ - wget \ - ; \ - rm -rf /var/lib/apt/lists/* - -ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" -ENV MODE="java" - -COPY ./dockerfile/jacoco-test.sh /jacoco-test.sh -RUN mkdir testResults -WORKDIR / -RUN pwd -RUN git clone https://github.com/jacoco/jacoco.git - -ENTRYPOINT ["/bin/bash", "/jacoco-test.sh"] -CMD ["$MODE"] \ No newline at end of file diff --git a/external/jacoco/dockerfile/jacoco-test.sh b/external/jacoco/dockerfile/jacoco-test.sh index 0b82302163..ef84a3165a 100644 --- a/external/jacoco/dockerfile/jacoco-test.sh +++ b/external/jacoco/dockerfile/jacoco-test.sh @@ -48,4 +48,6 @@ echo "Build jacoco completed" find ./ -type d -name 'surefire-reports' -exec cp -r "{}" /testResults \; echo "Test results copied" -exit $test_exit_code \ No newline at end of file +exit $test_exit_code + + \ No newline at end of file diff --git a/external/jacoco/test.properties b/external/jacoco/test.properties new file mode 100644 index 0000000000..89b39e96dc --- /dev/null +++ b/external/jacoco/test.properties @@ -0,0 +1,14 @@ +github_url="https://github.com/jacoco/jacoco.git" + script="jacoco-test.sh" + test_results="testResults" + tag_version="master" + environment_variable="MODE=\"java\"" + debian_packages="git maven" + debianslim_packages="${debian_packages}" + ubuntu_packages="${debian_packages}" + alpine_packages="git maven" + centos_packages="git maven" + clefos_packages="${centos_packages}" + ubi_packages="git maven" + ubi_minimal_packages="${ubi_packages}" + ;; \ No newline at end of file From fe314448224e44bb3f307b8ba1df677cd7399a90 Mon Sep 17 00:00:00 2001 From: Marina Date: Sun, 25 Apr 2021 13:27:44 +0100 Subject: [PATCH 2/4] fix for minor issues --- external/jacoco/README.md | 4 ++-- external/jacoco/dockerfile/jacoco-test.sh | 4 +--- external/jacoco/test.properties | 25 +++++++++++------------ 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/external/jacoco/README.md b/external/jacoco/README.md index d26fb5cfcc..be08c245cc 100644 --- a/external/jacoco/README.md +++ b/external/jacoco/README.md @@ -1,7 +1,7 @@ -Running External tests locally +Running External Jacoco tests locally To run any AQA tests locally, you follow the same pattern: - Ensure your test machine is set up with test prereqs. For external tests, you do need Docker installed. + Ensure your test machine is set up with [test prereqs](https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/doc/Prerequisites.md). For external tests, you do need Docker installed. 1. Download/unpack the SDK that you want to test to your test machine diff --git a/external/jacoco/dockerfile/jacoco-test.sh b/external/jacoco/dockerfile/jacoco-test.sh index ef84a3165a..0b82302163 100644 --- a/external/jacoco/dockerfile/jacoco-test.sh +++ b/external/jacoco/dockerfile/jacoco-test.sh @@ -48,6 +48,4 @@ echo "Build jacoco completed" find ./ -type d -name 'surefire-reports' -exec cp -r "{}" /testResults \; echo "Test results copied" -exit $test_exit_code - - \ No newline at end of file +exit $test_exit_code \ No newline at end of file diff --git a/external/jacoco/test.properties b/external/jacoco/test.properties index 89b39e96dc..e72a573bb4 100644 --- a/external/jacoco/test.properties +++ b/external/jacoco/test.properties @@ -1,14 +1,13 @@ github_url="https://github.com/jacoco/jacoco.git" - script="jacoco-test.sh" - test_results="testResults" - tag_version="master" - environment_variable="MODE=\"java\"" - debian_packages="git maven" - debianslim_packages="${debian_packages}" - ubuntu_packages="${debian_packages}" - alpine_packages="git maven" - centos_packages="git maven" - clefos_packages="${centos_packages}" - ubi_packages="git maven" - ubi_minimal_packages="${ubi_packages}" - ;; \ No newline at end of file +script="jacoco-test.sh" +test_results="testResults" +tag_version="master" +environment_variable="MODE=\"java\"" +debian_packages="git maven" +debianslim_packages="${debian_packages}" +ubuntu_packages="${debian_packages}" +alpine_packages="git maven" +centos_packages="git maven" +clefos_packages="${centos_packages}" +ubi_packages="git maven" +ubi_minimal_packages="${ubi_packages}" \ No newline at end of file From 121c9db34e65bfa12570e112799cf40785f13435 Mon Sep 17 00:00:00 2001 From: Marina Date: Tue, 27 Apr 2021 17:18:46 +0100 Subject: [PATCH 3/4] add describtion, change the layout --- external/jacoco/README.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/external/jacoco/README.md b/external/jacoco/README.md index be08c245cc..ee71c57e20 100644 --- a/external/jacoco/README.md +++ b/external/jacoco/README.md @@ -1,22 +1,22 @@ -Running External Jacoco tests locally - To run any AQA tests locally, you follow the same pattern: +##External Jacoco Tests - Ensure your test machine is set up with [test prereqs](https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/doc/Prerequisites.md). For external tests, you do need Docker installed. +Jacoco tests are part of the external third-party application tests that help verify that the Adoptium binaries are good, by running a variety of Java applications inside of Docker containers. AdoptOpenJDK/openjdk-tests/Issue #172 lists the applications that we have initially targeted to best exercise the AdoptOpenJDK binaries. For each application, we choose to run a selection of their functional tests. +Jacoco test material is pulled from the [Jacoco repository](https://github.com/jacoco/jacoco). -1. Download/unpack the SDK that you want to test to your test machine - -2. export TEST_JDK_HOME= - -3. git clone https://github.com/AdoptOpenJDK/openjdk-tests.git - -4. cd openjdk-tests - -5. ./get.sh +##Running External Jacoco tests locally +To run any AQA tests locally, you follow the same pattern: -6. cd TKG - -7. export required environment variables, BUILD_LIST and EXTRA_DOCKER_ARGS ( and ) - -8. (This fetches test material and compiles it, based on build.xml files in the test directories) - -9. (When you defined BUILD_LIST to point to a directory in openjdk-tests/external, then this is a testCaseName from the playlist.xml file within the directory you chose) \ No newline at end of file +0. Ensure your test machine is set up with [test prereqs](https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/doc/Prerequisites.md). For external tests, you do need Docker installed. +1. Download/unpack the SDK that you want to test to your test machine +1. `export TEST_JDK_HOME=` +1. `git clone https://github.com/AdoptOpenJDK/openjdk-tests.git` +1. `cd openjdk-tests` +1. `./get.sh` +1. `cd TKG` +1. export required environment variables, BUILD_LIST and EXTRA_DOCKER_ARGS (`export BUILD_LIST=external/jacoco> and `, and TARGET=`` + +These tests run regularly and results can be found in [TRSS Third Party Application view](https://trss.adoptopenjdk.net/ThirdPartyAppView). \ No newline at end of file From b9094883704df0ec9bbdf5bf203abd610400b082 Mon Sep 17 00:00:00 2001 From: Marina Date: Wed, 28 Apr 2021 17:21:46 +0100 Subject: [PATCH 4/4] fix for the minor issues in readme --- external/jacoco/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/jacoco/README.md b/external/jacoco/README.md index ee71c57e20..72d1996f3c 100644 --- a/external/jacoco/README.md +++ b/external/jacoco/README.md @@ -1,9 +1,9 @@ -##External Jacoco Tests +## External Jacoco Tests Jacoco tests are part of the external third-party application tests that help verify that the Adoptium binaries are good, by running a variety of Java applications inside of Docker containers. AdoptOpenJDK/openjdk-tests/Issue #172 lists the applications that we have initially targeted to best exercise the AdoptOpenJDK binaries. For each application, we choose to run a selection of their functional tests. Jacoco test material is pulled from the [Jacoco repository](https://github.com/jacoco/jacoco). -##Running External Jacoco tests locally +## Running External Jacoco 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/AdoptOpenJDK/openjdk-tests/blob/master/doc/Prerequisites.md). For external tests, you do need Docker installed.