aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-01-04 13:20:17 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-01-04 13:20:17 +0000
commitb4fdc025a89d3e573a587c1f4f74aa29d06611aa (patch)
tree293b62ecc4fd993f725a5047ea53ced0fcb2e78b /tests
parentf1c14fe0b4bdf28088e63db809699c3f751e2759 (diff)
-l lists all tests
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.pl27
1 files changed, 19 insertions, 8 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index dc695dbe9..be8cb87c7 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -68,6 +68,8 @@ my $debugprotocol;
my $anyway;
my $gdbthis; # run test case with gdb debugger
my $keepoutfiles; # keep stdout and stderr files after tests
+my $listonly; # only list the tests
+
my $pwd; # current working directory
chomp($pwd = `pwd`);
@@ -427,14 +429,6 @@ sub singletest {
my $CURLOUT="$LOGDIR/curl$testnum.out"; # curl output if not stdout
- # remove previous server output logfile
- unlink($SERVERIN);
-
- if(@ftpservercmd) {
- # write the instructions to file
- writearray($FTPDCMD, \@ftpservercmd);
- }
-
# name of the test
my @testname= getpart("client", "name");
@@ -445,6 +439,18 @@ sub singletest {
print "[$name]\n";
}
+ if($listonly) {
+ return 0; # look successful
+ }
+
+ # remove previous server output logfile
+ unlink($SERVERIN);
+
+ if(@ftpservercmd) {
+ # write the instructions to file
+ writearray($FTPDCMD, \@ftpservercmd);
+ }
+
# get the command line options to use
my ($cmd, @blaha)= getpart("client", "command");
@@ -775,6 +781,10 @@ do {
# continue anyway, even if a test fail
$anyway=1;
}
+ elsif($ARGV[0] eq "-l") {
+ # lists the test case names only
+ $listonly=1;
+ }
elsif($ARGV[0] eq "-k") {
# keep stdout and stderr files after tests
$keepoutfiles=1;
@@ -788,6 +798,7 @@ Usage: runtests.pl [options]
-g run the test case with gdb
-h this help text
-k keep stdout and stderr files present after tests
+ -l list all test case names/descriptions
-s short output
-v verbose output
[num] like "5 6 9" or " 5 to 22 " to run those tests only