diff --git a/plans/smoke.fmf b/plans/smoke.fmf index ef02451..a1e7bfd 100644 --- a/plans/smoke.fmf +++ b/plans/smoke.fmf @@ -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 diff --git a/plans/Smoke.java b/tests/Sanity/smoke/Smoke.java similarity index 100% rename from plans/Smoke.java rename to tests/Sanity/smoke/Smoke.java diff --git a/tests/Sanity/smoke/main.fmf b/tests/Sanity/smoke/main.fmf new file mode 100644 index 0000000..a551c7f --- /dev/null +++ b/tests/Sanity/smoke/main.fmf @@ -0,0 +1,6 @@ +summary: disruptor smoke test +description: | + Test basic functionality of disruptor. +require: + - disruptor + - java-21-openjdk-devel diff --git a/tests/Sanity/smoke/runtest.sh b/tests/Sanity/smoke/runtest.sh new file mode 100755 index 0000000..8116d4e --- /dev/null +++ b/tests/Sanity/smoke/runtest.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Author: Mikolaj Izdebski +. /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 diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..99fd67e --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,4 @@ +contact: Mikolaj Izdebski +framework: beakerlib +test: ./runtest.sh +tier: 0