summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
blob: f00eef6da4a2c174644455ed626bc21eb9aa5f65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# vim:set noet ts=4:
#
# ibus-anthy - The Anthy engine for IBus
#
# Copyright (c) 2017 Takao Fujiwara <takao.fujiwara1@gmail.com>
# Copyright (c) 2017 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

check:
	ARGS="--exit";                                                  \
	if test x$(FORCE_TEST) != x ; then                              \
	    ARGS="$$ARGS --force";                                      \
	fi;                                                             \
	ibus-daemon --daemonize --verbose;                              \
	sleep 1;                                                        \
	ps -ef | grep $$USER | grep ibus | grep -v grep;                \
	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;                          \
	if test $$? -ne 0 ; then                                        \
	    exit -1;                                                    \
	fi;                                                             \
	if test x$(FORCE_TEST) = x ; then                               \
	    rm -r $$HOME/.anthy;                                        \
	fi;                                                             \
	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;
	ibus exit

EXTRA_DIST = \
        anthycases.py \
        anthytest.py \
        $(NULL)