Debian Codegraph @

tests/Makefile

raw symbols SCIP
1 # This make file may serve as an example of how to easily build a lot
2 # of Cgreen test libraries and run them through the runner. By
3 # structuring it this way only affected libraries need to be rebuilt.
4 #
5 # Note that this is not official builds or tests for Cgreen. To do
6 # that you should go to root directory and do "make unit" or "make
7 # test"
8
9 CFLAGS = -Wall -fPIC -std=c99 -I../include -I.. -I../src
10
11 LIBRARY_PATH = ../build/src
12 ifneq ($(shell uname), Darwin)
13 LOAD_PATH = LD_LIBRARY_PATH=$(LIBRARY_PATH)
14 else
15 LOAD_PATH = DYLD_LIBRARY_PATH=$(LIBRARY_PATH)
16 endif
17
18 TEST_SOURCES = \
19 assertion_tests.c \
20 breadcrumb_tests.c \
21 cdash_reporter_tests.c \
22 cgreen_value_tests.c \
23 constraint_tests.c \
24 cute_reporter_tests.c \
25 double_tests.c \
26 environment_variables_tests.c \
27 message_formatting_tests.c \
28 messaging_tests.c \
29 mocks_tests.c \
30 multiple_suite_tests.c \
31 parameters_tests.c \
32 reflective_runner_no_teardown_tests.c \
33 reflective_tests.c \
34 text_reporter_tests.c \
35 unit_tests.c \
36 utils_tests.c \
37 vector_tests.c \
38 xml_reporter_tests.c \
39
40 TEST_LIBRARIES = $(patsubst %.c,lib%.so, $(TEST_SOURCES))
41
42 all: $(TEST_LIBRARIES)
43 cd ..; make --no-print-directory
44 $(LOAD_PATH) ../build/tools/cgreen-runner -s unittests $?
45
46 lib%_tests.so : %_tests.o ; $(CC) -shared -o $@ $^ -L$(LIBRARY_PATH) -lcgreen