Backport tests from Fedora

This commit is contained in:
Mikolaj Izdebski 2024-07-02 11:35:59 +02:00
parent e7c9a1132a
commit a3a0d7713d
5 changed files with 29 additions and 10 deletions

View File

@ -1,14 +1,5 @@
summary: Basic smoke test
discover:
how: shell
tests:
- name: /smoke/log-events
test: |
PATH=/usr/lib/jvm/java-1.8.0-openjdk/bin:${PATH}
javac -cp /usr/share/java/disruptor.jar plans/Smoke.java
java -cp /usr/share/java/disruptor.jar:plans Smoke
prepare:
how: install
package: java-1.8.0-openjdk-devel
how: fmf
execute:
how: tmt

View File

@ -0,0 +1,6 @@
summary: disruptor smoke test
description: |
Test basic functionality of disruptor.
require:
- disruptor
- java-21-openjdk-devel

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

@ -0,0 +1,18 @@
#!/bin/bash
# Author: Mikolaj Izdebski <mizdebsk@redhat.com>
. /usr/share/beakerlib/beakerlib.sh
rlJournalStart
rlPhaseStartTest "log events"
rlAssertRpm disruptor
java_home=/usr/lib/jvm/java-21-openjdk/bin
jar=/usr/share/java/disruptor.jar
rlRun "${java_home}/javac -cp ${jar} -d bin Smoke.java"
rlRun -s "${java_home}/java -cp ${jar}:bin Smoke"
rlAssertGrep "Event: LongEvent" $rlRun_LOG
rlAssertGrep "SMOKE TEST COMPLETE" $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