Update CI tests to use tmt tool

This commit is contained in:
Parag Nemade 2024-07-29 14:56:08 +05:30
parent da7877f4f3
commit 47abfe15d2
No known key found for this signature in database
GPG Key ID: 71932951EB71E972
8 changed files with 36 additions and 15 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

5
plans/hunspell-mr.fmf Normal file
View File

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

6
tests/main.fmf Normal file
View File

@ -0,0 +1,6 @@
test: ./run_tests.sh
duration: 10m
framework: beakerlib
require:
- python3-enchant
- hunspell-mr

24
tests/run_tests.sh Executable file
View File

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

View File

@ -1,4 +0,0 @@
#!/bin/bash
python3 test_suggest_words.py
python3 test_dic_availability.py

View File

@ -1,11 +0,0 @@
- hosts: localhost
roles:
- role: standard-test-basic
required_packages:
- python3-enchant
tags:
- classic
tests:
- sample:
dir: scripts/
run: ./run_tests.sh