2
0

Makefile.am 4.6 KB

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