mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
unittests: a dedicated feature in tests
The test runner script now knows if unittests can run and the unit test setup file says it is one. I also made runtests.pl deal with no <command> tag set, so that the description file can get even simpler.
This commit is contained in:
parent
53640a3ce0
commit
c43ad0f972
@ -180,6 +180,7 @@ NTLM
|
|||||||
OpenSSL
|
OpenSSL
|
||||||
SSL
|
SSL
|
||||||
socks
|
socks
|
||||||
|
unittest
|
||||||
|
|
||||||
as well as each protocol that curl supports. A protocol only needs to be
|
as well as each protocol that curl supports. A protocol only needs to be
|
||||||
specified if it is different from the server (useful when the server
|
specified if it is different from the server (useful when the server
|
||||||
@ -208,7 +209,8 @@ to have failed. Variables are substituted as in the <command> section.
|
|||||||
|
|
||||||
<tool>
|
<tool>
|
||||||
Name of tool to use instead of "curl". This tool must be built and exist
|
Name of tool to use instead of "curl". This tool must be built and exist
|
||||||
in the libtest/ directory.
|
either in the libtest/ directory (if the tool starts with 'lib') or in the
|
||||||
|
unit/ directory (if the tool starts with 'unit').
|
||||||
</tool>
|
</tool>
|
||||||
|
|
||||||
<name>
|
<name>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<info>
|
<info>
|
||||||
<keywords>
|
<keywords>
|
||||||
unittest
|
unittest
|
||||||
|
llist
|
||||||
</keywords>
|
</keywords>
|
||||||
</info>
|
</info>
|
||||||
|
|
||||||
@ -11,20 +12,15 @@ unittest
|
|||||||
<server>
|
<server>
|
||||||
none
|
none
|
||||||
</server>
|
</server>
|
||||||
|
<features>
|
||||||
|
unittest
|
||||||
|
</features>
|
||||||
<name>
|
<name>
|
||||||
llist unit tests
|
llist unit tests
|
||||||
</name>
|
</name>
|
||||||
<tool>
|
<tool>
|
||||||
unit1300
|
unit1300
|
||||||
</tool>
|
</tool>
|
||||||
<command>
|
|
||||||
unit1300
|
|
||||||
</command>
|
|
||||||
</client>
|
</client>
|
||||||
|
|
||||||
#
|
|
||||||
# Verify data after the test has been "shot"
|
|
||||||
<verify>
|
|
||||||
|
|
||||||
</verify>
|
|
||||||
</testcase>
|
</testcase>
|
||||||
|
@ -2314,6 +2314,11 @@ sub singletest {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elsif($f eq "unittest") {
|
||||||
|
if($debug_build) {
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
}
|
||||||
elsif($f eq "large_file") {
|
elsif($f eq "large_file") {
|
||||||
if($large_file) {
|
if($large_file) {
|
||||||
next;
|
next;
|
||||||
@ -2562,6 +2567,10 @@ sub singletest {
|
|||||||
# substitute variables in the command line
|
# substitute variables in the command line
|
||||||
subVariables \$cmd;
|
subVariables \$cmd;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
# there was no command given, use something silly
|
||||||
|
$cmd="-";
|
||||||
|
}
|
||||||
if($curl_debug) {
|
if($curl_debug) {
|
||||||
unlink($memdump);
|
unlink($memdump);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user