Resolves: rhbz#1978277 Convert CI tests to tmt and add gating.yaml
This commit is contained in:
parent
aa1692ce33
commit
253d3bedcf
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
9
plans/basic.fmf
Normal file
9
plans/basic.fmf
Normal file
@ -0,0 +1,9 @@
|
||||
summary: Basic smoke test
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
prepare:
|
||||
how: shell
|
||||
script:
|
||||
- dnf config-manager --enable rhel-CRB --enable rhel-buildroot
|
12
tests/main.fmf
Normal file
12
tests/main.fmf
Normal file
@ -0,0 +1,12 @@
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
duration: 10m
|
||||
require:
|
||||
- ibus
|
||||
- ibus-table
|
||||
- ibus-table-code
|
||||
- ibus-table-cyrillic
|
||||
- ibus-table-latin
|
||||
- ibus-table-translit
|
||||
- ibus-table-tv
|
||||
- ibus-table-mathwriter
|
51
tests/runtest.sh
Executable file
51
tests/runtest.sh
Executable file
@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
|
||||
rlRun "pushd $tmp"
|
||||
rlAssertRpm "ibus"
|
||||
rlAssertRpm "ibus-table"
|
||||
rlAssertRpm "ibus-table-code"
|
||||
rlAssertRpm "ibus-table-cyrillic"
|
||||
rlAssertRpm "ibus-table-latin"
|
||||
rlAssertRpm "ibus-table-translit"
|
||||
rlAssertRpm "ibus-table-tv"
|
||||
rlAssertRpm "ibus-table-mathwriter"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "ibus-daemon -v -r -d"
|
||||
rlRun "sleep 5" 0 "Give ibus-daemon some time to start properly."
|
||||
for name in \
|
||||
cns11643 \
|
||||
emoji-table \
|
||||
latex \
|
||||
rusle \
|
||||
rustrad \
|
||||
yawerty \
|
||||
compose \
|
||||
hu-old-hungarian-rovas \
|
||||
ipa-x-sampa \
|
||||
translit-ua \
|
||||
translit \
|
||||
telex \
|
||||
thai \
|
||||
viqr \
|
||||
vni \
|
||||
mathwriter-ibus
|
||||
do
|
||||
rlRun "/usr/libexec/ibus-engine-table --xml 2>/dev/null | grep '<name>table:${name}</name>'" \
|
||||
0 "checking whether 'ibus-engine-table --xml' can list table:${name}:"
|
||||
|
||||
rlRun "ibus list-engine --name-only | grep 'table:${name}$'" \
|
||||
0 "checking whether ibus can list table:${name}:"
|
||||
done
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $tmp" 0 "Remove tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
@ -1,70 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
FAIL_COUNTER=0
|
||||
|
||||
check_pkg() {
|
||||
local pkg=$1
|
||||
if rpm -q $pkg
|
||||
then
|
||||
echo "PASS"
|
||||
else
|
||||
echo "FAIL"
|
||||
let "FAIL_COUNTER=FAIL_COUNTER+1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
check_pkg "ibus"
|
||||
check_pkg "ibus-table"
|
||||
check_pkg "ibus-table-code"
|
||||
check_pkg "ibus-table-cyrillic"
|
||||
check_pkg "ibus-table-latin"
|
||||
check_pkg "ibus-table-translit"
|
||||
check_pkg "ibus-table-tv"
|
||||
check_pkg "ibus-table-mathwriter"
|
||||
|
||||
echo "starting ibus-daemon."
|
||||
|
||||
ibus-daemon -v -r -d
|
||||
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
echo "PASS"
|
||||
else
|
||||
echo "FAIL"
|
||||
let "FAIL_COUNTER=FAIL_COUNTER+1"
|
||||
fi
|
||||
|
||||
echo "give ibus-daemon some time to start properly."
|
||||
sleep 5
|
||||
|
||||
for name in \
|
||||
cns11643 \
|
||||
emoji-table \
|
||||
latex \
|
||||
rusle \
|
||||
rustrad \
|
||||
yawerty \
|
||||
compose \
|
||||
hu-old-hungarian-rovas \
|
||||
ipa-x-sampa \
|
||||
translit-ua \
|
||||
translit \
|
||||
telex \
|
||||
thai \
|
||||
viqr \
|
||||
vni \
|
||||
mathwriter-ibus
|
||||
do
|
||||
echo "checking whether ibus can list ${name}:"
|
||||
ibus list-engine --name-only | grep "table:${name}"
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
echo "PASS"
|
||||
else
|
||||
echo "FAIL"
|
||||
let "FAIL_COUNTER=FAIL_COUNTER+1"
|
||||
fi
|
||||
done
|
||||
|
||||
exit ${FAIL_COUNTER}
|
@ -1,18 +0,0 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
required_packages:
|
||||
- ibus
|
||||
- ibus-table
|
||||
- ibus-table-code
|
||||
- ibus-table-cyrillic
|
||||
- ibus-table-latin
|
||||
- ibus-table-translit
|
||||
- ibus-table-tv
|
||||
- ibus-table-mathwriter
|
||||
tests:
|
||||
- simple:
|
||||
dir: scripts
|
||||
run: bash run.sh
|
Loading…
Reference in New Issue
Block a user