Backport tests from Fedora

This commit is contained in:
Mikolaj Izdebski 2024-07-02 11:36:05 +02:00
parent 059d7f7708
commit 90088ce333
6 changed files with 29 additions and 11 deletions

View File

@ -1,15 +1,5 @@
summary: Basic smoke test summary: Basic smoke test
discover: discover:
how: shell how: fmf
tests:
- name: /smoke/forktest
test: |
set -x
cd ./plans/forktest
javac -d target/test-classes ForkTest.java
xmvn -V -e -B -o surefire:test
prepare:
how: install
package: xmvn-minimal
execute: execute:
how: tmt how: tmt

View File

@ -0,0 +1,9 @@
summary: rhbz#1981486 regression test for maven-surefire
description: |
Regression test for https://bugzilla.redhat.com/show_bug.cgi?id=1981486.
Ensure that maven-surefire can execute forked JVM.
require:
- maven-surefire-plugin
- maven-surefire-provider-junit
- maven-compiler-plugin
- xmvn-minimal

View File

@ -0,0 +1,15 @@
#!/bin/bash
# Author: Mikolaj Izdebski <mizdebsk@redhat.com>
. /usr/share/beakerlib/beakerlib.sh
rlJournalStart
rlPhaseStartTest "compile and run surefire tests"
rlRun -s "xmvn -V -e -B -o compiler:testCompile surefire:test"
rlAssertGrep "Running ForkTest" $rlRun_LOG
rlAssertGrep "Tests run: 1, Failures: 0, Errors: 0, Skipped: 0" $rlRun_LOG
rlAssertGrep "BUILD SUCCESS" $rlRun_LOG
rlPhaseEnd
rlJournalEnd
rlJournalPrintText

4
tests/main.fmf Normal file
View File

@ -0,0 +1,4 @@
contact: Mikolaj Izdebski <mizdebsk@redhat.com>
framework: beakerlib
test: ./runtest.sh
tier: 0