]> git.saurik.com Git - redis.git/blame - tests/test_helper.tcl
ZUNION,ZINTER -> ZUNIONSTORE,ZINTERSTORE
[redis.git] / tests / test_helper.tcl
CommitLineData
98578b57
PN
1# Redis test suite. Copyright (C) 2009 Salvatore Sanfilippo antirez@gmail.com
2# This softare is released under the BSD License. See the COPYING file for
3# more information.
4
5set tcl_precision 17
ab72b483 6source tests/support/redis.tcl
7source tests/support/server.tcl
8source tests/support/tmpfile.tcl
9source tests/support/test.tcl
10source tests/support/util.tcl
98578b57
PN
11
12set ::host 127.0.0.1
47bebf15 13set ::port 16379
98578b57
PN
14set ::traceleaks 0
15
16proc execute_tests name {
17 set cur $::testnum
ab72b483 18 source "tests/$name.tcl"
98578b57
PN
19}
20
21# setup a list to hold a stack of clients. the proc "r" provides easy
22# access to the client at the top of the stack
23set ::clients {}
24proc r {args} {
25 set client [lindex $::clients end]
26 $client {*}$args
27}
28
29proc main {} {
30 execute_tests "unit/auth"
31 execute_tests "unit/protocol"
32 execute_tests "unit/basic"
33 execute_tests "unit/type/list"
34 execute_tests "unit/type/set"
35 execute_tests "unit/type/zset"
36 execute_tests "unit/type/hash"
37 execute_tests "unit/sort"
38 execute_tests "unit/expire"
39 execute_tests "unit/other"
40
41 puts "\n[expr $::passed+$::failed] tests, $::passed passed, $::failed failed"
42 if {$::failed > 0} {
43 puts "\n*** WARNING!!! $::failed FAILED TESTS ***\n"
44 }
45
46 # clean up tmp
ab72b483 47 exec rm -rf {*}[glob tests/tmp/redis.conf.*]
48 exec rm -rf {*}[glob tests/tmp/server.*]
98578b57
PN
49}
50
51main