Add CI tests
This commit is contained in:
parent
bf57f9c6f8
commit
07e4080806
70
tests/scripts/run.sh
Normal file
70
tests/scripts/run.sh
Normal file
@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
|
||||
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_pkg "ibus"
|
||||
check_pkg "ibus-table"
|
||||
check_pkg "ibus-table-code"
|
||||
check_pkg "ibus-table-cyrillic"
|
||||
check_pkg "ibus-table-latin"
|
||||
check_pkg "ibus-table-translit"
|
||||
check_pkg "ibus-table-tv"
|
||||
check_pkg "ibus-table-mathwriter"
|
||||
|
||||
echo "starting ibus-daemon."
|
||||
|
||||
ibus-daemon -v -r -d
|
||||
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
echo "PASS"
|
||||
else
|
||||
echo "FAIL"
|
||||
let "FAIL_COUNTER=FAIL_COUNTER+1"
|
||||
fi
|
||||
|
||||
echo "give ibus-daemon some time to start properly."
|
||||
sleep 5
|
||||
|
||||
for name in \
|
||||
cns11643 \
|
||||
emoji-table \
|
||||
latex \
|
||||
rusle \
|
||||
rustrad \
|
||||
yawerty \
|
||||
compose \
|
||||
hu-old-hungarian-rovas \
|
||||
ipa-x-sampa \
|
||||
translit-ua \
|
||||
translit \
|
||||
telex \
|
||||
thai \
|
||||
viqr \
|
||||
vni \
|
||||
mathwriter-ibus
|
||||
do
|
||||
echo "checking whether ibus can list ${name}:"
|
||||
ibus list-engine --name-only | grep "table:${name}"
|
||||
if [ $? == 0 ]
|
||||
then
|
||||
echo "PASS"
|
||||
else
|
||||
echo "FAIL"
|
||||
let "FAIL_COUNTER=FAIL_COUNTER+1"
|
||||
fi
|
||||
done
|
||||
|
||||
exit ${FAIL_COUNTER}
|
18
tests/tests.yml
Normal file
18
tests/tests.yml
Normal file
@ -0,0 +1,18 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
required_packages:
|
||||
- ibus
|
||||
- ibus-table
|
||||
- ibus-table-code
|
||||
- ibus-table-cyrillic
|
||||
- ibus-table-latin
|
||||
- ibus-table-translit
|
||||
- ibus-table-tv
|
||||
- ibus-table-mathwriter
|
||||
tests:
|
||||
- simple:
|
||||
dir: scripts
|
||||
run: bash run.sh
|
Loading…
Reference in New Issue
Block a user