blob: 5663325bcfe9c33e36de924efd3704e4c0909f05 [file] [log] [blame]
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
# Rivet test suite, by David N. Welton <davidw@apache.org>
# See README file for more information.
# $Id$
package require tcltest
set auto_path [linsert $auto_path 0 [file join [pwd] rivet]]
set urlbase "http://localhost:8081/"
# Use this to start and stop the server:
set TestList {shorthand.test headers.test cookies.test get.test post.test tclfile.test env.test hello.test include.test binary.test parse.test upload.test makeurl.test}
# Test stanzas are created by giving the test a name and a
# description. The code is then executed, and the results compared
# with the desired result, which is placed after the block of code.
# See man tcltest for more information.
set testgroup1 1
set testgroup2 1
set testgroup3 1
# Run all tests against one server process.
if { $testgroup1 } {
puts -nonewline "Running all tests against one server process."
flush stdout
apachetest::start {} {} {
foreach Test $TestList {
puts -nonewline "."
flush stdout
source $Test
}
}
puts " done"
}
# Run each test in its own server.
if { $testgroup2 } {
foreach Test $TestList {
apachetest::start {} {} {
puts "Running $Test"
source $Test
}
}
}
# These tests start the server on their own, or don't need the server
# at all.
if { $testgroup3 } {
foreach Test {
broken.test
config.test
lang.test
parsepackage.test
virtualhost.test
} {
puts "Running $Test"
source $Test
}
}
::tcltest::cleanupTests