tests: cover stale daemon endpoint recovery
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,6 +6,7 @@
|
|||||||
/tests/ipc_live_test
|
/tests/ipc_live_test
|
||||||
/tests/daemon_collision_test
|
/tests/daemon_collision_test
|
||||||
/tests/daemon_failure_test
|
/tests/daemon_failure_test
|
||||||
|
/tests/daemon_restart_test
|
||||||
/xim/*.o
|
/xim/*.o
|
||||||
/xim/strans-xim
|
/xim/strans-xim
|
||||||
/xim/xim_test
|
/xim/xim_test
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ IBUS_LIBS = $(shell pkg-config --libs dbus-1 xkbcommon)
|
|||||||
LIBS = -lthread -lbio $(FT_LIBS) $(IBUS_LIBS)
|
LIBS = -lthread -lbio $(FT_LIBS) $(IBUS_LIBS)
|
||||||
|
|
||||||
PROG = unit_test
|
PROG = unit_test
|
||||||
LIVE = ibus_live_test ipc_live_test daemon_collision_test daemon_failure_test
|
LIVE = ibus_live_test ipc_live_test daemon_collision_test daemon_failure_test \
|
||||||
|
daemon_restart_test
|
||||||
TESTSRC = unit_test.c test_util.c str_test.c hash_test.c trie_test.c \
|
TESTSRC = unit_test.c test_util.c str_test.c hash_test.c trie_test.c \
|
||||||
ko_test.c vi_test.c engine_test.c dict_test.c ipc_test.c \
|
ko_test.c vi_test.c engine_test.c dict_test.c ipc_test.c \
|
||||||
popup_test.c font_test.c ibus_test.c server_test.c
|
popup_test.c font_test.c ibus_test.c server_test.c
|
||||||
@@ -27,6 +28,7 @@ check test: $(PROG) $(LIVE)
|
|||||||
./ipc_live_test ../strans ../map
|
./ipc_live_test ../strans ../map
|
||||||
./daemon_collision_test ../strans ../map
|
./daemon_collision_test ../strans ../map
|
||||||
./daemon_failure_test ../strans
|
./daemon_failure_test ../strans
|
||||||
|
./daemon_restart_test ../strans ../map
|
||||||
|
|
||||||
$(PROG): $(OBJS)
|
$(PROG): $(OBJS)
|
||||||
$(LD) -o $@ $(OBJS) $(LIBS)
|
$(LD) -o $@ $(OBJS) $(LIBS)
|
||||||
@@ -44,6 +46,10 @@ daemon_collision_test: daemon_collision_test.c ../ipc.c ../ipc.h
|
|||||||
daemon_failure_test: daemon_failure_test.c
|
daemon_failure_test: daemon_failure_test.c
|
||||||
$(HOSTCC) -std=c99 -Wall -Wextra -O2 -g -o $@ $<
|
$(HOSTCC) -std=c99 -Wall -Wextra -O2 -g -o $@ $<
|
||||||
|
|
||||||
|
daemon_restart_test: daemon_restart_test.c ../ipc.c ../ipc.h
|
||||||
|
$(HOSTCC) -std=c99 -Wall -Wextra -O2 -g -I.. $(IBUS_CFLAGS) -o $@ \
|
||||||
|
daemon_restart_test.c ../ipc.c $(IBUS_LIBS)
|
||||||
|
|
||||||
$(TESTOBJ): test.h ../dat.h ../fn.h ../ipc.h ../cutest/cutest.h
|
$(TESTOBJ): test.h ../dat.h ../fn.h ../ipc.h ../cutest/cutest.h
|
||||||
engine_test.o: ../strans.c
|
engine_test.o: ../strans.c
|
||||||
ibus_test.o: CFLAGS += $(IBUS_CFLAGS)
|
ibus_test.o: CFLAGS += $(IBUS_CFLAGS)
|
||||||
|
|||||||
1855
tests/daemon_restart_test.c
Normal file
1855
tests/daemon_restart_test.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user