r1932 - in trunk/varnish-tools: autobuild regress regress/bin regress/lib/Varnish
knutroy at projects.linpro.no
knutroy at projects.linpro.no
Mon Sep 3 12:12:29 CEST 2007
Author: knutroy
Date: 2007-09-03 12:12:29 +0200 (Mon, 03 Sep 2007)
New Revision: 1932
Added:
trunk/varnish-tools/regress/MANIFEST
trunk/varnish-tools/regress/Makefile.PL
trunk/varnish-tools/regress/bin/
trunk/varnish-tools/regress/bin/varnish-regress.pl
Removed:
trunk/varnish-tools/regress/varnish-regress.pl
Modified:
trunk/varnish-tools/autobuild/autobuild.sh
trunk/varnish-tools/regress/lib/Varnish/Test.pm
Log:
* Added Makefile.PL to test framework.
* Moved varnish-regress.pl to subdirectory "bin".
* Minor POD additions.
Modified: trunk/varnish-tools/autobuild/autobuild.sh
===================================================================
--- trunk/varnish-tools/autobuild/autobuild.sh 2007-08-31 12:14:06 UTC (rev 1931)
+++ trunk/varnish-tools/autobuild/autobuild.sh 2007-09-03 10:12:29 UTC (rev 1932)
@@ -85,7 +85,7 @@
) > build.log 2>&1
# Run regression test framework.
-PATH=/tmp/"$DIR"/sbin:"$PATH" trunk/varnish-tools/regress/varnish-regress.pl > regress.html 2> regress.log
+PATH=/tmp/"$DIR"/sbin:"$PATH" trunk/varnish-tools/regress/bin/varnish-regress.pl > regress.html 2> regress.log
# Update status file.
grep -A 4 '<th class="name">Total</th>' regress.html \
Added: trunk/varnish-tools/regress/MANIFEST
===================================================================
--- trunk/varnish-tools/regress/MANIFEST (rev 0)
+++ trunk/varnish-tools/regress/MANIFEST 2007-09-03 10:12:29 UTC (rev 1932)
@@ -0,0 +1,23 @@
+bin/varnish-regress.pl
+doc/README
+doc/structure.dia
+lib/Varnish/Test.pm
+lib/Varnish/Test/Case.pm
+lib/Varnish/Test/Case/LRU.pm
+lib/Varnish/Test/Case/POST.pm
+lib/Varnish/Test/Case/RePurge.pm
+lib/Varnish/Test/Case/Ticket056.pm
+lib/Varnish/Test/Case/Ticket102.pm
+lib/Varnish/Test/Case/Ticket128.pm
+lib/Varnish/Test/Case/Vary.pm
+lib/Varnish/Test/Client.pm
+lib/Varnish/Test/Engine.pm
+lib/Varnish/Test/Report.pm
+lib/Varnish/Test/Report/HTML.pm
+lib/Varnish/Test/Report/report.html
+lib/Varnish/Test/Server.pm
+lib/Varnish/Test/Varnish.pm
+Makefile.PL
+MANIFEST
+README
+TODO
Added: trunk/varnish-tools/regress/Makefile.PL
===================================================================
--- trunk/varnish-tools/regress/Makefile.PL (rev 0)
+++ trunk/varnish-tools/regress/Makefile.PL 2007-09-03 10:12:29 UTC (rev 1932)
@@ -0,0 +1,6 @@
+# $Id$
+
+use ExtUtils::MakeMaker;
+
+WriteMakefile(NAME => 'Varnish::Test',
+ EXE_FILES => ['bin/varnish-regress.pl']);
Property changes on: trunk/varnish-tools/regress/Makefile.PL
___________________________________________________________________
Name: svn:keywords
+ Id
Copied: trunk/varnish-tools/regress/bin/varnish-regress.pl (from rev 1931, trunk/varnish-tools/regress/varnish-regress.pl)
===================================================================
--- trunk/varnish-tools/regress/bin/varnish-regress.pl (rev 0)
+++ trunk/varnish-tools/regress/bin/varnish-regress.pl 2007-09-03 10:12:29 UTC (rev 1932)
@@ -0,0 +1,100 @@
+#!/usr/bin/perl -w
+#-
+# Copyright (c) 2006 Linpro AS
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer
+# in this position and unchanged.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $Id$
+#
+
+=head1 NAME
+
+varnish-regress.pl - run Varnish regression tests
+
+=cut
+
+use strict;
+
+eval { require Varnish::Test };
+if ($@) {
+ use FindBin;
+ use lib "$FindBin::Bin/../lib";
+}
+
+use Getopt::Long;
+use Varnish::Test;
+use Varnish::Test::Report::HTML;
+
+sub usage() {
+ print STDERR <<EOU;
+USAGE:
+
+ $0 [CASE ...]
+
+ where CASE is either a full case name or a ticket number. By
+ default, all available test cases will be run.
+
+Examples:
+
+ $0
+ $0 Ticket102
+ $0 102
+
+EOU
+ exit 1;
+}
+
+MAIN:{
+ GetOptions('help|h!' => \&usage)
+ or usage();
+
+ my $controller = new Varnish::Test;
+ my @all_cases = $controller->cases();
+
+ if (@ARGV == 1 && $ARGV[0] eq 'list') {
+ print join(' ', @all_cases), "\n";
+ exit 0;
+ }
+
+ if (!@ARGV) {
+ @ARGV = @all_cases;
+ } else {
+ map { s/^(\d+)$/sprintf('Ticket%03d', $1)/e } @ARGV;
+ }
+
+ $controller->start_engine();
+ foreach my $casename (@ARGV) {
+ $controller->run_case($casename);
+ }
+ $controller->stop_engine();
+
+ my $report = new Varnish::Test::Report::HTML;
+ $report->run($controller->results());
+}
+
+=head1 SEE ALSO
+
+L<Varnish::Test>
+
+=cut
Modified: trunk/varnish-tools/regress/lib/Varnish/Test.pm
===================================================================
--- trunk/varnish-tools/regress/lib/Varnish/Test.pm 2007-08-31 12:14:06 UTC (rev 1931)
+++ trunk/varnish-tools/regress/lib/Varnish/Test.pm 2007-09-03 10:12:29 UTC (rev 1932)
@@ -173,3 +173,12 @@
}
1;
+
+=head1 SEE ALSO
+
+L<Varnish::Test::Engine>
+L<Varnish::Test::Varnish>
+L<Varnish::Test::Server>
+L<Varnish::Test::Case>
+
+=cut
Deleted: trunk/varnish-tools/regress/varnish-regress.pl
===================================================================
--- trunk/varnish-tools/regress/varnish-regress.pl 2007-08-31 12:14:06 UTC (rev 1931)
+++ trunk/varnish-tools/regress/varnish-regress.pl 2007-09-03 10:12:29 UTC (rev 1932)
@@ -1,86 +0,0 @@
-#!/usr/bin/perl -w
-#-
-# Copyright (c) 2006 Linpro AS
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer
-# in this position and unchanged.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# $Id$
-#
-
-use strict;
-
-use FindBin;
-
-use lib "$FindBin::Bin/lib";
-
-use Getopt::Long;
-use Varnish::Test;
-use Varnish::Test::Report::HTML;
-
-sub usage() {
- print STDERR <<EOU;
-USAGE:
-
- $0 [CASE ...]
-
- where CASE is either a full case name or a ticket number. By
- default, all available test cases will be run.
-
-Examples:
-
- $0
- $0 Ticket102
- $0 102
-
-EOU
- exit 1;
-}
-
-MAIN:{
- GetOptions('help|h!' => \&usage)
- or usage();
-
- my $controller = new Varnish::Test;
- my @all_cases = $controller->cases();
-
- if (@ARGV == 1 && $ARGV[0] eq 'list') {
- print join(' ', @all_cases), "\n";
- exit 0;
- }
-
- if (!@ARGV) {
- @ARGV = @all_cases;
- } else {
- map { s/^(\d+)$/sprintf('Ticket%03d', $1)/e } @ARGV;
- }
-
- $controller->start_engine();
- foreach my $casename (@ARGV) {
- $controller->run_case($casename);
- }
- $controller->stop_engine();
-
- my $report = new Varnish::Test::Report::HTML;
- $report->run($controller->results());
-}
More information about the varnish-commit
mailing list