lightrec: Increase size of hw registers area
[pcsx_rearmed.git] / deps / libretro-common / Makefile.test
CommitLineData
3719602c
PC
1
2OBJDIR = ../obj-unix
3
4TEST_UNIT_CFLAGS = $(CFLAGS) -Iinclude $(LDFLAGS) -lcheck $(LIBCHECK_CFLAGS) -Werror -Wdeclaration-after-statement -fsanitize=address -fsanitize=undefined -ftest-coverage -fprofile-arcs -ggdb
5
6TEST_GENERIC_QUEUE = test/queues/test_generic_queue
7TEST_GENERIC_QUEUE_SRC = test/queues/test_generic_queue.c queues/generic_queue.c
8
9TEST_LINKED_LIST = test/lists/test_linked_list
10TEST_LINKED_LIST_SRC = test/lists/test_linked_list.c lists/linked_list.c
11
12TEST_STDSTRING = test/string/test_stdstring
13TEST_STDSTRING_SRC = test/string/test_stdstring.c string/stdstring.c encodings/encoding_utf.c \
14 compat/compat_strl.c
15
16TEST_UTILS = test/utils/test_utils
17TEST_UTILS_SRC = test/utils/test_utils.c utils/md5.c encodings/encoding_crc32.c \
18 streams/file_stream.c vfs/vfs_implementation.c file/file_path.c \
19 compat/compat_strl.c time/rtime.c string/stdstring.c encodings/encoding_utf.c
20
21TEST_HASH = test/hash/test_hash
22TEST_HASH_SRC = test/hash/test_hash.c hash/lrc_hash.c \
23 streams/file_stream.c vfs/vfs_implementation.c file/file_path.c \
24 compat/compat_strl.c time/rtime.c string/stdstring.c encodings/encoding_utf.c
25
26all:
27 # Build and execute tests in order, to avoid coverage file collision
28 # string
29 $(CC) $(TEST_UNIT_CFLAGS) $(TEST_STDSTRING_SRC) -o $(TEST_STDSTRING)
30 $(TEST_STDSTRING)
31 lcov -c -d . -o `dirname $(TEST_STDSTRING)`/coverage.info
32 # utils
33 $(CC) $(TEST_UNIT_CFLAGS) $(TEST_UTILS_SRC) -o $(TEST_UTILS)
34 $(TEST_UTILS)
35 lcov -c -d . -o `dirname $(TEST_UTILS)`/coverage.info
36 # utils
37 $(CC) $(TEST_UNIT_CFLAGS) $(TEST_HASH_SRC) -o $(TEST_HASH)
38 $(TEST_HASH)
39 lcov -c -d . -o `dirname $(TEST_HASH)`/coverage.info
40 # list
41 $(CC) $(TEST_UNIT_CFLAGS) $(TEST_LINKED_LIST_SRC) -o $(TEST_LINKED_LIST)
42 $(TEST_LINKED_LIST)
43 lcov -c -d . -o `dirname $(TEST_LINKED_LIST)`/coverage.info
44 # queue
45 $(CC) $(TEST_UNIT_CFLAGS) $(TEST_GENERIC_QUEUE_SRC) -o $(TEST_GENERIC_QUEUE)
46 $(TEST_GENERIC_QUEUE)
47 lcov -c -d . -o `dirname $(TEST_GENERIC_QUEUE)`/coverage.info
48
49 lcov -o test/coverage.info \
50 -a test/utils/coverage.info \
51 -a test/string/coverage.info \
52 -a test/lists/coverage.info \
53 -a test/queues/coverage.info
54 genhtml -o test/coverage/ test/coverage.info
55
56clean:
57 rm -f *.gcda *.gcno
58