File: rivet.test

package info (click to toggle)
libapache2-mod-rivet 3.2.0-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 5,868 kB
  • sloc: xml: 8,496; tcl: 7,212; ansic: 6,959; sh: 5,030; makefile: 261; sql: 91; lisp: 78
file content (81 lines) | stat: -rwxr-xr-x 1,849 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/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.

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 {rivetlib.test 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 commands.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

#lappend TestList failtest.test

# 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.

set group3 {
        failtest.test
        broken.test
        config.test
        parsepackage.test
        virtualhost.test
        inspect.test 
        bailout.test
        channel.test
    }

if { $testgroup3 } {
    foreach Test $group3 {
        puts "Running $Test"
        source $Test
    }
}

::tcltest::cleanupTests