• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 = appveyor.pm azure.pm CMakeLists.txt devtest.pl             \
47 dictserver.py directories.pm FILEFORMAT.md processhelp.pm ftpserver.pl \
48 getpart.pm globalconfig.pm http-server.pl http2-server.pl              \
49 http3-server.pl memanalyze.pl negtelnetserver.py pathhelp.pm README.md \
50 rtspserver.pl runner.pm runtests.1 runtests.pl secureserver.pl         \
51 serverhelp.pm servers.pm smbserver.py sshhelp.pm sshserver.pl          \
52 stunnel.pem testcurl.1 testcurl.pl testutil.pm tftpserver.pl util.py   \
53 valgrind.pm valgrind.supp $(TESTSCRIPTS)
54
55DISTCLEANFILES = configurehelp.pm
56
57# we have two variables here to make sure DIST_SUBDIRS won't get 'unit'
58# added twice as then targets such as 'distclean' misbehave and try to
59# do things twice in that subdir at times (and thus fails).
60if BUILD_UNITTESTS
61BUILD_UNIT = unit
62DIST_UNIT =
63else
64BUILD_UNIT =
65DIST_UNIT = unit
66endif
67
68SUBDIRS = certs data server libtest http $(BUILD_UNIT)
69DIST_SUBDIRS = $(SUBDIRS) $(DIST_UNIT)
70
71PERLFLAGS = -I$(srcdir)
72
73CLEANFILES = .http.pid .https.pid .ftp.pid .ftps.pid $(MANDISTPAGES)
74
75curl:
76	@cd $(top_builddir) && $(MAKE)
77
78if CROSSCOMPILING
79TEST = @echo "NOTICE: we can't run the tests when cross-compiling!"
80else # if not cross-compiling:
81TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl
82TEST_Q = -a -s
83TEST_AM = -a -am
84TEST_F = -a -p -r
85TEST_T = -a -t
86TEST_E = -a -e
87
88# ~<keyword> means that it will run all tests matching the keyword, but will
89# ignore their results (since these ones are likely to fail for no good reason)
90TEST_NF = -a -p ~flaky ~timing-dependent
91
92# special CI target derived from nonflaky with CI-specific flags
93TEST_CI = $(TEST_NF) -rm
94endif
95
96# make sure that PERL is pointing to an executable
97perlcheck:
98	@if ! test -x "$(PERL)"; then echo "No perl!"; exit 2; fi
99
100test: perlcheck all
101	$(TEST) $(TFLAGS)
102
103quiet-test: perlcheck all
104	$(TEST) $(TEST_Q) $(TFLAGS)
105
106am-test: perlcheck all
107	$(TEST) $(TEST_AM) $(TFLAGS)
108
109ci-test: perlcheck all
110	$(TEST) $(TEST_CI) $(TFLAGS)
111
112full-test: perlcheck all
113	$(TEST) $(TEST_F) $(TFLAGS)
114
115nonflaky-test: perlcheck all
116	$(TEST) $(TEST_NF) $(TFLAGS)
117
118torture-test: perlcheck all
119	$(TEST) $(TEST_T) $(TFLAGS)
120
121event-test: perlcheck all
122	$(TEST) $(TEST_E) $(TFLAGS)
123
124checksrc:
125	(cd libtest && $(MAKE) checksrc)
126	(cd unit && $(MAKE) checksrc)
127	(cd server && $(MAKE) checksrc)
128	(cd http && $(MAKE) checksrc)
129
130if CURLDEBUG
131# for debug builds, we scan the sources on all regular make invokes
132all-local: checksrc
133endif
134