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.
This commit is contained in:
Fabian Keil 2014-06-05 12:56:36 +02:00 committed by Daniel Stenberg
parent 4421359e77
commit b47ee58fb7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 42 additions and 1 deletions

View file

@ -5389,6 +5389,11 @@ while(@ARGV) {
$use_external_proxy=1;
$proxy_address=$ARGV[0];
}
elsif($ARGV[0] eq "-L") {
# require additional library file
shift @ARGV;
require $ARGV[0];
}
elsif($ARGV[0] eq "-l") {
# lists the test case names only
$listonly=1;
@ -5438,6 +5443,7 @@ Usage: runtests.pl [options] [test selection(s)]
-gw run the test case with gdb as a windowed application
-h this help text
-k keep stdout and stderr files present after tests
-L path require an additional perl library file to replace certain functions
-l list all test case names/descriptions
-n no valgrind
-P proxy use the specified proxy