Backport tests from Fedora

This commit is contained in:
Mikolaj Izdebski 2024-07-02 11:36:04 +02:00
parent 1bee39c572
commit 8fd47af233
4 changed files with 28 additions and 5 deletions

View File

@ -1,9 +1,5 @@
summary: Basic smoke test
discover:
how: shell
tests:
- name: /smoke/help
test: |
jflex --help
how: fmf
execute:
how: tmt

View File

@ -0,0 +1,5 @@
summary: jflex smoke test
description: |
Test basic functionality of jflex.
require:
- jflex

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 "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

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