diff options
author | Peng Wu <pwu@redhat.com> | 2020-02-19 16:25:10 +0800 |
---|---|---|
committer | Peng Wu <pwu@redhat.com> | 2020-02-19 16:38:53 +0800 |
commit | 712b0677f196e7ed6b13ff6050db080afd2efca8 (patch) | |
tree | f7b76dab9fb511a4615969193189b445d731381a | |
parent | fe036d04c3c56904ceb020eb3793434170eb3d2b (diff) | |
download | ibus-hangul-712b0677f196e7ed6b13ff6050db080afd2efca8.tar.gz |
Write runtest script
-rw-r--r-- | ibus-hangul.spec.in | 3 | ||||
-rw-r--r-- | tests/Makefile.am | 6 | ||||
-rwxr-xr-x | tests/runtest | 25 |
3 files changed, 32 insertions, 2 deletions
diff --git a/ibus-hangul.spec.in b/ibus-hangul.spec.in index f6c86fc..3281a16 100644 --- a/ibus-hangul.spec.in +++ b/ibus-hangul.spec.in @@ -36,6 +36,9 @@ make DESTDIR=${RPM_BUILD_ROOT} install %find_lang %{name} +%check +make check DISABLE_GUI_TESTS=ibus-hangul + %clean rm -rf $RPM_BUILD_ROOT diff --git a/tests/Makefile.am b/tests/Makefile.am index a32a780..59339aa 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -24,7 +24,7 @@ TESTS = \ CLEANFILES = $(test_metas) -EXTRA_DIST = $(test_metas_in) +EXTRA_DIST = $(test_metas_in) runtest noinst_PROGRAMS = $(TESTS) @@ -37,9 +37,11 @@ TESTS_ENVIRONMENT = \ DISABLE_GUI_TESTS="$(DISABLE_GUI_TESTS)" \ $(NULL) +LOG_COMPILER = $(srcdir)/runtest +test_metas_in = meta.test.in + if ENABLE_INSTALLED_TESTS test_execs = ibus-hangul -test_metas_in = meta.test.in test_metas = $(addsuffix .test, $(test_execs)) test_sources_DATA = $(test_metas) test_sourcesdir = $(datadir)/installed-tests/ibus-hangul diff --git a/tests/runtest b/tests/runtest new file mode 100755 index 0000000..24d3f7b --- /dev/null +++ b/tests/runtest @@ -0,0 +1,25 @@ +#!/bin/bash + +: ${top_builddir:=../..} +: ${top_srcdir:=../..} +: ${builddir:=.} +: ${srcdir:=.} +: ${DISABLE_GUI_TESTS:=''} + +ibus-daemon --xim --panel disable --config disable & +sleep 30 + +tst=$1 + +for t in $DISABLE_GUI_TESTS; do + if test $t = `basename $tst`; then + exit 77 + fi +done + +$builddir/$tst +retval=$? + +ibus exit + +exit $retval |