Backport tests from Fedora

This commit is contained in:
Mikolaj Izdebski 2024-07-02 11:42:25 +02:00
parent 12226cc86c
commit 082d6e81ba
5 changed files with 35 additions and 20 deletions

View File

@ -1,24 +1,5 @@
summary: Basic smoke test summary: Basic smoke test
prepare:
- how: install
package:
- java-11-openjdk-devel
- xmvn-tools
- mvn(jakarta.activation:jakarta.activation-api)
- mvn(jakarta.xml.bind:jakarta.xml.bind-api)
- mvn(com.sun.istack:istack-commons-runtime)
discover: discover:
how: shell how: fmf
tests:
- name: /smoke/marshal-unmarshal
test: |
CLASSPATH+=":$(xmvn-resolve jakarta.activation:jakarta.activation-api)"
CLASSPATH+=":$(xmvn-resolve jakarta.xml.bind:jakarta.xml.bind-api)"
CLASSPATH+=":$(xmvn-resolve com.sun.istack:istack-commons-runtime)"
CLASSPATH+=":$(xmvn-resolve org.glassfish.jaxb:jaxb-runtime)"
CLASSPATH+=":$(xmvn-resolve org.glassfish.jaxb:jaxb-core)"
export CLASSPATH
/usr/lib/jvm/java-11-openjdk/bin/javac plans/Smoke.java
/usr/lib/jvm/java-11-openjdk/bin/java -cp "${CLASSPATH}:plans" Smoke
execute: execute:
how: tmt how: tmt

View File

@ -0,0 +1,10 @@
summary: jaxb smoke test
description: |
Test basic functionality of jaxb.
require:
- jaxb-runtime
- java-21-openjdk-devel
- xmvn-tools
- mvn(jakarta.activation:jakarta.activation-api)
- mvn(jakarta.xml.bind:jakarta.xml.bind-api)
- mvn(com.sun.istack:istack-commons-runtime)

19
tests/Sanity/smoke/runtest.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# Author: Marian Koncek <mkoncek@redhat.com>
. /usr/share/beakerlib/beakerlib.sh
rlJournalStart
rlPhaseStartTest "compile Smoke.java and run it"
CLASSPATH+=":$(xmvn-resolve jakarta.activation:jakarta.activation-api)"
CLASSPATH+=":$(xmvn-resolve jakarta.xml.bind:jakarta.xml.bind-api)"
CLASSPATH+=":$(xmvn-resolve com.sun.istack:istack-commons-runtime)"
CLASSPATH+=":$(xmvn-resolve org.glassfish.jaxb:jaxb-runtime)"
CLASSPATH+=":$(xmvn-resolve org.glassfish.jaxb:jaxb-core)"
export CLASSPATH
rlRun "/usr/lib/jvm/java-21-openjdk/bin/javac Smoke.java"
rlRun "/usr/lib/jvm/java-21-openjdk/bin/java -cp \"${CLASSPATH}:plans\" Smoke"
rlPhaseEnd
rlJournalEnd
rlJournalPrintText

5
tests/main.fmf Normal file
View File

@ -0,0 +1,5 @@
contact: Marian Koncek <mkoncek@redhat.com>
framework: beakerlib
test: ./runtest.sh
tier: 0
component: jaxb