diff options
author | Younes Manton <ymanton@ca.ibm.com> | 2022-08-25 07:17:06 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2022-08-29 00:34:33 +0300 |
commit | 1ba1c39de4adc34f84cf05303bff201fd6f0fcda (patch) | |
tree | 41c87791645f6ce5589d5f21b387feac3f5f7e04 | |
parent | 8556d83e8e659cd20eb70f4d010af61949fb177e (diff) |
ci: Clean up and improve Java testing
This patch changes top-level OpenJ9 filename and data references to Java
to make them generic and launches tests against both HotSpot and OpenJ9
JVMs.
Signed-off-by: Younes Manton <ymanton@ca.ibm.com>
-rw-r--r-- | .github/workflows/java-test.yml (renamed from .github/workflows/openj9-test.yml) | 6 | ||||
-rw-r--r-- | scripts/ci/Makefile | 4 | ||||
-rwxr-xr-x | scripts/ci/java-test.sh | 25 | ||||
-rwxr-xr-x | scripts/ci/openj9-test.sh | 20 |
4 files changed, 30 insertions, 25 deletions
diff --git a/.github/workflows/openj9-test.yml b/.github/workflows/java-test.yml index 1d7a1eb6b..211953495 100644 --- a/.github/workflows/openj9-test.yml +++ b/.github/workflows/java-test.yml @@ -1,4 +1,4 @@ -name: OpenJ9 Test +name: Java Test on: [push, pull_request] @@ -7,5 +7,5 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - - name: Run OpenJ9 Test - run: sudo make -C scripts/ci openj9-test + - name: Run Java Test + run: sudo make -C scripts/ci java-test diff --git a/scripts/ci/Makefile b/scripts/ci/Makefile index 120f561e4..3a1634fb8 100644 --- a/scripts/ci/Makefile +++ b/scripts/ci/Makefile @@ -85,8 +85,8 @@ podman-test: # overlayfs behaves differently on Ubuntu and breaks CRIU # https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1857257 # Switch to devicemapper -openj9-test: restart-docker - ./openj9-test.sh +java-test: restart-docker + ./java-test.sh setup-vagrant: ./vagrant.sh setup diff --git a/scripts/ci/java-test.sh b/scripts/ci/java-test.sh new file mode 100755 index 000000000..7cf704f07 --- /dev/null +++ b/scripts/ci/java-test.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +cd ../.. || exit 1 + +failures="" + +docker build -t criu-openj9-ubuntu-test:latest -f scripts/build/Dockerfile.openj9-ubuntu . +if ! docker run --rm --privileged criu-openj9-ubuntu-test:latest; then + failures="$failures openj9-ubuntu" +fi + +docker build -t criu-hotspot-alpine-test:latest -f scripts/build/Dockerfile.hotspot-alpine . +if ! docker run --rm --privileged criu-hotspot-alpine-test:latest; then + failures="$failures hotspot-alpine" +fi + +docker build -t criu-hotspot-ubuntu-test:latest -f scripts/build/Dockerfile.hotspot-ubuntu . +if ! docker run --rm --privileged criu-hotspot-ubuntu-test:latest; then + failures="$failures hotspot-ubuntu" +fi + +if [ -n "$failures" ]; then + echo "Tests failed on $failures" + exit 1 +fi diff --git a/scripts/ci/openj9-test.sh b/scripts/ci/openj9-test.sh deleted file mode 100755 index b8c07f180..000000000 --- a/scripts/ci/openj9-test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -cd ../.. || exit 1 - -failures="" - -docker build -t criu-openj9-ubuntu-test:latest -f scripts/build/Dockerfile.openj9-ubuntu . -if ! docker run --rm --privileged criu-openj9-ubuntu-test:latest; then - failures="$failures ubuntu" -fi - -docker build -t criu-openj9-alpine-test:latest -f scripts/build/Dockerfile.openj9-alpine . -if ! docker run --rm --privileged criu-openj9-alpine-test:latest; then - failures="$failures alpine" -fi - -if [ -n "$failures" ]; then - echo "Tests failed on $failures" - exit 1 -fi |