2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

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>
This commit is contained in:
Younes Manton
2022-08-24 21:17:06 -07:00
committed by Andrei Vagin
parent 0178f2f990
commit 7bc24688d6
4 changed files with 30 additions and 25 deletions

View File

@@ -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

View File

@@ -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

25
scripts/ci/java-test.sh Executable file
View File

@@ -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

View File

@@ -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