testcurl.1 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. .\"
  25. .TH testcurl.pl 1 "24 Mar 2010" testcurl testcurl
  26. .SH NAME
  27. testcurl.pl \- (automatically) test curl
  28. .SH SYNOPSIS
  29. .B testcurl.pl [options] [dir] > output
  30. .SH DESCRIPTION
  31. \fItestcurl.pl\fP is the master script to use for automatic testing of curl
  32. off git or daily snapshots. It is written for the purpose of being run from a
  33. crontab job or similar at a regular interval. The output is suitable to be
  34. mailed to curl-autocompile@haxx.se to be dealt with automatically (make sure
  35. the subject includes the word "autobuild" as the mail gets silently discarded
  36. otherwise). The most current build status (with a reasonable backlog) will be
  37. published on the curl site, at https://curl.se/dev/builds.html
  38. \fIoptions\fP may be omitted. See \fI--setup\fP for what happens then.
  39. \fIdir\fP is a curl source dir, possibly a daily snapshot one. Using this will
  40. make testcurl.pl skip the 'buildconf' stage and thus it removes the dependency
  41. on automake, autoconf, libtool, GNU m4 and possibly a few other things.
  42. testcurl.pl will run 'buildconf' (or similar), run configure, build curl and
  43. libcurl in a separate build directory and then run 'make test' to test the
  44. fresh build.
  45. .SH OPTIONS
  46. .IP "--configure=[options]"
  47. Configure options passed to configure.
  48. .IP "--crosscompile"
  49. This is a cross-compile. Makes \fItestcurl.pl\fP skip a few things.
  50. .IP "--desc=[desc]"
  51. Description of your test system. Displayed on the build summary page on the
  52. weba site.
  53. .IP "--email=[email]"
  54. Set email address to report as. Displayed in the build logs on the site.
  55. .IP "--mktarball=[command]"
  56. Generic command to run after completed test.
  57. .IP "--name=[name]"
  58. Set name to report as. Displayed in the build summary on the site.
  59. .IP "--nobuildconf"
  60. Don't run buildconf. Useful when many builds use the same source tree, as then
  61. only one need to do this. Also, if multiple processes run tests simultaneously
  62. on the same source tree (like several hosts on a NFS mounted dir),
  63. simultaneous buildconf invokes may cause problems. (Added in 7.14.1)
  64. .IP "--nogitpull"
  65. Don't update from git even though it is a git tree. Useful to still be able to
  66. test even though your network is down, or similar.
  67. .IP "--runtestopts=[options]"
  68. Options that is passed to the runtests.pl script. Useful for disabling valgrind
  69. by force, and similar.
  70. .IP "--setup=[file name]"
  71. File name to read setup from (deprecated). The old style of providing info.
  72. If info is missing when testcurl.pl is started, it will prompt you and then
  73. store the info in a 'setup' file, which it will look for on each invoke. Use
  74. \fI--name\fP, \fI--email\fP, \fI--configure\fP and \fI--desc\fP instead.
  75. .IP "--target=[your os]"
  76. Specify your target environment. Recognized strings include 'vc', 'mingw32',
  77. and \&'borland'.
  78. .SH "INITIAL SETUP"
  79. First you make a checkout from git (or you write a script that downloads daily
  80. snapshots automatically, find inspiration in
  81. https://curl.se/dev/autocurl.txt ):
  82. .nf
  83. $ mkdir daily-curl
  84. $ cd daily-curl
  85. $ git clone https://github.com/curl/curl.git
  86. .fi
  87. With the curl sources checked out, or downloaded, you can start testing right
  88. away. If you want to use \fItestcurl.pl\fP without command line arguments and
  89. to have it store and remember the config in its 'setup' file, then start it
  90. manually now and fill in the answers to the questions it prompts you for:
  91. .nf
  92. $ ./curl/tests/testcurl.pl
  93. .fi
  94. Now you are ready to go. If you let the script run, it will perform a full
  95. cycle and spit out lots of output. Mail us that output as described above.
  96. .SH "CRONTAB EXAMPLE"
  97. The crontab could include something like this:
  98. .nf
  99. \# autobuild curl:
  100. 0 4 * * * cd daily-curl && ./testit.sh
  101. .fi
  102. Where testit.sh is a shell script that could look similar to this:
  103. .nf
  104. mail="mail -s autobuild curl-autocompile@haxx.se"
  105. name="--name=whoami"
  106. email="--email=iamme@nowhere"
  107. desc='"--desc=supermachine Turbo 2000"'
  108. testprog="perl ./curl/tests/testcurl.pl $name $email $desc"
  109. opts1="--configure=--enable-debug"
  110. opts2="--configure=--enable-ipv6"
  111. # run first test
  112. $testprog $opts1 | $mail
  113. # run second test
  114. $testprog $opts2 | $mail