This repository has been archived by the owner on Jan 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
/
Makefile.am
133 lines (105 loc) · 2.85 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
include $(top_srcdir)/common.mk
ACLOCAL_AMFLAGS = -I m4
if COVERAGE
AM_CFLAGS += --coverage
endif
EXTRA_DIST = ${top_srcdir}/README.md \
${top_srcdir}/LICENSE \
${top_srcdir}/common.mk \
${top_srcdir}/tests/dummy_data/cve.ini \
${top_srcdir}/tests/dummy_data/nvdcve-2.0-2002.xml \
${top_srcdir}/tests/dummy_data/rpm/package.spec \
${top_srcdir}/tests/dummy_data/rpm/package2.spec \
${top_srcdir}/tests/dummy_data/rpm/packages \
${top_srcdir}/tests/dummy_data/rpm/package-1.-5.src.rpm \
${top_srcdir}/tests/dummy_data/rpm/CVE-2014-5461.patch \
${top_srcdir}/tests/dummy_data/rpm/cve-2013-4459.nopatch \
${top_srcdir}/tests/dummy_data/eopkg/pspec.xml \
${top_srcdir}/tests/dummy_data/eopkg/files/security/cve-2014-5461.patch \
${top_srcdir}/tests/dummy_data/eopkg/files/security/cve-2013-4459.nopatch \
${top_srcdir}/tests/dummy_data/pkgbuild/PKGBUILD \
${top_srcdir}/tests/dummy_data/pkgbuild/cve-2014-5461.patch \
${top_srcdir}/test-init.sh \
${top_srcdir}/data/packages.template
NULL =
CLEANFILES =
dist_man_MANS = \
docs/cve-check-tool.1
# Install the template file to disk
templatedir=$(datadir)/cve-check-tool/
template_DATA = data/packages.template
include src/Makefile.am
if COVERAGE
coverage:
mkdir -p coverage
lcov --compat-libtool --directory . --capture --output-file coverage/report
genhtml -o coverage/ coverage/report
AM_CFLAGS += --coverage
endif
if ENABLE_UNIT_TESTS
# Test suites
AM_TESTS_ENVIRONMENT = \
eval $(srcdir)/test-init.sh "${top_srcdir}" "$(top_builddir)";
distclean-local:
rm -rf ${top_builddir}/tests/dummy_install
# Tests
TESTS = \
check_core \
check_database \
check_hashmap \
check_packaging \
check_template
check_PROGRAMS = \
check_core \
check_database \
check_hashmap \
check_packaging \
check_template
check_core_SOURCES = \
tests/check-core.c
check_core_CFLAGS = \
$(CVE_CHECK_TOOL_CFLAGS) \
$(AM_CFLAGS) \
$(CHECK_CFLAGS)
check_core_LDADD = \
$(CVE_CHECK_TOOL_LIBS) \
$(CHECK_LIBS)
check_database_SOURCES = \
tests/check-database.c
check_database_CFLAGS = \
$(CVE_CHECK_TOOL_CFLAGS) \
$(AM_CFLAGS) \
$(CHECK_CFLAGS)
check_database_LDADD = \
$(CVE_CHECK_TOOL_LIBS) \
$(CHECK_LIBS)
check_hashmap_SOURCES = \
tests/check-hashmap.c
check_hashmap_CFLAGS = \
$(CVE_CHECK_TOOL_CFLAGS) \
$(AM_CFLAGS) \
$(CHECK_CFLAGS)
check_hashmap_LDADD = \
$(CHECK_LIBS)
check_packaging_SOURCES = \
tests/check-packaging.c
check_packaging_CFLAGS = \
$(CVE_CHECK_TOOL_CFLAGS) \
$(AM_CFLAGS) \
$(CHECK_CFLAGS) \
-DTEST_SUITE_BUILD
check_packaging_LDADD = \
$(CVE_CHECK_TOOL_LIBS) \
$(CHECK_LIBS) \
-ldl
check_template_SOURCES = \
tests/check-template.c
check_template_CFLAGS = \
$(CVE_CHECK_TOOL_CFLAGS) \
$(AM_CFLAGS) \
$(CHECK_CFLAGS)
check_template_LDADD = \
$(CVE_CHECK_TOOL_LIBS) \
$(CHECK_LIBS)
@VALGRIND_CHECK_RULES@
endif