curl-curl/tests/server/Makefile.inc
Daniel Stenberg 02e9690c3e
tests/server/dnsd: basic DNS server for test suite
Currently the DNS server only responds to A and AAAA queries. It always
responds with a fixed response: the localhost address. Three times.

It should work fine over either IPv4 or IPv6, but I don't think it
matters much for curl testing.

The idea is to allow curl tests to use "normal" DNS hostnames (using the
normal name resolving code paths) and still use the local test servers.

This setup currently only works if curl is built with c-ares because
redirecting DNS requests to our test server when using getaddrinfo() is
not easy.

This should be extended to respond to HTTPS queries as well to allow
more testing there, as c-ares is always used for that.

Test 2102 is the first test using this.

Closes #17015
2025-04-17 09:13:24 +02:00

127 lines
3.4 KiB
Makefile

#***************************************************************************
# _ _ ____ _
# Project ___| | | | _ \| |
# / __| | | | |_) | |
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://curl.se/docs/copyright.html.
#
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
# copies of the Software, and permit persons to whom the Software is
# furnished to do so, under the terms of the COPYING file.
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
# KIND, either express or implied.
#
# SPDX-License-Identifier: curl
#
###########################################################################
SERVERPROGS = resolve rtspd sockfilt sws tftpd socksd disabled mqttd dnsd
MEMDEBUG = \
../../lib/memdebug.c \
../../lib/memdebug.h
CURLX_SRCS = \
../../lib/mprintf.c \
../../lib/nonblock.c \
../../lib/strparse.c \
../../lib/strequal.c \
../../lib/warnless.c \
../../lib/timediff.c \
../../lib/timeval.c \
../../lib/dynbuf.c \
../../lib/strcase.c \
../../lib/strdup.c \
../../lib/curl_get_line.c \
../../lib/curl_multibyte.c \
../../lib/version_win32.c
CURLX_HDRS = \
../../lib/curlx.h \
../../lib/curl_ctype.h \
../../lib/nonblock.h \
../../lib/strcase.h \
../../lib/warnless.h \
../../lib/timediff.h \
../../lib/timeval.h \
../../lib/dynbuf.h \
../../lib/strcase.h \
../../lib/strdup.h \
../../lib/curl_get_line.h \
../../lib/curl_multibyte.h \
../../lib/version_win32.h
UTIL = \
getpart.c \
getpart.h \
util.c \
util.h \
server_setup.h \
../../lib/base64.c \
../../lib/curl_base64.h \
../../lib/strerror.c \
../../lib/strerror.h
FIRSTFILES = \
first.c \
first.h
INET_PTON = \
../../lib/inet_pton.c
resolve_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) \
resolve.c
resolve_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
resolve_CFLAGS = $(AM_CFLAGS)
rtspd_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) \
server_sockaddr.h \
rtspd.c
rtspd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
rtspd_CFLAGS = $(AM_CFLAGS)
sockfilt_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) $(INET_PTON) \
server_sockaddr.h \
sockfilt.c
sockfilt_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
sockfilt_CFLAGS = $(AM_CFLAGS)
socksd_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) $(INET_PTON) \
server_sockaddr.h \
socksd.c
socksd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
socksd_CFLAGS = $(AM_CFLAGS)
mqttd_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) \
server_sockaddr.h \
mqttd.c
mqttd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
mqttd_CFLAGS = $(AM_CFLAGS)
sws_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) $(INET_PTON) \
server_sockaddr.h \
sws.c
sws_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
sws_CFLAGS = $(AM_CFLAGS)
tftpd_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) \
server_sockaddr.h \
tftpd.c \
tftp.h
tftpd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
tftpd_CFLAGS = $(AM_CFLAGS)
dnsd_SOURCES = $(MEMDEBUG) $(CURLX_SRCS) $(CURLX_HDRS) $(UTIL) \
dnsd.c
dnsd_LDADD = @CURL_NETWORK_AND_TIME_LIBS@
dnsd_CFLAGS = $(AM_CFLAGS)
disabled_SOURCES = disabled.c