1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

671 Commits

Author SHA1 Message Date
Fabian Keil
b47ee58fb7
runtests.pl: add -L parameter to require additional perl libraries
This is useful to change the behaviour of the script without
having to modify the file itself, for example to use a custom
compareparts() function that ignores header differences that
are expected to occur when an external proxy is being used.

Such differences are proxy-specific and thus the modifications
should be maintained together with the proxy.
2021-02-09 00:28:28 +01:00
Fabian Keil
4421359e77
runtests.pl: add a -P option to specify an external proxy
... that should be used when executing the tests.

The assumption is that the proxy is an HTTP proxy.

This option should be used together with -L to provide
a customized compareparts() version that knows which
proxy-specific header differences should be ignored.

This option doesn't work for all test types yet.
2021-02-09 00:28:28 +01:00
Daniel Stenberg
f451206266
runtests: preprocess DISABLED to allow conditionals
... with this function provided, we can disable tests for specific
environments and setups directly within this file.

Closes #6477
2021-01-19 10:04:41 +01:00
Daniel Stenberg
bbfad7e8a1
runtests: turn preprocessing into a separate function
... and remove all other variable substitutions as they're now done once
and for all in the preprocessor.
2021-01-19 10:04:41 +01:00
Fabian Keil
4f61fd87b2
misc: fix typos
Bug: https://curl.se/mail/lib-2021-01/0063.html
Closes #6434
2021-01-11 15:12:25 +01:00
Daniel Stenberg
9d7281ff17
global_init: debug builds allocates a byte in init
... to make build tools/valgrind warn if no curl_global_cleanup is
called.

This is conditionally only done for debug builds with the env variable
CURL_GLOBAL_INIT set.

Closes #6410
2021-01-06 15:13:45 +01:00
Emil Engler
725ec470e2
language: s/behaviour/behavior/g
We currently use both spellings the british "behaviour" and the american
"behavior". However "behavior" is more used in the project so I think
it's worth dropping the british name.

Closes #6395
2021-01-02 23:35:59 +01:00
Daniel Stenberg
48b85c46f1
runtests: add support for gophers, gopher over TLS 2020-12-15 12:58:19 +01:00
Daniel Stenberg
34bb59a868
runtests: add 'wakeup' as a feature 2020-12-11 17:42:17 +01:00
Daniel Stenberg
3e92799171
runtests.pl: fix "uninitialized value" warning
follow-up to e12825c642
2020-12-11 13:53:23 +01:00
Daniel Stenberg
e12825c642
runtests: add support for %if [feature] conditions
... to make tests run differently or expect different results depending
on what features that are present or not in curl.

Bonus: initial minor 'Hyper' awareness but nothing is using that yet

Closes #6304
2020-12-11 13:16:02 +01:00
Daniel Stenberg
082422b189 runtests: make 'c-ares' a "feature" to depend on
... also added to the docs.
2020-11-26 17:24:24 +01:00
Daniel Stenberg
4d2f800677
curl.se: new home
Closes #6172
2020-11-04 23:59:47 +01:00
Daniel Stenberg
7385610d0c
hsts: add support for Strict-Transport-Security
- enable in the build (configure)
- header parsing
- host name lookup
- unit tests for the above
- CI build
- CURL_VERSION_HSTS bit
- curl_version_info support
- curl -V output
- curl-config --features
- CURLOPT_HSTS_CTRL
- man page for CURLOPT_HSTS_CTRL
- curl --hsts (sets CURLOPT_HSTS_CTRL and works with --libcurl)
- man page for --hsts
- save cache to disk
- load cache from disk
- CURLOPT_HSTS
- man page for CURLOPT_HSTS
- added docs/HSTS.md
- fixed --version docs
- adjusted curl_easy_duphandle

Closes #5896
2020-11-03 16:08:42 +01:00
Daniel Stenberg
61630a155e
runtests: show keywords when no tests ran
To help out future debugging, runtests now outputs the list of keywords
when it fails because no tests ran.

Ref: #6120
Closes #6126
2020-10-26 23:05:19 +01:00
Daniel Stenberg
4282d5f9d0
runtests: revert the mistaken edit of $CURL
Regression from c4693adc62
2020-10-19 12:01:00 +02:00
Daniel Stenberg
88bf689f94
runtests: return error if no tests ran
... and make TESTFAIL stand out a little better by adding newlines
before and after.

Reported-by: Marc Hörsken
Issue: #6052
Closes #6053
2020-10-15 15:50:11 +02:00
Sergei Nikulov
d8fffd718b
CI/tests: fix invocation of tests for CMake builds
Update appveyor.yml to set env variable TFLAGS and run tests
Remove curly braces due to CMake error (${TFLAGS} -> $TFLAGS)
Move testdeps build to build step (per review comments)

Reviewed-by: Marc Hörsken

Closes #6066
Fixes #6052
2020-10-14 07:03:55 +02:00
Marc Hoersken
0a99281c21
CI/tests: use verification curl for test reporting APIs
Avoid using our own, potentially installed, curl for
the test reporting APIs in case it is broken.

Reviewed-by: Daniel Stenberg

Preparation for #6049
Closes #6063
2020-10-13 06:57:02 +02:00
Marc Hoersken
1101fbbf49
runtests.pl: use $LIBDIR variable instead of hardcoded path
Reviewed-by: Daniel Stenberg
Closes #6051
2020-10-08 21:36:43 +02:00
Daniel Stenberg
b8e4d1cb0a
runtests: add %repeat[]% for test files
... and use this new keywords in all the test files larger than 50K to reduce
their sizes and make them a lot easier to read and understand.

Closes #6040
2020-10-04 17:16:53 +02:00
Daniel Stenberg
e6b21d422e
runtests: provide curl's version string as %VERSION for tests
... so that we can check HTTP requests for User-Agent: curl/%VERSION

Update 600+ test cases accordingly.

Closes #6037
2020-10-02 22:54:23 +02:00
Daniel Stenberg
2dd53e82f1
runtests: allow generating a binary sequence from hex 2020-10-02 09:35:38 +02:00
Daniel Stenberg
c4693adc62
imap: make imap_send use dynbuf for the send buffer management
Reuses the buffer and thereby reduces number of mallocs over a transfer.

Closes #6010
2020-09-25 08:35:01 +02:00
Daniel Stenberg
b83947c8df
runtests: allow creating files without newlines
Closes #5946
2020-09-14 08:32:45 +02:00
Daniel Stenberg
5620d2cc78
curl: add --output-dir
Works with --create-dirs and with -J

Add test 3008, 3009, 3011, 3012 and 3013 to verify.

Closes #5637
2020-08-24 22:41:37 +02:00
Daniel Stenberg
d71ac6711a
runtests: make cleardir() erase dot files too
Because test cases might use dot files.

Closes #5838
2020-08-23 17:45:41 +02:00
Daniel Stenberg
327bd5d026
runtests: avoid 'fail to start' repeated messages in attempt loops
Closes #5834
2020-08-21 17:16:05 +02:00
Daniel Stenberg
15f76a50ee
runtests: clear pid variables when failing to start a server
... as otherwise the parent doesn't detect the failure and believe it
actually worked to start.

Reported-by: Christian Weisgerber
Bug: https://curl.haxx.se/mail/lib-2020-08/0018.html
Closes #5834
2020-08-21 17:15:59 +02:00
Daniel Stenberg
2429f45a97
TLS naming: fix more Winssl and Darwinssl leftovers
The CMake option is now called CMAKE_USE_SCHANNEL

The winbuild flag is USE_SCHANNEL

The CI jobs and build scripts only use the new names and the new name
options

Tests now require 'Schannel' (when necessary)

Closes #5795
2020-08-08 00:19:21 +02:00
Daniel Stenberg
82ed83ae30
runtests: run the DICT server on a random port number
Removed support for -b (base port number)

Closes #5783
2020-08-07 10:23:15 +02:00
Daniel Stenberg
337a28d810
runtests: move the TELNET server to a dynamic port
Rename the port variable to TELNETPORT to better match the existing
pattern.

Closes #5785
2020-08-06 23:47:08 +02:00
Daniel Stenberg
70999e6034
runtests: move the smbserver to use a dynamic port number
Closes #5782
2020-08-05 22:50:03 +02:00
Daniel Stenberg
c8ec04065a
runtests: run the http2 tests on a random port number
Closes #5779
2020-08-05 18:14:25 +02:00
Daniel Stenberg
06aa77ae33
runtests: move the gnutls-serv tests to a dynamic port
Affects test 320, 321, 322 and 324.

Closes #5778
2020-08-05 14:44:38 +02:00
Daniel Stenberg
424092e70f
runtests: support dynamicly base64 encoded sections in tests
This allows us to make test cases to use base64 at run-time and still
use and verify information determined at run-time, such as the IMAP test
server's port number in test 842.

This change makes 12 tests run again that basically never ran since we
moved to dynamic port numbers.

ftpserver.pl is adjusted to load test instructions and test number from
the preprocessed test file.

FILEFORMAT.md now documents the new base64 encoding syntax.

Reported-by: Marcel Raad
Fixes #5761
Closes #5775
2020-08-04 18:12:42 +02:00
Marcel Raad
5c2728eb42
runtests.pl: treat LibreSSL and BoringSSL as OpenSSL
This makes the tests that require the OpenSSL feature also run for
those two compatible libraries.

Closes https://github.com/curl/curl/pull/5762
2020-08-02 10:32:00 +02:00
Gilles Vollant
e13357b14b
content_encoding: add zstd decoding support
include zstd curl patch for Makefile.m32 from vszakats
and include Add CMake support for zstd from Peter Wu

Helped-by: Viktor Szakats
Helped-by: Peter Wu
Closes #5453
2020-07-12 18:11:37 +02:00
Daniel Stenberg
e2a7a6bb9e
tests: add https-proxy support to the test suite
Initial test 1630 added with basic HTTPS-proxy use. HTTPS-proxy is like
HTTP proxy but with a full TLS connection to the proxy.

Closes #5399
2020-05-14 16:21:31 +02:00
Peter Wu
ad64169867
CMake: fix runtests.pl with CMake, add new test targets
* runtests.pl:
    - Fix out-of-tree build under CMake when srcdir is not set. Default
      srcdir to the location of runtests.pl.
    - Add a hack to allow CMake to use the TFLAGS option as documented
      in tests/README and used in scripts/travis/script.sh.
  * Bump CMake version to 3.2 for USES_TERMINAL, dropping Debian Jessie
    support (no one should care, it is already EOL.).
  * Remove CTest since it defines its own 'test' target with no tests
    since all unittests are already broken and not built by default.
  * Add new test targets based on the options from Makefile.am. Since
    new test targets are rarely added, I opted for duplicating the
    runtests.pl options as opposed to creating a new Makefile.inc file.
    Use top-level target names (test-x) instead of x-test since that is
    used by CI and others.

Closes #5358
2020-05-12 08:50:17 +02:00
Daniel Stenberg
c67592fed7
runtests: remove ftp2 support, not used
We once supported two separate ftp instances in the test suite. Has not
been used the last decade.

Closes #5375
2020-05-12 08:23:06 +02:00
Daniel Stenberg
cad1f46ce3
runtests: show elapsed test time with higher precision (ms) 2020-05-07 12:23:40 +02:00
Daniel Stenberg
e1d81b52c0
runtests: set +x mode again 2020-05-06 08:14:47 +02:00
Daniel Stenberg
00c2e8da9a
runtests: remove sleep calls
Remove many one second sleeps that were done *after* each newly started
test server already has been verified. They should not have any purpose
there.

Closes #5323
2020-05-03 23:19:36 +02:00
Marc Hoersken
1abb087a9c
tests: add support for SSH server variant specific transfer paths
OpenSSH for Windows requires paths in the format of /C:/
instead of the pseudo-POSIX paths /cygdrive/c/ or just /c/

Reviewed-by: Daniel Stenberg
Closes #5298
2020-05-02 16:56:55 +02:00
Daniel Stenberg
5cb7f893df
runtests: make the logmsg from the ssh server only show in verbose 2020-05-02 15:51:42 +02:00
Emil Engler
44f5edd863
runtests: fix typo in the existence of disabled tests checker
Closes #5316
2020-04-30 23:47:53 +02:00
Daniel Stenberg
9a8fa076bf
tests: tests: run stunnel for HTTPS and FTPS on dynamic ports
As stunnel is an external tool and it has no specific option to export
the actually used port number when asked to listen to 0, runtests
instead iterates over ten randomly picked high number ports and sticks
to the first one stunnel can listen to.

Closes #5267
2020-04-30 14:17:15 +02:00
Daniel Stenberg
d1239b50be
tests: pick a random port number for SSH
Since sshd doesn't have such an option by itself, we iterate over a
series of random ports until one works.

Closes #5273
2020-04-30 14:13:59 +02:00
Daniel Stenberg
2fc1c9d7e7
runtests: check for the disabled tests relative srcdir
To make it work correctly for out-of-tree builds.

Follow-up to 75e8feb6fb

Bug: https://github.com/curl/curl/pull/5288#issuecomment-619346389
Reported-by: Marcel Raad
Closes #5297
2020-04-25 23:24:12 +02:00