Skip to content

Commit 383bb51

Browse files
committed
utiltest: test harness for testing libutil based on acutest.h
"make tutil" is for running the test. Signed-off-by: Masatake YAMATO <[email protected]>
1 parent 8f2e2ee commit 383bb51

File tree

8 files changed

+1921
-5
lines changed

8 files changed

+1921
-5
lines changed

Makefile.am

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ noinst_LIBRARIES =
6060
noinst_LIBRARIES += libctags.a
6161
noinst_LIBRARIES += libutil.a
6262

63-
noinst_PROGRAMS =
63+
noinst_PROGRAMS = utiltest
6464

6565
# packcc always uses native compiler even when cross-compiling.
6666
# packcc cannot use the standard Automake rule.
@@ -126,6 +126,18 @@ libutil_a_CPPFLAGS+= $(DEBUG_CPPFLAGS)
126126
endif
127127
dist_libutil_a_SOURCES = $(UTIL_HEADS) $(UTIL_SRCS)
128128

129+
utiltest_CPPFLAGS = -I$(srcdir) -I$(srcdir)/main
130+
utiltest_CFLAGS =
131+
utiltest_CFLAGS += $(EXTRA_CFLAGS)
132+
utiltest_CFLAGS += $(WARNING_CFLAGS)
133+
utiltest_CFLAGS += $(COVERAGE_CFLAGS)
134+
if ENABLE_DEBUGGING
135+
utiltest_CPPFLAGS += $(DEBUG_CPPFLAGS)
136+
endif
137+
utiltest_LDADD =
138+
utiltest_LDADD += libutil.a
139+
dist_utiltest_SOURCES = $(UTILTEST_HEADS) $(UTILTEST_SRCS)
140+
129141
libctags_a_CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/main -I$(srcdir)/dsl -I$(srcdir)/peg -DHAVE_PACKCC
130142
if ENABLE_DEBUGGING
131143
libctags_a_CPPFLAGS+= $(DEBUG_CPPFLAGS)

0 commit comments

Comments
 (0)