parent
6580fb52ff
commit
6a4e64001a
85
tests/scripts/run.sh
Normal file
85
tests/scripts/run.sh
Normal file
@ -0,0 +1,85 @@
|
||||
#!/usr/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-chinese"
|
||||
check_pkg "ibus-table-chinese-array"
|
||||
check_pkg "ibus-table-chinese-cangjie"
|
||||
check_pkg "ibus-table-chinese-cantonese"
|
||||
check_pkg "ibus-table-chinese-cantonyale"
|
||||
check_pkg "ibus-table-chinese-easy"
|
||||
check_pkg "ibus-table-chinese-erbi"
|
||||
check_pkg "ibus-table-chinese-quick"
|
||||
check_pkg "ibus-table-chinese-scj"
|
||||
check_pkg "ibus-table-chinese-stroke5"
|
||||
check_pkg "ibus-table-chinese-wu"
|
||||
check_pkg "ibus-table-chinese-wubi-haifeng"
|
||||
check_pkg "ibus-table-chinese-wubi-jidian"
|
||||
check_pkg "ibus-table-chinese-yong"
|
||||
|
||||
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 \
|
||||
array30-big \
|
||||
array30 \
|
||||
cangjie-big \
|
||||
cangjie3 \
|
||||
cangjie5 \
|
||||
cantonese \
|
||||
cantonhk \
|
||||
cantonyale \
|
||||
easy-big \
|
||||
erbi-qs \
|
||||
erbi \
|
||||
jyutping \
|
||||
quick-classic \
|
||||
quick3 \
|
||||
quick5 \
|
||||
scj6 \
|
||||
stroke5 \
|
||||
wu \
|
||||
wubi-haifeng86 \
|
||||
wubi-jidian86 \
|
||||
yong
|
||||
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
|
||||
|
||||
ibus exit
|
||||
|
||||
exit ${FAIL_COUNTER}
|
26
tests/tests.yml
Normal file
26
tests/tests.yml
Normal file
@ -0,0 +1,26 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
required_packages:
|
||||
- ibus
|
||||
- ibus-table
|
||||
- ibus-table-chinese
|
||||
- ibus-table-chinese-array
|
||||
- ibus-table-chinese-cangjie
|
||||
- ibus-table-chinese-cantonese
|
||||
- ibus-table-chinese-cantonyale
|
||||
- ibus-table-chinese-easy
|
||||
- ibus-table-chinese-erbi
|
||||
- ibus-table-chinese-quick
|
||||
- ibus-table-chinese-scj
|
||||
- ibus-table-chinese-stroke5
|
||||
- ibus-table-chinese-wu
|
||||
- ibus-table-chinese-wubi-haifeng
|
||||
- ibus-table-chinese-wubi-jidian
|
||||
- ibus-table-chinese-yong
|
||||
tests:
|
||||
- simple:
|
||||
dir: ./scripts
|
||||
run: bash ./run.sh
|
Loading…
Reference in New Issue
Block a user