1 #***************************************************************************
3 # Project ___| | | | _ \| |
5 # | (__| |_| | _ <| |___
6 # \___|\___/|_| \_\_____|
8 # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
10 # This software is licensed as described in the file COPYING, which
11 # you should have received as part of this distribution. The terms
12 # are also available at https://curl.se/docs/copyright.html.
14 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 # copies of the Software, and permit persons to whom the Software is
16 # furnished to do so, under the terms of the COPYING file.
18 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 # KIND, either express or implied.
21 # SPDX-License-Identifier: curl
23 ###########################################################################
25 HTMLPAGES = testcurl.html runtests.html
26 PDFPAGES = testcurl.pdf runtests.pdf
27 MANDISTPAGES = runtests.1.dist testcurl.1.dist
29 EXTRA_DIST = appveyor.pm azure.pm badsymbols.pl check-deprecated.pl CMakeLists.txt \
30 devtest.pl dictserver.py directories.pm disable-scan.pl error-codes.pl extern-scan.pl FILEFORMAT.md \
31 processhelp.pm ftpserver.pl getpart.pm globalconfig.pm http-server.pl http2-server.pl \
32 http3-server.pl manpage-scan.pl manpage-syntax.pl markdown-uppercase.pl mem-include-scan.pl \
33 memanalyze.pl negtelnetserver.py nroff-scan.pl option-check.pl options-scan.pl \
34 pathhelp.pm README.md rtspserver.pl runner.pm runtests.1 runtests.pl secureserver.pl \
35 serverhelp.pm servers.pm smbserver.py sshhelp.pm sshserver.pl stunnel.pem symbol-scan.pl \
36 testcurl.1 testcurl.pl testutil.pm tftpserver.pl util.py valgrind.pm \
37 valgrind.supp version-scan.pl check-translatable-options.pl
39 DISTCLEANFILES = configurehelp.pm
41 # we have two variables here to make sure DIST_SUBDIRS won't get 'unit'
42 # added twice as then targets such as 'distclean' misbehave and try to
43 # do things twice in that subdir at times (and thus fails).
52 SUBDIRS = certs data server libtest http $(BUILD_UNIT)
53 DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT)
55 PERLFLAGS = -I$(srcdir)
57 CLEANFILES = .http.pid .https.pid .ftp.pid .ftps.pid $(MANDISTPAGES)
59 MAN2HTML= roffit $< >$@
62 @cd $(top_builddir) && $(MAKE)
65 TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
66 else # if not cross-compiling:
67 TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
74 # ~<keyword> means that it will run all tests matching the keyword, but will
75 # ignore their results (since these ones are likely to fail for no good reason)
76 TEST_NF = -a -p ~flaky ~timing-dependent
78 # special CI target derived from nonflaky with CI-specific flags
79 TEST_CI = $(TEST_NF) -rm
82 # make sure that PERL is pointing to an executable
84 @if ! test -x "$(PERL)"; then echo "No perl!"; exit 2; fi
89 quiet-test: perlcheck all
90 $(TEST) $(TEST_Q) $(TFLAGS)
92 am-test: perlcheck all
93 $(TEST) $(TEST_AM) $(TFLAGS)
95 ci-test: perlcheck all
96 $(TEST) $(TEST_CI) $(TFLAGS)
98 full-test: perlcheck all
99 $(TEST) $(TEST_F) $(TFLAGS)
101 nonflaky-test: perlcheck all
102 $(TEST) $(TEST_NF) $(TFLAGS)
104 torture-test: perlcheck all
105 $(TEST) $(TEST_T) $(TFLAGS)
107 event-test: perlcheck all
108 $(TEST) $(TEST_E) $(TFLAGS)
114 @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
115 groff -Tps -man $< >$$foo.ps; \
116 ps2pdf $$foo.ps $@; \
118 echo "converted $< to $@")
121 (cd libtest && $(MAKE) checksrc)
122 (cd unit && $(MAKE) checksrc)
123 (cd server && $(MAKE) checksrc)
124 (cd http && $(MAKE) checksrc)
127 # for debug builds, we scan the sources on all regular make invokes