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