quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

testcurl.md (4143B)


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