Add CI tests

(doctest of itb_emoji.py is still commented out because it is too slow).
This commit is contained in:
Mike FABIAN 2019-06-06 13:44:12 +02:00
parent 12048324e9
commit 7fb77550bd
4 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1,17 @@
#!/bin/bash
set -x
check_return_value () {
if [ $1 != 0 ] ; then
exit $1
fi
}
export DISPLAY=:1
Xvfb $DISPLAY -screen 0 1024x768x16 &
/usr/bin/emoji-picker --help
check_return_value $?
/usr/bin/emoji-picker --version
check_return_value $?

15
tests/make_check.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -x
check_return_value () {
if [ $1 != 0 ] ; then
exit $1
fi
}
cd $1
./configure --prefix=/usr
check_return_value $?
make check && rc=0 || rc=1; cat tests/test-suite.log
exit $rc

16
tests/run_python_doctests.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
set -x
check_return_value () {
if [ $1 != 0 ] ; then
exit $1
fi
}
pushd /usr/share/ibus-typing-booster/engine
for i in $@; do
python3 ${i} -v
check_return_value $?
done
popd

54
tests/tests.yml Normal file
View File

@ -0,0 +1,54 @@
- hosts: localhost
vars:
- artifacts: "{{ lookup('env', 'TEST_ARTIFACTS')|default('./artifacts', true) }}"
tags:
- classic
remote_user: root
roles:
- role: standard-test-source # to get the source tar ball to do “make check”
- role: standard-test-basic
required_packages:
- make
- m17n-lib
- m17n-db-extras
- python3-enchant
- libappstream-glib
- desktop-file-utils
- python3-gobject
- python3-gobject-base
- hunspell-cs
- hunspell-de
- hunspell-en
- hunspell-es
- hunspell-fr
- hunspell-it
- hunspell-ko
- glib2
- gtk3
- dconf
- dbus-x11
- ibus
- ibus-devel
- gcc
- python3-devel
- python3-pyxdg
- xorg-x11-server-Xvfb
tests:
- make-check:
dir: ./
run: bash ./make_check.sh ./source
- doctests-hunspell_suggest.py:
dir: ./
run: bash ./run_python_doctests.sh hunspell_suggest.py
- doctests-m17n_translit.py:
dir: ./
run: bash ./run_python_doctests.sh m17n_translit.py
- doctests-itb_util.py:
dir: ./
run: bash ./run_python_doctests.sh itb_util.py
# - doctests-itb_emoji.py:
# dir: ./
# run: bash ./run_python_doctests.sh itb_emoji.py
- emoji-picker:
dir: ./
run: bash ./emoji_picker_tests.sh