From 8fd47af233a038a00ba1f9994e2e265109aa8ad0 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 2 Jul 2024 11:36:04 +0200 Subject: [PATCH] Backport tests from Fedora --- plans/smoke.fmf | 6 +----- tests/Sanity/smoke/main.fmf | 5 +++++ tests/Sanity/smoke/runtest.sh | 18 ++++++++++++++++++ tests/main.fmf | 4 ++++ 4 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 tests/Sanity/smoke/main.fmf create mode 100755 tests/Sanity/smoke/runtest.sh create mode 100644 tests/main.fmf diff --git a/plans/smoke.fmf b/plans/smoke.fmf index ef8082f..a1e7bfd 100644 --- a/plans/smoke.fmf +++ b/plans/smoke.fmf @@ -1,9 +1,5 @@ summary: Basic smoke test discover: - how: shell - tests: - - name: /smoke/help - test: | - jflex --help + how: fmf execute: how: tmt diff --git a/tests/Sanity/smoke/main.fmf b/tests/Sanity/smoke/main.fmf new file mode 100644 index 0000000..c2f2658 --- /dev/null +++ b/tests/Sanity/smoke/main.fmf @@ -0,0 +1,5 @@ +summary: jflex smoke test +description: | + Test basic functionality of jflex. +require: + - jflex diff --git a/tests/Sanity/smoke/runtest.sh b/tests/Sanity/smoke/runtest.sh new file mode 100755 index 0000000..2ece691 --- /dev/null +++ b/tests/Sanity/smoke/runtest.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Author: Mikolaj Izdebski +. /usr/share/beakerlib/beakerlib.sh + +rlJournalStart + + rlPhaseStartTest "check for presence of jflex command" + rlAssertRpm jflex + rlAssertBinaryOrigin jflex jflex + rlPhaseEnd + + rlPhaseStartTest "display jflex version" + rlRun -s "jflex --version" + rlAssertGrep "This is JFlex" $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