ci: Use tmt based test cases

Resolves: RHELMISC-5979
This commit is contained in:
Akira TAGOH 2024-07-25 16:39:04 +09:00
parent 5f094b20f9
commit 0c0f1b4422
5 changed files with 35 additions and 12 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

5
plans/basic.fmf Normal file
View File

@ -0,0 +1,5 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

6
tests/basic/main.fmf Normal file
View File

@ -0,0 +1,6 @@
summary: Basic test
require:
- xorg-x11-server-Xvfb
- kasumi-unicode
test: ./test.sh
framework: beakerlib

23
tests/basic/test.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
basedir=$(pwd)
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartSetup
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
rlRun "pushd $tmp"
rlRun "set -o pipefail"
rlPhaseEnd
rlPhaseStartTest
rlRun "python3 $basedir/test.py" 0 "Check kasumi"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $tmp" 0 "Remove tmp directory"
rlPhaseEnd
rlJournalEnd

View File

@ -1,12 +0,0 @@
- hosts: localhost
become: yes
roles:
- role: standard-test-basic
tags:
- classic
required_packages:
- xorg-x11-server-Xvfb
- kasumi-unicode
tests:
- basic:
run: ./test.py