4 # List of test targets (testsuite incl. automatically)
11 # Testsuite with automated collection of tests
12 # All .test.c files are scraped for GP_TEST definitions
16 # a bit crude way to link with test minilibrary
17 GP_TESTLIB_SRCS
=${TOPDIR}/tests
/common
/GP_Tests.c
18 CSOURCES
+=${GP_TESTLIB_SRCS}
20 # generated suite creation code
21 TESTSUITE_GEN
=collected_tests.gen.c
# also fixed in the code generator
22 GENSOURCES
+=${TESTSUITE_GEN}
24 TESTSUITE_SRCS
=$(wildcard *.
test.c
) ${TESTSUITE_GEN} ${GP_TESTLIB_SRCS}
25 INCLUDE
+=..
/tests
/common
26 TESTSUITE_OBJS
=$(patsubst %.c
,%.o
,$(TESTSUITE_SRCS
))
30 ${TESTSUITE}: ${TESTSUITE_OBJS}
32 $(CC
) $(CFLAGS
) $(LDFLAGS
) -Wl
,--start-group
$(LDLIBS
) $^
-Wl
,--end-group
-o
$@
35 @
$(CC
) $(CFLAGS
) $(LDFLAGS
) -Wl
,--start-group
$(LDLIBS
) $^
-Wl
,--end-group
-o
$@
43 for
test in
$(TESTS
); do LD_LIBRARY_PATH
=..
/..
/build .
/"$$test" -v
; done
45 # WARN: avoid double includion?
46 include $(TOPDIR
)/gen.mk