tests: cover live ibus transport lifecycle
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
CC = 9c
|
||||
LD = 9l
|
||||
HOSTCC = cc
|
||||
CFLAGS = -std=c99 -Wall -Wextra -O2 -g -I.. -I../cutest
|
||||
FT_CFLAGS = $(shell pkg-config --cflags freetype2)
|
||||
FT_LIBS = $(shell pkg-config --libs freetype2)
|
||||
@@ -8,6 +9,7 @@ IBUS_LIBS = $(shell pkg-config --libs dbus-1 xkbcommon)
|
||||
LIBS = -lthread -lbio $(FT_LIBS) $(IBUS_LIBS)
|
||||
|
||||
PROG = unit_test
|
||||
LIVE = ibus_live_test
|
||||
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 \
|
||||
popup_test.c font_test.c ibus_test.c server_test.c
|
||||
@@ -17,14 +19,18 @@ PARENTSRC = str.c hash.c trie.c dict.c ko.c vi.c ipc.c popup_layout.c \
|
||||
PARENTOBJ = $(PARENTSRC:%.c=unit_%.o)
|
||||
OBJS = $(TESTOBJ) $(PARENTOBJ)
|
||||
|
||||
all: $(PROG)
|
||||
all: $(PROG) $(LIVE)
|
||||
|
||||
check test: $(PROG)
|
||||
check test: $(PROG) $(LIVE)
|
||||
./$(PROG) $(TESTARGS)
|
||||
./ibus_live_test ../strans ../map
|
||||
|
||||
$(PROG): $(OBJS)
|
||||
$(LD) -o $@ $(OBJS) $(LIBS)
|
||||
|
||||
ibus_live_test: ibus_live_test.c
|
||||
$(HOSTCC) -std=c99 -Wall -Wextra -O2 -g $(IBUS_CFLAGS) -o $@ $< $(IBUS_LIBS)
|
||||
|
||||
$(TESTOBJ): test.h ../dat.h ../fn.h ../ipc.h ../cutest/cutest.h
|
||||
engine_test.o: ../strans.c
|
||||
ibus_test.o: CFLAGS += $(IBUS_CFLAGS)
|
||||
@@ -39,6 +45,6 @@ unit_%.o: ../%.c ../dat.h ../fn.h ../ipc.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) $(PROG)
|
||||
rm -f $(OBJS) $(PROG) $(LIVE)
|
||||
|
||||
.PHONY: all check test clean
|
||||
|
||||
1014
tests/ibus_live_test.c
Normal file
1014
tests/ibus_live_test.c
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user