tcl-websh-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ron...@apache.org
Subject svn commit: r745278 - in /tcl/websh/trunk: ./ src/ src/apachetests/ src/apachetests/apachetest/ src/apachetests/conf/ src/apachetests/docs/ src/apachetests/test/ src/unix/
Date Tue, 17 Feb 2009 22:32:53 GMT
Author: ronnie
Date: Tue Feb 17 22:32:52 2009
New Revision: 745278

URL: http://svn.apache.org/viewvc?rev=745278&view=rev
Log:
- Revamped mod_websh test suite and added 'make apachetest'
  to src/unix/Makefile

Added:
    tcl/websh/trunk/src/apachetests/apachetest.tcl   (contents, props changed)
      - copied, changed from r743655, tcl/websh/trunk/src/apachetests/apachetest/apachetest.tcl
    tcl/websh/trunk/src/apachetests/conf/   (props changed)
      - copied from r743655, tcl/websh/trunk/src/apachetests/apachetest/
    tcl/websh/trunk/src/apachetests/conf/mime.types   (props changed)
      - copied unchanged from r743655, tcl/websh/trunk/src/apachetests/mime.types
    tcl/websh/trunk/src/apachetests/conf/server.conf.tcl   (contents, props changed)
      - copied, changed from r743655, tcl/websh/trunk/src/apachetests/apachetest/template.conf.tcl
    tcl/websh/trunk/src/apachetests/conf/websh.conf.tcl   (contents, props changed)
      - copied, changed from r743655, tcl/websh/trunk/src/apachetests/websh.conf
    tcl/websh/trunk/src/apachetests/docs/
    tcl/websh/trunk/src/apachetests/docs/headers.ws3   (props changed)
      - copied unchanged from r743655, tcl/websh/trunk/src/apachetests/headers.ws3
    tcl/websh/trunk/src/apachetests/docs/hello.ws3   (props changed)
      - copied unchanged from r743655, tcl/websh/trunk/src/apachetests/hello.ws3
    tcl/websh/trunk/src/apachetests/docs/pool.ws3   (props changed)
      - copied unchanged from r743655, tcl/websh/trunk/src/apachetests/pool.ws3
    tcl/websh/trunk/src/apachetests/docs/pool2.ws3   (contents, props changed)
      - copied, changed from r743655, tcl/websh/trunk/src/apachetests/pool2.ws3
    tcl/websh/trunk/src/apachetests/test/
    tcl/websh/trunk/src/apachetests/test/headers.test   (props changed)
      - copied unchanged from r743655, tcl/websh/trunk/src/apachetests/headers.test
    tcl/websh/trunk/src/apachetests/test/hello.test   (contents, props changed)
      - copied, changed from r743655, tcl/websh/trunk/src/apachetests/hello.test
    tcl/websh/trunk/src/apachetests/test/mod_websh.test   (contents, props changed)
      - copied, changed from r743655, tcl/websh/trunk/src/apachetests/mod_websh.test
    tcl/websh/trunk/src/apachetests/test/pool.test   (contents, props changed)
      - copied, changed from r743655, tcl/websh/trunk/src/apachetests/pool.test
Removed:
    tcl/websh/trunk/src/apachetests/apachetest/
    tcl/websh/trunk/src/apachetests/conf/apachetest.tcl
    tcl/websh/trunk/src/apachetests/conf/template.conf.tcl
    tcl/websh/trunk/src/apachetests/headers.test
    tcl/websh/trunk/src/apachetests/headers.ws3
    tcl/websh/trunk/src/apachetests/hello.test
    tcl/websh/trunk/src/apachetests/hello.ws3
    tcl/websh/trunk/src/apachetests/mime.types
    tcl/websh/trunk/src/apachetests/mod_websh.test
    tcl/websh/trunk/src/apachetests/pool.test
    tcl/websh/trunk/src/apachetests/pool.ws3
    tcl/websh/trunk/src/apachetests/pool2.ws3
    tcl/websh/trunk/src/apachetests/websh.conf
Modified:
    tcl/websh/trunk/CHANGES
    tcl/websh/trunk/src/ChangeLog
    tcl/websh/trunk/src/apachetests/README
    tcl/websh/trunk/src/apachetests/runtests.tcl
    tcl/websh/trunk/src/unix/Makefile.in

Modified: tcl/websh/trunk/CHANGES
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/CHANGES?rev=745278&r1=745277&r2=745278&view=diff
==============================================================================
--- tcl/websh/trunk/CHANGES (original)
+++ tcl/websh/trunk/CHANGES Tue Feb 17 22:32:52 2009
@@ -9,6 +9,9 @@
 Trunk
 -----
 
+- Revamped mod_websh tests: better directory structure and integrated
+  into src/unix/Makefile: 'make apachetest' now runs the test suite
+
 - Compiles with Tcl 8.6
 
 - Minor documentation fixes

Modified: tcl/websh/trunk/src/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/ChangeLog?rev=745278&r1=745277&r2=745278&view=diff
==============================================================================
--- tcl/websh/trunk/src/ChangeLog (original)
+++ tcl/websh/trunk/src/ChangeLog Tue Feb 17 22:32:52 2009
@@ -1,3 +1,11 @@
+2009-02-17 Brunner Ronnie <ronnie.brunner@netcetera.ch>
+	* src/apachetests:
+	- Better directory structure
+	- Adapted to invokation through Makefile (in src/unix)
+	* src/unix/Makefile.in:
+	- Added apachetest rule: make apachetest now runs test suite for 
+	  mod_websh
+
 2009-02-11 Brunner Ronnie <ronnie.brunner@netcetera.ch>
 	* doc/quickref.xml:
 	- Note that web::response -httpresponse does not work with all 

Modified: tcl/websh/trunk/src/apachetests/README
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/apachetests/README?rev=745278&r1=745277&r2=745278&view=diff
==============================================================================
--- tcl/websh/trunk/src/apachetests/README (original)
+++ tcl/websh/trunk/src/apachetests/README Tue Feb 17 22:32:52 2009
@@ -2,7 +2,7 @@
 			 ===================
 	  $Id$
 
-Testing system for mod_websh.
+Test suite for mod_websh.
 
 This system attempts to analyze and use an installed Apache binary to
 test the mod_websh installation.
@@ -11,13 +11,23 @@
 
 ./runtests.tcl /path/to/apache/binary/httpd
 
-for example:
-
-@ashland [~/workshop/tcl-websh/src/apachetests] $ ./runtests.tcl /usr/sbin/apache
-mod_websh.test: Total   1       Passed  1       Skipped 0       Failed 0
+Note that the environment needs to be set properly. For easier setup, 
+run this test suite from the ../unix direcotry using 'make apachetest'. 
+This will setup the environment according to the parameters given when 
+mod_websh was compiled (Tcl library, libwebsh.so, httpd ...)
 
 The tests work by analyzing the apache binary (to see if it has the
 necessary modules, and to see if it has mod_websh loaded).  After
 that, a minimal configuration file is created and Apache is run in
-single process mode, to serve requests for the tests, which are in
-turn generated by Tcl's http package.
+single process mode (Port 8081), to serve requests for the tests, which 
+are in turn generated by Tcl's http package.
+
+conf/
+    contains the server.conf.tcl and websh.conf.tcl configuration 
+    templates. (server.conf and websh.conf will be created at runtime)
+
+docs/
+    document root containing test files to be serverd during tests
+
+test/
+    contains tcltest test files
\ No newline at end of file

Copied: tcl/websh/trunk/src/apachetests/apachetest.tcl (from r743655, tcl/websh/trunk/src/apachetests/apachetest/apachetest.tcl)
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/apachetests/apachetest.tcl?p2=tcl/websh/trunk/src/apachetests/apachetest.tcl&p1=tcl/websh/trunk/src/apachetests/apachetest/apachetest.tcl&r1=743655&r2=745278&rev=745278&view=diff
==============================================================================
--- tcl/websh/trunk/src/apachetests/apachetest/apachetest.tcl (original)
+++ tcl/websh/trunk/src/apachetests/apachetest.tcl Tue Feb 17 22:32:52 2009
@@ -7,7 +7,6 @@
 # the name of the Apache executable, which must, however, be compiled
 # with the right options.
 
-package require Tclx
 package provide apachetest 0.1
 
 namespace eval apachetest {
@@ -37,21 +36,30 @@
     # name of the apache binary, such as /usr/sbin/httpd
     variable binname ""
     # this file should be in the same directory this script is.
-    variable templatefile [file join [file dirname [info script]] \
-			       template.conf.tcl]
+    variable templatefile [file join conf server.conf.tcl]
+    variable templatewebshconf [file join conf websh.conf.tcl]
 }
 
 # make sure we can connect to the server
-
 proc apachetest::connect { } {
-    while { 1 } {
+
+    global waiting
+    set waiting 10
+
+    set connect [after 5000 {set waiting 0}]
+
+    while {$waiting > 9} {
 	if { ! [catch {
 	    set sk [socket localhost 8081]
 	} err]} {
 	    close $sk
-	    return
+	    after cancel $connect
+	    return 1
 	}
+	after 10 {incr waiting}
+	vwait waiting
     }
+    return 0
 }
 
 # start - start the server in the background with 'options' and then
@@ -62,18 +70,39 @@
     variable binname
 
     # There has got to be a better way to do this, aside from waiting.
-    set serverpid [eval exec  $binname -X -f \
-		       [file join [pwd] server.conf] $options &]
+#    set serverpid [eval exec  $binname -X -f \
+#		       [file join [pwd] server.conf] $options &]
+
+    set serverhandle [open "|$binname -X -f [file join [pwd] conf server.conf]" r]
+    set serverpid [pid $serverhandle]
+    fconfigure $serverhandle -blocking 0
 
-    apachetest::connect
     puts "Apache started as PID $serverpid"
-    if { [catch {
-	uplevel $code
-    } err] } {
-	puts $err
+
+    if {[apachetest::connect]} {
+	if { [catch {
+	    uplevel $code
+	} err] } {
+	    puts $err
+	}
+    } else {
+	error "Could not connect to Apache"
     }
-    kill $serverpid
-    wait $serverpid
+
+    exec kill $serverpid
+    set kill9 [after 2500 "
+	puts stderr \"Can't kill process, trying with kill -9\";
+	exec kill -9 $serverpid
+    "]
+    global waiting
+    set waiting 1
+    while {![eof $serverhandle]} {
+	gets $serverhandle
+	after 500 {incr waiting}
+	vwait waiting
+    }
+    after cancel $kill9
+    puts "Apache stopped"
     catch {file delete httpd.pid}
 }
 
@@ -89,15 +118,19 @@
     }
 }
 
-# getbinname - get the name of the apache binary, and check to make
-# sure it's ok.  The user should supply this parameter.
+# setbinname - set the name of the apache binary
 
-proc apachetest::getbinname { argv } {
+proc apachetest::setbinname { name } {
     variable binname
-    set binname [lindex $argv 0]
-    if { $binname == "" || ! [file exists $binname] } {
-	error "Please supply the full name and path of the Apache executable on the command line!"
+    global argv0
+    if {![file exists $name]} {
+	puts stderr "Please supply the full name and path of the Apache executable"
+	puts stderr "on the command line (or in the HTTPD_BIN environment variable):"
+	puts stderr "$argv0 /path/to/httpd"
+	exit 1
     }
+
+    set binname $name
     return $binname
 }
 
@@ -206,6 +239,7 @@
 # extra is for extra config things we want to tack on.
 
 proc apachetest::makeconf { outfile {extra ""} } {
+    global env
     variable binname
     variable templatefile
     set CWD [pwd]
@@ -215,7 +249,25 @@
 
     set fl [open [file join . $templatefile] r]
     set template [read $fl]
+    close $fl
+
     append template $extra
+
+    set out [subst $template]
+
+    set of [open $outfile w]
+    puts $of "$out"
+    close $of
+}
+
+proc apachetest::makewebshconf {outfile} {
+    global env
+    variable templatewebshconf
+    set CWD [pwd]
+
+    # replace with determinemodules
+    set fl [open [file join . $templatewebshconf] r]
+    set template [read $fl]
     close $fl
 
     set out [subst $template]

Propchange: tcl/websh/trunk/src/apachetests/apachetest.tcl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tcl/websh/trunk/src/apachetests/apachetest.tcl
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tcl/websh/trunk/src/apachetests/apachetest.tcl
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: tcl/websh/trunk/src/apachetests/conf/
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: tcl/websh/trunk/src/apachetests/conf/mime.types
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tcl/websh/trunk/src/apachetests/conf/mime.types
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tcl/websh/trunk/src/apachetests/conf/mime.types
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: tcl/websh/trunk/src/apachetests/conf/server.conf.tcl (from r743655, tcl/websh/trunk/src/apachetests/apachetest/template.conf.tcl)
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/apachetests/conf/server.conf.tcl?p2=tcl/websh/trunk/src/apachetests/conf/server.conf.tcl&p1=tcl/websh/trunk/src/apachetests/apachetest/template.conf.tcl&r1=743655&r2=745278&rev=745278&view=diff
==============================================================================
--- tcl/websh/trunk/src/apachetests/apachetest/template.conf.tcl (original)
+++ tcl/websh/trunk/src/apachetests/conf/server.conf.tcl Tue Feb 17 22:32:52 2009
@@ -17,9 +17,9 @@
 
 ServerName localhost
 
-DocumentRoot "$CWD"
+DocumentRoot "$CWD/docs"
 
-<Directory "$CWD">
+<Directory "$CWD/docs">
 Options All MultiViews
 AllowOverride All
 Order allow,deny
@@ -35,7 +35,7 @@
 HostnameLookups Off
 
 ErrorLog $CWD/error_log
-TypesConfig $CWD/mime.types
+TypesConfig $CWD/conf/mime.types
 LockFile $CWD/httpd.lock
 
 LogLevel debug

Propchange: tcl/websh/trunk/src/apachetests/conf/server.conf.tcl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tcl/websh/trunk/src/apachetests/conf/server.conf.tcl
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tcl/websh/trunk/src/apachetests/conf/server.conf.tcl
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: tcl/websh/trunk/src/apachetests/conf/websh.conf.tcl (from r743655, tcl/websh/trunk/src/apachetests/websh.conf)
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/apachetests/conf/websh.conf.tcl?p2=tcl/websh/trunk/src/apachetests/conf/websh.conf.tcl&p1=tcl/websh/trunk/src/apachetests/websh.conf&r1=743655&r2=745278&rev=745278&view=diff
==============================================================================
--- tcl/websh/trunk/src/apachetests/websh.conf (original)
+++ tcl/websh/trunk/src/apachetests/conf/websh.conf.tcl Tue Feb 17 22:32:52 2009
@@ -1,17 +1,16 @@
 # WebshConfig file
 
-# $Id$
+# \$Id: websh.conf 383380 2006-03-05 19:41:49Z ronnie \$
 
 proc web::interpmap {file} {
 
     # hello test
-    if {[string match "*/my_script_hello.ws3" $file]} {
-	return [file join [file dirname $file] hello.ws3]
+    if {\[string match "*/my_script_hello.ws3" \$file\]} {
+	return \[file join \[file dirname \$file\] hello.ws3\]
     }
 
     # standard tests
-    return $file
+    return \$file
 }
 
-web::interpclasscfg /home/ronnie/projects/apache/websh/src/apachetests/memory.ws3 maxrequests
0
-#web::interpclasscfg /home/ronnie/projects/apache/websh/src/apachetests/t.ws3 maxrequests
0
+web::interpclasscfg $CWD/docs/pool2.ws3 maxrequests 10

Propchange: tcl/websh/trunk/src/apachetests/conf/websh.conf.tcl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tcl/websh/trunk/src/apachetests/conf/websh.conf.tcl
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tcl/websh/trunk/src/apachetests/conf/websh.conf.tcl
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: tcl/websh/trunk/src/apachetests/docs/headers.ws3
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tcl/websh/trunk/src/apachetests/docs/headers.ws3
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tcl/websh/trunk/src/apachetests/docs/headers.ws3
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: tcl/websh/trunk/src/apachetests/docs/hello.ws3
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tcl/websh/trunk/src/apachetests/docs/hello.ws3
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tcl/websh/trunk/src/apachetests/docs/hello.ws3
------------------------------------------------------------------------------
    svn:mergeinfo = 

Propchange: tcl/websh/trunk/src/apachetests/docs/pool.ws3
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tcl/websh/trunk/src/apachetests/docs/pool.ws3
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tcl/websh/trunk/src/apachetests/docs/pool.ws3
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: tcl/websh/trunk/src/apachetests/docs/pool2.ws3 (from r743655, tcl/websh/trunk/src/apachetests/pool2.ws3)
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/apachetests/docs/pool2.ws3?p2=tcl/websh/trunk/src/apachetests/docs/pool2.ws3&p1=tcl/websh/trunk/src/apachetests/pool2.ws3&r1=743655&r2=745278&rev=745278&view=diff
==============================================================================
--- tcl/websh/trunk/src/apachetests/pool2.ws3 (original)
+++ tcl/websh/trunk/src/apachetests/docs/pool2.ws3 Tue Feb 17 22:32:52 2009
@@ -4,17 +4,25 @@
 web::initializer {
 
     set classid [web::interpcfg]
-    web::interpclasscfg $classid maxrequests 10
 
     web::command default {
-	if { [info exists counter] } {
+	if {[info exists counter]} {
 	    incr counter
 	} else {
 	    set counter 1
 	}
-	web::put "Counter is $counter, maxrequests is [web::interpclasscfg $classid maxrequests]"
+	web::put "Counter is [web::interpcfg numreq]-$counter, maxrequests is [web::interpclasscfg
$classid maxrequests]"
     }
 
+    web::command max {
+	if { [info exists counter] } {
+	    incr counter
+	} else {
+	    set counter 1
+	}
+	web::interpclasscfg $classid maxrequests 7
+	web::put "Counter is [web::interpcfg numreq]-$counter, reset maxrequests to [web::interpclasscfg
$classid maxrequests]"
+    }
 }
 
 web::dispatch

Propchange: tcl/websh/trunk/src/apachetests/docs/pool2.ws3
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tcl/websh/trunk/src/apachetests/docs/pool2.ws3
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tcl/websh/trunk/src/apachetests/docs/pool2.ws3
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: tcl/websh/trunk/src/apachetests/runtests.tcl
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/apachetests/runtests.tcl?rev=745278&r1=745277&r2=745278&view=diff
==============================================================================
--- tcl/websh/trunk/src/apachetests/runtests.tcl (original)
+++ tcl/websh/trunk/src/apachetests/runtests.tcl Tue Feb 17 22:32:52 2009
@@ -2,19 +2,45 @@
 # the next line restarts using tclsh \
 exec tclsh "$0" "$@"
 
-source [file join apachetest apachetest.tcl]
+source apachetest.tcl
 
-apachetest::getbinname $argv
+global env
+if {![info exists env(HTTPD_BIN)] || ![string length $env(HTTPD_BIN)]} {
+    if {[string length [lindex $argv 0]]} {
+	# get from commandline
+	set httpdbin [lindex $argv 0]
+	if {[regexp -- {^-I"?(.*?)"?$} $httpdbin all include]} {
+	    # special case for call by Makefile
+	    set env(HTTPD_BIN) [file join [file dirname $include] bin httpd]
+	} else {
+	    # direct call (just binary on command line)
+	    set env(HTTPD_BIN) [lindex $argv 0]
+	}
+    } elseif {[file exists httpd]} {
+	set env(HTTPD_BIN) [file join [pwd] httpd]
+    } else {
+	# don't know what to do
+	set env(HTTPD_BIN) ""
+    }
+}
+
+if {![info exists env(MOD_WEBSH)]} {
+    set env(MOD_WEBSH) [lindex [glob [file join [pwd] .. unix "mod_websh*[info sharedlibextension]"]]
0]
+}
+
+apachetest::setbinname $env(HTTPD_BIN)
 
-apachetest::makeconf server.conf {
+apachetest::makeconf conf/server.conf {
 
-LoadModule websh_module [file join $CWD .. unix "mod_websh3.6.0b4[info sharedlibextension]"]
+LoadModule websh_module $env(MOD_WEBSH)
 AddHandler websh .ws3
 
-WebshConfig [file join $CWD websh.conf]
+WebshConfig [file join [pwd] conf websh.conf]
 
 }
 
+apachetest::makewebshconf conf/websh.conf
+
 # we do this to keep tcltest happy - it reads argv...
 set commandline [lindex $argv 1]
 set argv {}
@@ -24,6 +50,6 @@
 	apachetest::startserver
     }
     default {
-	source [file join . mod_websh.test]
+	source [file join test mod_websh.test]
     }
 }

Propchange: tcl/websh/trunk/src/apachetests/test/headers.test
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tcl/websh/trunk/src/apachetests/test/headers.test
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tcl/websh/trunk/src/apachetests/test/headers.test
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: tcl/websh/trunk/src/apachetests/test/hello.test (from r743655, tcl/websh/trunk/src/apachetests/hello.test)
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/apachetests/test/hello.test?p2=tcl/websh/trunk/src/apachetests/test/hello.test&p1=tcl/websh/trunk/src/apachetests/hello.test&r1=743655&r2=745278&rev=745278&view=diff
==============================================================================
--- tcl/websh/trunk/src/apachetests/hello.test (original)
+++ tcl/websh/trunk/src/apachetests/test/hello.test Tue Feb 17 22:32:52 2009
@@ -7,10 +7,10 @@
 
 set CWD [pwd]
 set response "Hello, World\n"
-append response "script: $CWD/$testfilename\n"
+append response "script: $CWD/docs/$testfilename\n"
 append response "server_root: $CWD\n"
-append response "document_root: $CWD\n"
-append response "interpclass: $CWD/$testinterpclass\n"
+append response "document_root: $CWD/docs\n"
+append response "interpclass: $CWD/docs/$testinterpclass\n"
 
 ::tcltest::test hello-1.1 {hello world test} {
     apachetest::start {} {

Propchange: tcl/websh/trunk/src/apachetests/test/hello.test
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tcl/websh/trunk/src/apachetests/test/hello.test
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tcl/websh/trunk/src/apachetests/test/hello.test
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: tcl/websh/trunk/src/apachetests/test/mod_websh.test (from r743655, tcl/websh/trunk/src/apachetests/mod_websh.test)
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/apachetests/test/mod_websh.test?p2=tcl/websh/trunk/src/apachetests/test/mod_websh.test&p1=tcl/websh/trunk/src/apachetests/mod_websh.test&r1=743655&r2=745278&rev=745278&view=diff
==============================================================================
--- tcl/websh/trunk/src/apachetests/mod_websh.test (original)
+++ tcl/websh/trunk/src/apachetests/test/mod_websh.test Tue Feb 17 22:32:52 2009
@@ -22,7 +22,7 @@
 # block of code.  See man tcltest for more information.
 
 foreach Test {hello.test pool.test headers.test} {
-    source $Test
+    source [file join test $Test]
 }
 
 ::tcltest::cleanupTests

Propchange: tcl/websh/trunk/src/apachetests/test/mod_websh.test
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tcl/websh/trunk/src/apachetests/test/mod_websh.test
------------------------------------------------------------------------------
    svn:executable = *

Propchange: tcl/websh/trunk/src/apachetests/test/mod_websh.test
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tcl/websh/trunk/src/apachetests/test/mod_websh.test
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: tcl/websh/trunk/src/apachetests/test/pool.test (from r743655, tcl/websh/trunk/src/apachetests/pool.test)
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/apachetests/test/pool.test?p2=tcl/websh/trunk/src/apachetests/test/pool.test&p1=tcl/websh/trunk/src/apachetests/pool.test&r1=743655&r2=745278&rev=745278&view=diff
==============================================================================
--- tcl/websh/trunk/src/apachetests/pool.test (original)
+++ tcl/websh/trunk/src/apachetests/test/pool.test Tue Feb 17 22:32:52 2009
@@ -20,7 +20,19 @@
 	set page [ ::http::geturl "${urlbase}$testfilename2" ]
 	set page [ ::http::geturl "${urlbase}$testfilename2" ]
 	set page [ ::http::geturl "${urlbase}$testfilename2" ]
+	set match1 [::http::data $page]
+	set page [ ::http::geturl "${urlbase}$testfilename2?cmd=max" ]
+	set match2 [::http::data $page]
+	set page [ ::http::geturl "${urlbase}$testfilename2" ]
+	set match3 [::http::data $page]
+	set page [ ::http::geturl "${urlbase}$testfilename2" ]
+	set page [ ::http::geturl "${urlbase}$testfilename2" ]
+	set page [ ::http::geturl "${urlbase}$testfilename2" ]
+	set match4 [::http::data $page]
     }
-    set match [::http::data $page]
-    set match
-} {Counter is 3, maxrequests is 10}
+    set res "\n  $match1\n  $match2\n  $match3\n  $match4"
+} {
+  Counter is 2-3, maxrequests is 10
+  Counter is 3-4, reset maxrequests to 7
+  Counter is 4-5, maxrequests is 7
+  Counter is 0-1, maxrequests is 7}

Propchange: tcl/websh/trunk/src/apachetests/test/pool.test
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tcl/websh/trunk/src/apachetests/test/pool.test
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: tcl/websh/trunk/src/apachetests/test/pool.test
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: tcl/websh/trunk/src/unix/Makefile.in
URL: http://svn.apache.org/viewvc/tcl/websh/trunk/src/unix/Makefile.in?rev=745278&r1=745277&r2=745278&view=diff
==============================================================================
--- tcl/websh/trunk/src/unix/Makefile.in (original)
+++ tcl/websh/trunk/src/unix/Makefile.in Tue Feb 17 22:32:52 2009
@@ -227,6 +227,19 @@
 	umask 0; \
 	(echo source webtest.ws3) | ../unix/websh$(VERSION).cov
 
+apachetest: mod_websh.so
+	@LD_LIBRARY_PATH="$(strip $(TCL_PACKAGE_PATH)):$(TOP_DIR)/unix:$(LD_LIBRARY_PATH)"; \
+	export LD_LIBRARY_PATH; \
+	TCL_LIBRARY="$(TCL_SRC_DIR)/library"; export TCL_LIBRARY; \
+	WEB_LIBRARY=$(TOP_DIR)/unix/$(web_LIB_FILE); export WEB_LIBRARY; \
+	WEB_BIN=$(TOP_DIR)/unix/websh$(VERSION); export WEB_BIN; \
+	MOD_WEBSH=$(TOP_DIR)/unix/mod_websh$(MODULE_LIB_SUFFIX); \
+	export MOD_WEBSH; \
+	HTTPD_BIN=$(HTTPD_BIN); export HTTPD_BIN; \
+	TCLLIBPATH=$(TCL_PACKAGE_PATH); export TCLLIBPATH; \
+	cd $(TOP_DIR)/apachetests; \
+	$(TOP_DIR)/unix/websh$(VERSION) runtests.tcl $(HTTPD_INCLUDES)
+
 depend:
 
 # =============================================================================



---------------------------------------------------------------------
To unsubscribe, e-mail: websh-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-cvs-help@tcl.apache.org


Mime
View raw message