From 5a7c26edb06f1d9d260df3766e06f7845ca14eab Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 19:26:02 +0000 Subject: [PATCH 1/3] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 45692bb99b79bbd5c45c6b57f6b32aa3522f7e8d Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sun, 1 Sep 2024 09:39:05 +0900 Subject: [PATCH 2/3] Delete CI with STI CI with STI is archived in: https://src.fedoraproject.org/rpms/cldr-emoji-annotation/tree/ci-sti --- tests/runtest.sh | 13 ------------- tests/tests.yml | 16 ---------------- 2 files changed, 29 deletions(-) delete mode 100755 tests/runtest.sh delete mode 100644 tests/tests.yml diff --git a/tests/runtest.sh b/tests/runtest.sh deleted file mode 100755 index 65ac483..0000000 --- a/tests/runtest.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -for dir in annotations annotationsDerived; do - for xml in /usr/share/unicode/cldr/common/$dir/*.xml; do - echo xmllint --noout --valid --postvalid $xml - xmllint --noout --valid --postvalid $xml - if [ $? -ne 0 ] ; then - echo "ERROR" - exit 1 - fi - done -done - diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 3b0cccf..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,16 +0,0 @@ -- hosts: localhost - vars: - - artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}" - tags: - - classic - remote_user: root - roles: - - role: standard-test-basic - required_packages: - - cldr-emoji-annotation - - libxml2 - tests: - - runtest: - dir: . - run: ./runtest.sh - From 2db441eb93aa41055372ada0ace5609cb2834eb8 Mon Sep 17 00:00:00 2001 From: Takao Fujiwara Date: Sun, 1 Sep 2024 09:39:09 +0900 Subject: [PATCH 3/3] Implement CI with TMT --- .fmf/version | 1 + plans/test.fmf | 5 +++++ tests/validation/main.fmf | 6 ++++++ tests/validation/test.sh | 24 ++++++++++++++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 .fmf/version create mode 100644 plans/test.fmf create mode 100644 tests/validation/main.fmf create mode 100755 tests/validation/test.sh 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/test.fmf b/plans/test.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/test.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/tests/validation/main.fmf b/tests/validation/main.fmf new file mode 100644 index 0000000..0611cec --- /dev/null +++ b/tests/validation/main.fmf @@ -0,0 +1,6 @@ +summary: Lint check for annotation files +test: ./test.sh +framework: beakerlib +require: + - cldr-emoji-annotation + - libxml2 diff --git a/tests/validation/test.sh b/tests/validation/test.sh new file mode 100755 index 0000000..66fdc4c --- /dev/null +++ b/tests/validation/test.sh @@ -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 + +FAILED=0 +for dir in annotations annotationsDerived; do + for xml in /usr/share/unicode/cldr/common/$dir/*.xml; do + echo xmllint --noout --valid --postvalid $xml + xmllint --noout --valid --postvalid $xml + if test $? -ne 0 ; then + FAILED=1 + break + fi + done + if test $FAILED -ne 0 ; then + break + fi +done + +rlJournalStart + rlPhaseStartTest + rlAssertEquals "lint result" $FAILED 0 + rlPhaseEnd +rlJournalEnd