Implement CI with TMT

This commit is contained in:
Takao Fujiwara 2024-09-01 09:39:09 +09:00
parent 45692bb99b
commit 2db441eb93
4 changed files with 36 additions and 0 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

5
plans/test.fmf Normal file
View File

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

View File

@ -0,0 +1,6 @@
summary: Lint check for annotation files
test: ./test.sh
framework: beakerlib
require:
- cldr-emoji-annotation
- libxml2

24
tests/validation/test.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
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