From 03af465cee8d2bfa5d4ad5082021f5dcec9c2c28 Mon Sep 17 00:00:00 2001 From: Parag Nemade Date: Thu, 12 Sep 2024 08:29:08 +0530 Subject: [PATCH] Add tmt testcase for CI --- .fmf/version | 1 + plans/hunspell.fmf | 5 +++++ tests/{scripts => }/data.txt | 0 tests/main.fmf | 5 +++++ tests/{scripts => }/run_tests.sh | 2 +- tests/tests.yml | 12 ------------ 6 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/hunspell.fmf rename tests/{scripts => }/data.txt (100%) create mode 100644 tests/main.fmf rename tests/{scripts => }/run_tests.sh (95%) delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans/hunspell.fmf b/plans/hunspell.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/hunspell.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/scripts/data.txt b/tests/data.txt similarity index 100% rename from tests/scripts/data.txt rename to tests/data.txt diff --git a/tests/main.fmf b/tests/main.fmf new file mode 100644 index 0000000..ebec85f --- /dev/null +++ b/tests/main.fmf @@ -0,0 +1,5 @@ +require: +- hunspell +- hunspell-de +test: bash ./run_tests.sh +framework: shell diff --git a/tests/scripts/run_tests.sh b/tests/run_tests.sh similarity index 95% rename from tests/scripts/run_tests.sh rename to tests/run_tests.sh index 7b611f9..7d75074 100644 --- a/tests/scripts/run_tests.sh +++ b/tests/run_tests.sh @@ -11,7 +11,7 @@ check_pkg() { } check_dict() { - if [ -f "/usr/share/myspell/de_DE.dic" ] + if [ -f "/usr/share/hunspell/de_DE.dic" ] then echo "PASS" else diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 63054d2..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,12 +0,0 @@ -- hosts: localhost - tags: - - classic - roles: - - role: standard-test-basic - required_packages: - - hunspell - - hunspell-de - tests: - - simple: - dir: scripts - run: ./run_tests.sh