Makefile.am 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. TEST = srcdir=$(srcdir) $(PERL) $(PERLFLAGS) $(srcdir)/runtests.pl $(TEST_COMMON)
  120. TEST_Q = -a -s
  121. TEST_AM = -a -am
  122. TEST_F = -a -p -r
  123. TEST_T = -a -t -j20
  124. TEST_E = -a -e
  125. # ~<keyword> means that it will run all tests matching the keyword, but will
  126. # ignore their results (since these ones are likely to fail for no good reason)
  127. TEST_NF = -a -p ~flaky ~timing-dependent
  128. # special CI target derived from nonflaky with CI-specific flags
  129. TEST_CI = $(TEST_NF) -r -rm -j20
  130. PYTEST = pytest
  131. endif
  132. CD2NROFF = $(top_srcdir)/scripts/cd2nroff $< >$@
  133. SUFFIXES = .1 .md
  134. .md.1:
  135. $(CD2)$(CD2NROFF)
  136. # make sure that PERL is pointing to an executable
  137. perlcheck:
  138. @if ! test -x "$(PERL)"; then echo "No perl!"; exit 2; fi
  139. test: perlcheck all
  140. $(TEST) $(TFLAGS)
  141. quiet-test: perlcheck all
  142. $(TEST) $(TEST_Q) $(TFLAGS)
  143. am-test: perlcheck all
  144. $(TEST) $(TEST_AM) $(TFLAGS)
  145. ci-test: perlcheck all
  146. $(TEST) $(TEST_CI) $(TFLAGS)
  147. full-test: perlcheck all
  148. $(TEST) $(TEST_F) $(TFLAGS)
  149. nonflaky-test: perlcheck all
  150. $(TEST) $(TEST_NF) $(TFLAGS)
  151. torture-test: perlcheck all
  152. $(TEST) $(TEST_T) $(TFLAGS)
  153. event-test: perlcheck all
  154. $(TEST) $(TEST_E) $(TFLAGS)
  155. default-pytest: ci-pytest
  156. ci-pytest: all
  157. srcdir=$(srcdir) $(PYTEST) -v $(srcdir)/http
  158. checksrc:
  159. (cd libtest && $(MAKE) checksrc)
  160. (cd unit && $(MAKE) checksrc)
  161. (cd server && $(MAKE) checksrc)
  162. (cd http && $(MAKE) checksrc)
  163. all-local: $(MANFILES)
  164. distclean:
  165. rm -f $(MANFILES)