Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Commit 9317aa9

Browse files
committed
Merge branch '3926-dns_qp-fuzz-test-is-failing-to-build-under-clusterfuzz' into 'main'
Remove unnecessary conditionals in fuzz/Makefile.am Closes #3926 See merge request isc-projects/bind9!7649
2 parents eeba1b8 + 64c0065 commit 9317aa9

File tree

4 files changed

+21
-28
lines changed

4 files changed

+21
-28
lines changed

Makefile.am

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ include $(top_srcdir)/Makefile.top
33
SUBDIRS = . lib doc
44

55
# build libtest before fuzz/* and bin/tests
6-
if HAVE_CMOCKA
76
SUBDIRS += tests
8-
endif HAVE_CMOCKA
97

108
# run fuzz tests before system tests
119
SUBDIRS += fuzz bin

fuzz/Makefile.am

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ AM_CFLAGS += \
66
AM_CPPFLAGS += \
77
$(LIBISC_CFLAGS) \
88
$(LIBDNS_CFLAGS) \
9-
$(LIBUV_CFLAGS) \
10-
-DFUZZDIR=\"$(abs_srcdir)\"
9+
$(LIBUV_CFLAGS) \
10+
-DFUZZDIR=\"$(abs_srcdir)\" \
11+
-I$(top_srcdir)/lib/dns \
12+
-I$(top_srcdir)/lib/isc \
13+
-I$(top_srcdir)/tests/include
1114

1215
AM_LDFLAGS += \
1316
$(FUZZ_LDFLAGS)
1417

15-
LDADD += \
16-
libfuzzmain.la \
17-
$(LIBDNS_LIBS) \
18+
LDADD += \
19+
libfuzzmain.la \
20+
$(top_builddir)/tests/libtest/libtest.la \
21+
$(LIBDNS_LIBS) \
1822
$(LIBISC_LIBS)
1923

2024
check_LTLIBRARIES = libfuzzmain.la
@@ -28,6 +32,8 @@ check_PROGRAMS = \
2832
dns_message_parse \
2933
dns_name_fromtext_target \
3034
dns_name_fromwire \
35+
dns_qp \
36+
dns_qpkey_name \
3137
dns_rdata_fromtext \
3238
dns_rdata_fromwire_text \
3339
isc_lex_getmastertoken \
@@ -51,24 +57,6 @@ dns_name_fromwire_SOURCES = \
5157
old.c \
5258
old.h
5359

54-
if HAVE_CMOCKA
55-
56-
check_PROGRAMS += \
57-
dns_qp \
58-
dns_qpkey_name
59-
60-
AM_CPPFLAGS += \
61-
-I$(top_srcdir)/lib/dns \
62-
-I$(top_srcdir)/lib/isc \
63-
-I$(top_srcdir)/tests/include
64-
65-
# libisc needs to appear after libtest
66-
LDADD += \
67-
$(top_builddir)/tests/libtest/libtest.la \
68-
$(LIBISC_LIBS)
69-
70-
endif HAVE_CMOCKA
71-
7260
TESTS = $(check_PROGRAMS)
7361

7462
if HAVE_FUZZ_LOG_COMPILER

tests/Makefile.am

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ LDADD += \
1212
$(LIBDNS_LIBS) \
1313
$(LIBNS_LIBS)
1414

15-
SUBDIRS = libtest isc dns ns isccfg irs bench
15+
SUBDIRS = libtest
16+
17+
if HAVE_CMOCKA
18+
SUBDIRS += isc dns ns isccfg irs bench
19+
endif HAVE_CMOCKA
1620

1721
check_PROGRAMS =

tests/libtest/Makefile.am

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,16 @@ LDADD += \
1616
noinst_LTLIBRARIES = libtest.la
1717

1818
libtest_la_SOURCES = \
19-
../include/tests/dns.h \
2019
../include/tests/isc.h \
2120
../include/tests/ns.h \
2221
../include/tests/qp.h \
23-
dns.c \
2422
isc.c \
2523
ns.c \
2624
qp.c
25+
if HAVE_CMOCKA
26+
libtest_la_SOURCES += \
27+
../include/tests/dns.h \
28+
dns.c
29+
endif HAVE_CMOCKA
2730

2831
include $(top_srcdir)/Makefile.tests

0 commit comments

Comments
 (0)