summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorfujiwarat <takao.fujiwara1@gmail.com>2018-03-26 16:45:11 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2018-03-26 16:45:11 +0900
commit64253fd7a21710ad336480ca416edc5f2811d80e (patch)
tree39decdceed9059d5cc48bf3c6f1967603f6aeb49 /tests
parent119fdd414121f11fd40e696bebade70b98ebcbae (diff)
downloadibus-anthy-64253fd7a21710ad336480ca416edc5f2811d80e.tar.gz
tests: Fixed some errors in the Makefile script
- The username in ps command is udner 7 characters. - Added GI_TYPELIB_PATH and LD_LIBRARY_PATH for anthy typelib and libs. - python has a buffer in stdout and stderr during koji build.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am25
1 files changed, 17 insertions, 8 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 277e4ba..f0ad182 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -26,32 +26,41 @@ check:
fi; \
ANTHY_SCHEMA_FILE=org.freedesktop.ibus.engine.anthy.gschema.xml; \
if test \! -f $(builddir)/../data/$$ANTHY_SCHEMA_FILE ; then \
- echo "Not found $(builddir)/../data/$$ANTHY_SCHEMA_FILE" \
+ echo "Not found $(builddir)/../data/$$ANTHY_SCHEMA_FILE"; \
exit -1; \
fi; \
SCHEMA_TMPDIR=`mktemp -d`; \
if test $$? -ne 0 ; then \
- echo "FAILED mktemp" \
+ echo "FAILED mktemp"; \
exit -1; \
fi; \
cp $(builddir)/../data/$$ANTHY_SCHEMA_FILE $$SCHEMA_TMPDIR; \
glib-compile-schemas $$SCHEMA_TMPDIR; \
if test $$? -ne 0 ; then \
- echo "FAILED glib-compile-schemas $$SCHEMA_TMPDIR" \
+ echo "FAILED glib-compile-schemas $$SCHEMA_TMPDIR"; \
exit -1; \
fi; \
if test \! -f $$SCHEMA_TMPDIR/gschemas.compiled ; then \
- echo "Not found $$SCHEMA_TMPDIR/gschemas.compiled" \
+ echo "Not found $$SCHEMA_TMPDIR/gschemas.compiled"; \
+ exit -1; \
+ fi; \
+ ls $(builddir)/../gir/Anthy*.typelib > /dev/null; \
+ if test $$? -ne 0 ; then \
+ echo "Not found $(builddir)/../gir/Anthy*.typelib"; \
exit -1; \
fi; \
- export GSETTINGS_SCHEMA_DIR=$$SCHEMA_TMPDIR ; \
ibus-daemon --daemonize --verbose; \
sleep 1; \
- ps -ef | grep $$USER | grep ibus | grep -v grep; \
+ SUSER=`echo "$$USER" | cut -c 1-7`; \
+ ps -ef | grep "$$SUSER" | grep ibus | grep -v grep; \
+ export GSETTINGS_SCHEMA_DIR=$$SCHEMA_TMPDIR; \
+ export GI_TYPELIB_PATH=$(builddir)/../gir; \
+ LD_LIBRARY_PATH=$(builddir)/../gir/.libs; \
+ export LD_LIBRARY_PATH=$${LD_LIBRARY_PATH}:$(builddir)/../gir; \
echo "#### Starting Python3 API test $$ARGS"; \
env IBUS_ANTHY_ENGINE_PATH=$(srcdir)/../engine/python3 \
IBUS_ANTHY_SETUP_PATH=$(srcdir)/../setup/python3 \
- python3 $(srcdir)/anthytest.py $$ARGS; \
+ python3 -u $(srcdir)/anthytest.py $$ARGS; \
if test $$? -ne 0 ; then \
exit -1; \
fi; \
@@ -61,7 +70,7 @@ check:
echo "#### Starting Python2 API test"; \
env IBUS_ANTHY_ENGINE_PATH=$(srcdir)/../engine/python2 \
IBUS_ANTHY_SETUP_PATH=$(srcdir)/../setup/python2 \
- python2 $(srcdir)/anthytest.py $$ARGS; \
+ python2 -u $(srcdir)/anthytest.py $$ARGS; \
rm -rf $$SCHEMA_TMPDIR; \
ibus exit