Skip to content

Commit

Permalink
Add all the test targets
Browse files Browse the repository at this point in the history
  • Loading branch information
jolynch committed Apr 12, 2024
1 parent 12147f8 commit e15a409
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
33 changes: 32 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,38 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
java: [ '8', '11']
java: ['8', '11', '17', '21']
steps:
- uses: actions/checkout@v2
- name: "Set nproc limits to control threads"
run: |
sudo prlimit --pid $$ --nofile=32768:32768 --nproc=32768:32768
ulimit -n -u
- name: "Setup python for tox"
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: "Install tox for test suite"
run: pip install tox
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: |
8
${{ matrix.java }}
- name: "Build jvmquake .so with Java 8"
run: JAVA_HOME=$JAVA_HOME_8_X64 make -C src
- name: Build jvmquake tests against JVM ${{ matrix.java }}
run: env | grep JAVA && make -C tests
- name: Run jvmquake tests against JVM ${{ matrix.java }}
env:
JAVA_MAJOR_VERSION: ${{ matrix.java }}
run: tox -e test,test_jvm
ubuntu-bionic:
runs-on: ubuntu-20.04
strategy:
matrix:
java: ['8', '11', '17', '21']
steps:
- uses: actions/checkout@v2
- name: "Set nproc limits to control threads"
Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@ test_jammy_openjdk11: JAVA_VERSION=11
test_jammy_openjdk11: TEST_NAME=test_jammy_openjdk11
test_jammy_openjdk11: test_ubuntu_with_openjdk

test_jammy_openjdk17: UBUNTU_VERSION=22.04
test_jammy_openjdk17: JAVA_VERSION=17
test_jammy_openjdk17: TEST_NAME=test_jammy_openjdk17
test_jammy_openjdk17: test_ubuntu_with_openjdk

test_jammy_openjdk21: UBUNTU_VERSION=22.04
test_jammy_openjdk21: JAVA_VERSION=17
test_jammy_openjdk21: TEST_NAME=test_jammy_openjdk17
test_jammy_openjdk21: test_ubuntu_with_openjdk


test_ubuntu_with_openjdk: build_deb_in_docker
docker build -f dockerfiles/test/Dockerfile.ubuntu --build-arg UBUNTU_VERSION=$(UBUNTU_VERSION) --build-arg JAVA_VERSION=$(JAVA_VERSION) . -t jolynch/jvmquake:$(TEST_NAME)
docker build -f dockerfiles/test/Dockerfile.ubuntu.minimal --build-arg UBUNTU_VERSION=$(UBUNTU_VERSION) --build-arg JAVA_VERSION=$(JAVA_VERSION) . -t jolynch/jvmquake:$(TEST_NAME)_minimal
Expand Down
6 changes: 4 additions & 2 deletions tests/test_java_opts.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,21 @@ def test_jvm_g1_slow_death_oom():
with (pytest.raises(plumbum.commands.processes.ProcessTimedOut)):
g1_slow_death.run(retcode=3, timeout=10)

@pytest.mark.skip(reason="ZGC just ooms immediately")
def test_jvm_zgc_slow_death_oom():
"""
Executes a program which over time does way more GC than actual execution
In this case -XX:GCTimeLimit and -XX:GCHeapFreeLimit do squat for ZGC
"""
if JAVA_MAJOR_VERSION < 15:
print(f"ZGC is not available on {JAVA_MAJOR_VERSION} < 14")
if JAVA_MAJOR_VERSION < 21:
print(f"ZGC+generation is not available on {JAVA_MAJOR_VERSION} < 21")
return

zgc_slow_death = java_cmd[
'-Xmx100m',
'-XX:+UseZGC',
'-XX:+ZGenerational',
'-XX:GCTimeLimit=20',
'-XX:GCHeapFreeLimit=80',
'-cp', class_path,
Expand Down

0 comments on commit e15a409

Please sign in to comment.