From 9f3bb60b7c6c76a64d22779c45a77502355597f4 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 18 Jul 2024 19:37:02 +0900 Subject: [PATCH] ci: Use tmt based test cases Resolves: RHELMISC-5979 --- .fmf/version | 1 + tests/basic/main.fmf | 3 +++ tests/basic/test.sh | 22 ++++++++++++++++++++++ tests/tests.yml | 14 -------------- 4 files changed, 26 insertions(+), 14 deletions(-) create mode 100644 .fmf/version create mode 100644 tests/basic/main.fmf create mode 100755 tests/basic/test.sh 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/tests/basic/main.fmf b/tests/basic/main.fmf new file mode 100644 index 0000000..d6c06ec --- /dev/null +++ b/tests/basic/main.fmf @@ -0,0 +1,3 @@ +summary: Concise summary describing what the test does +test: ./test.sh +framework: beakerlib diff --git a/tests/basic/test.sh b/tests/basic/test.sh new file mode 100755 index 0000000..10de1b4 --- /dev/null +++ b/tests/basic/test.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /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 "fc-match" 0 "Check fc-match" + rlRun "fc-list" 0 "Check fc-list" + rlRun "fc-scan /usr/share/fonts" 0 "Check fc-scan" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index d3fa1ed..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,14 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-basic - tags: - - classic - required_packages: - - fontconfig - tests: - - fcmatch_test: - dir: . - run: fc-match - - fclist_test: - dir: . - run: fc-list