1#*************************************************************************** 2# _ _ ____ _ 3# Project ___| | | | _ \| | 4# / __| | | | |_) | | 5# | (__| |_| | _ <| |___ 6# \___|\___/|_| \_\_____| 7# 8# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 9# 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. 13# 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. 17# 18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 19# KIND, either express or implied. 20# 21# SPDX-License-Identifier: curl 22# 23########################################################################### 24 25MANDISTPAGES = runtests.1.dist testcurl.1.dist 26 27# scripts used in test cases 28TESTSCRIPTS = \ 29 test1119.pl \ 30 test1132.pl \ 31 test1135.pl \ 32 test1139.pl \ 33 test1140.pl \ 34 test1165.pl \ 35 test1167.pl \ 36 test1173.pl \ 37 test1175.pl \ 38 test1177.pl \ 39 test1222.pl \ 40 test1275.pl \ 41 test1276.pl \ 42 test1477.pl \ 43 test1544.pl \ 44 test971.pl 45 46EXTRA_DIST = \ 47 CMakeLists.txt \ 48 FILEFORMAT.md \ 49 README.md \ 50 appveyor.pm \ 51 azure.pm \ 52 conftest.py \ 53 devtest.pl \ 54 dictserver.py \ 55 directories.pm \ 56 ech_combos.py \ 57 ech_tests.sh \ 58 ftpserver.pl \ 59 getpart.pm \ 60 globalconfig.pm \ 61 http-server.pl \ 62 http2-server.pl \ 63 http3-server.pl \ 64 memanalyze.pl \ 65 negtelnetserver.py \ 66 nghttpx.conf \ 67 pathhelp.pm \ 68 processhelp.pm \ 69 requirements.txt \ 70 rtspserver.pl \ 71 runner.pm \ 72 runtests.1 \ 73 runtests.pl \ 74 secureserver.pl \ 75 serverhelp.pm \ 76 servers.pm \ 77 smbserver.py \ 78 sshhelp.pm \ 79 sshserver.pl \ 80 stunnel.pem \ 81 testcurl.1 \ 82 testcurl.pl \ 83 testutil.pm \ 84 tftpserver.pl \ 85 util.py \ 86 valgrind.pm \ 87 valgrind.supp \ 88 $(TESTSCRIPTS) 89 90DISTCLEANFILES = configurehelp.pm 91 92# we have two variables here to make sure DIST_SUBDIRS won't get 'unit' 93# added twice as then targets such as 'distclean' misbehave and try to 94# do things twice in that subdir at times (and thus fails). 95if BUILD_UNITTESTS 96BUILD_UNIT = unit 97DIST_UNIT = 98else 99BUILD_UNIT = 100DIST_UNIT = unit 101endif 102 103SUBDIRS = certs data server libtest http $(BUILD_UNIT) 104DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT) 105 106PERLFLAGS = -I$(srcdir) 107 108CLEANFILES = .http.pid .https.pid .ftp.pid .ftps.pid $(MANDISTPAGES) 109 110curl: 111 @cd $(top_builddir) && $(MAKE) 112 113if CROSSCOMPILING 114TEST = @echo "NOTICE: we can't run the tests when cross-compiling!" 115else # if not cross-compiling: 116TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl 117TEST_Q = -a -s 118TEST_AM = -a -am 119TEST_F = -a -p -r 120TEST_T = -a -t 121TEST_E = -a -e 122 123# ~<keyword> means that it will run all tests matching the keyword, but will 124# ignore their results (since these ones are likely to fail for no good reason) 125TEST_NF = -a -p ~flaky ~timing-dependent 126 127# special CI target derived from nonflaky with CI-specific flags 128TEST_CI = $(TEST_NF) -rm 129endif 130 131# make sure that PERL is pointing to an executable 132perlcheck: 133 @if ! test -x "$(PERL)"; then echo "No perl!"; exit 2; fi 134 135test: perlcheck all 136 $(TEST) $(TFLAGS) 137 138quiet-test: perlcheck all 139 $(TEST) $(TEST_Q) $(TFLAGS) 140 141am-test: perlcheck all 142 $(TEST) $(TEST_AM) $(TFLAGS) 143 144ci-test: perlcheck all 145 $(TEST) $(TEST_CI) $(TFLAGS) 146 147full-test: perlcheck all 148 $(TEST) $(TEST_F) $(TFLAGS) 149 150nonflaky-test: perlcheck all 151 $(TEST) $(TEST_NF) $(TFLAGS) 152 153torture-test: perlcheck all 154 $(TEST) $(TEST_T) $(TFLAGS) 155 156event-test: perlcheck all 157 $(TEST) $(TEST_E) $(TFLAGS) 158 159checksrc: 160 (cd libtest && $(MAKE) checksrc) 161 (cd unit && $(MAKE) checksrc) 162 (cd server && $(MAKE) checksrc) 163 (cd http && $(MAKE) checksrc) 164 165if CURLDEBUG 166# for debug builds, we scan the sources on all regular make invokes 167all-local: checksrc 168endif 169