mirror of
https://github.com/moparisthebest/curl
synced 2025-03-01 09:51:46 -05:00
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:
parent
4421359e77
commit
b47ee58fb7
@ -136,7 +136,7 @@ test1136 test1137 test1138 test1139 test1140 test1141 test1142 test1143 \
|
||||
test1144 test1145 test1146 test1147 test1148 test1149 test1150 test1151 \
|
||||
test1152 test1153 test1154 test1155 test1156 test1157 test1158 test1159 \
|
||||
test1160 test1161 test1162 test1163 test1164 test1165 test1166 test1167 \
|
||||
test1168 test1170 test1171 test1172 test1173 test1174 test1175 \
|
||||
test1168 test1169 test1170 test1171 test1172 test1173 test1174 test1175 \
|
||||
test1176 test1177 test1178 test1179 test1180 test1181 \
|
||||
\
|
||||
test1188 \
|
||||
|
35
tests/data/test1169
Normal file
35
tests/data/test1169
Normal file
@ -0,0 +1,35 @@
|
||||
<testcase>
|
||||
<info>
|
||||
<keywords>
|
||||
runtests.pl
|
||||
</keywords>
|
||||
</info>
|
||||
|
||||
#
|
||||
# Client-side
|
||||
<client>
|
||||
<server>
|
||||
none
|
||||
</server>
|
||||
<name>
|
||||
Verify that runtests.pl accepts an -L option
|
||||
</name>
|
||||
|
||||
<command type="perl">
|
||||
%SRCDIR/runtests.pl -L %SRCDIR/log/test1196-library.pl
|
||||
</command>
|
||||
# Create a simple perl snippet that lets runtests.pl
|
||||
# exit with a code we can check.
|
||||
<precheck>
|
||||
echo 'exit 123' > %SRCDIR/log/test1196-library.pl
|
||||
</precheck>
|
||||
|
||||
</client>
|
||||
|
||||
<verify>
|
||||
<errorcode>
|
||||
123
|
||||
</errorcode>
|
||||
</verify>
|
||||
|
||||
</testcase>
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user