Add some CI tests

This commit is contained in:
Mike FABIAN 2019-06-25 16:50:00 +02:00
parent 5e1e5e721f
commit 35484435a0
3 changed files with 71 additions and 0 deletions

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-table/engine
for i in $@; do
python3 ${i} -v
check_return_value $?
done
popd

40
tests/tests.yml Normal file
View File

@ -0,0 +1,40 @@
- 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
- libappstream-glib
- desktop-file-utils
- python3-gobject
- python3-gobject-base
- glib2
- gtk3
- dconf
- dbus-x11
- ibus
- ibus-devel
- gcc
- python3-devel
- python3-pyxdg
- ibus-table-chinese-wubi-jidian
- ibus-table-chinese-cangjie
- ibus-table-chinese-stroke5
- ibus-table-code
- ibus-table-latin
- ibus-table-translit
tests:
- make-check:
dir: ./
run: bash ./make_check.sh ./source
- doctests-table.py:
dir: ./
run: bash ./run_python_doctests.sh table.py
- doctests-it_util.py:
dir: ./
run: bash ./run_python_doctests.sh it_util.py