From c43ad0f97283a7e25d61a81b9f9f238432ec494b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 3 Jan 2011 22:42:46 +0100 Subject: 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 tag set, so that the description file can get even simpler. --- tests/FILEFORMAT | 4 +++- tests/data/test1300 | 12 ++++-------- tests/runtests.pl | 9 +++++++++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/tests/FILEFORMAT b/tests/FILEFORMAT index 6a61dd000..f4565d32e 100644 --- a/tests/FILEFORMAT +++ b/tests/FILEFORMAT @@ -180,6 +180,7 @@ NTLM OpenSSL SSL socks +unittest 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 @@ -208,7 +209,8 @@ to have failed. Variables are substituted as in the section. 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'). diff --git a/tests/data/test1300 b/tests/data/test1300 index 8bbbecdef..100888561 100644 --- a/tests/data/test1300 +++ b/tests/data/test1300 @@ -2,6 +2,7 @@ unittest +llist @@ -11,20 +12,15 @@ unittest none + +unittest + llist unit tests unit1300 - -unit1300 - -# -# Verify data after the test has been "shot" - - - diff --git a/tests/runtests.pl b/tests/runtests.pl index 86bba844c..9f4430694 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -2314,6 +2314,11 @@ sub singletest { next; } } + elsif($f eq "unittest") { + if($debug_build) { + next; + } + } elsif($f eq "large_file") { if($large_file) { next; @@ -2562,6 +2567,10 @@ sub singletest { # substitute variables in the command line subVariables \$cmd; } + else { + # there was no command given, use something silly + $cmd="-"; + } if($curl_debug) { unlink($memdump); } -- cgit v1.2.3