From 99900b1e0d41c4892a7517e137b4e6c86f3dd62f Mon Sep 17 00:00:00 2001 From: Mike FABIAN Date: Tue, 18 May 2021 17:02:22 +0200 Subject: [PATCH] Related: rhbz#1974653 Improve CI tests --- tests/smoke/runtest.sh | 211 +++++++++++++++++++++++++++++++++++++++-- tests/tests.yml | 2 + 2 files changed, 206 insertions(+), 7 deletions(-) diff --git a/tests/smoke/runtest.sh b/tests/smoke/runtest.sh index 2718883..48a3400 100644 --- a/tests/smoke/runtest.sh +++ b/tests/smoke/runtest.sh @@ -1,10 +1,207 @@ #!/bin/bash -cd ../source -echo "---Start autogen.sh---" -NOCONFIGURE=1 ./autogen.sh -echo "---End autogen.sh---" -echo "--------------------" +FAIL_COUNTER=0 + +check_pkg() { + local pkg=$1 + if rpm -q $pkg + then + echo "PASS" + else + echo "FAIL" + let "FAIL_COUNTER=FAIL_COUNTER+1" + fi +} + +check_return_value () { + if [ $1 == 0 ] + then + echo "PASS" + else + echo "FAIL" + let "FAIL_COUNTER=FAIL_COUNTER+1" + fi +} + +pushd ../source + + echo "---Start autogen.sh---" + NOCONFIGURE=1 ./autogen.sh + echo "---End autogen.sh---" + echo "--------------------" + + ./configure --disable-static --with-gtk=3.0 + make check + check_return_value $? +popd + +check_pkg "ibus" +check_pkg "m17n-db" + +ibus-daemon -v -r -d +check_return_value $? + +echo "give ibus-daemon some time to start properly." +sleep 5 + +for name in \ + am:sera \ + ar:kbd \ + ar:translit \ + as:inscript \ + as:inscript2 \ + as:itrans \ + as:phonetic \ + ath:phonetic \ + bla:phonetic \ + bn:disha \ + bn:inscript \ + bn:inscript2 \ + bn:itrans \ + bn:probhat \ + bo:ewts \ + bo:tcrc \ + bo:wylie \ + brx:inscript2 \ + cr:western \ + da:post \ + doi:inscript2 \ + dv:phonetic \ + eo:h-fundamente \ + eo:h-sistemo \ + eo:plena \ + eo:q-sistemo \ + eo:vi-sistemo \ + eo:x-sistemo \ + fa:isiri \ + fr:azerty \ + grc:mizuochi \ + gu:inscript \ + gu:inscript2 \ + gu:itrans \ + gu:phonetic \ + hi:inscript \ + hi:inscript2 \ + hi:itrans \ + hi:optitransv2 \ + hi:phonetic \ + hi:remington \ + hi:typewriter \ + hi:vedmata \ + hu:rovas-post \ + ii:phonetic \ + iu:phonetic \ + kk:arabic \ + km:yannis \ + kn:inscript \ + kn:inscript2 \ + kn:itrans \ + kn:kgp \ + kn:optitransv2 \ + kn:typewriter \ + kok:inscript2 \ + ks:inscript \ + ks:kbd \ + lo:lrt \ + mai:inscript \ + mai:inscript2 \ + ml:enhanced-inscript \ + ml:inscript \ + ml:inscript2 \ + ml:itrans \ + ml:mozhi \ + ml:remington \ + ml:swanalekha \ + mni:inscript2-beng \ + mni:inscript2-mtei \ + mr:inscript \ + mr:inscript2 \ + mr:itrans \ + mr:phonetic \ + mr:remington \ + mr:typewriter \ + ne:inscript2 \ + ne:rom \ + ne:rom-translit \ + ne:trad \ + ne:trad-ttf \ + nsk:phonetic \ + oj:phonetic \ + or:inscript \ + or:inscript2 \ + or:itrans \ + or:phonetic \ + pa:anmollipi \ + pa:inscript \ + pa:inscript2 \ + pa:itrans \ + pa:jhelum \ + pa:phonetic \ + ps:phonetic \ + ru:phonetic \ + ru:translit \ + ru:yawerty \ + sa:IAST \ + sa:harvard-kyoto \ + sa:inscript2 \ + sa:itrans \ + sat:inscript2-deva \ + sat:inscript2-olck \ + sd:inscript \ + sd:inscript2 \ + si:phonetic-dynamic \ + si:samanala \ + si:sayura \ + si:singlish \ + si:sumihiri \ + si:transliteration \ + si:wijesekera \ + sv:post \ + t:latn-post \ + t:latn-pre \ + t:latn1-pre \ + t:lsymbol \ + t:math-latex \ + t:rfc1345 \ + t:ssymbol \ + t:syrc-phonetic \ + t:unicode \ + ta:inscript \ + ta:inscript2 \ + ta:itrans \ + ta:lk-renganathan \ + ta:phonetic \ + ta:tamil99 \ + ta:typewriter \ + ta:vutam \ + tai:sonla-kbd \ + te:apple \ + te:inscript \ + te:inscript2 \ + te:itrans \ + te:pothana \ + te:rts \ + te:sarala \ + th:kesmanee \ + th:pattachote \ + th:tis820 \ + ur:phonetic \ + vi:han \ + vi:nomtelex \ + vi:nomvni \ + vi:tcvn \ + vi:telex \ + vi:viqr \ + vi:vni \ + yi:yivo +do + echo "checking whether 'ibus-engine-m17n --xml' can list m17n:${name}:" + /usr/libexec/ibus-engine-m17n --xml 2>/dev/null | grep "m17n:${name}" + check_return_value $? + echo "checking whether ibus can list m17n:${name}:" + ibus list-engine --name-only | grep "m17n:${name}$" + check_return_value $? +done + +exit ${FAIL_COUNTER} -./configure --disable-static --with-gtk=3.0 -make check diff --git a/tests/tests.yml b/tests/tests.yml index 05b064e..65a5bc9 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -19,8 +19,10 @@ - autoconf - automake - gettext-devel + - ibus - ibus-devel - gtk3-devel - pkgconfig - libtool - m17n-lib-devel + - m17n-db