]>
Commit | Line | Data |
---|---|---|
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 | ||
5 | set tcl_precision 17 | |
ab72b483 | 6 | source tests/support/redis.tcl |
7 | source tests/support/server.tcl | |
8 | source tests/support/tmpfile.tcl | |
9 | source tests/support/test.tcl | |
10 | source tests/support/util.tcl | |
98578b57 PN |
11 | |
12 | set ::host 127.0.0.1 | |
47bebf15 | 13 | set ::port 16379 |
98578b57 PN |
14 | set ::traceleaks 0 |
15 | ||
16 | proc 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 | |
23 | set ::clients {} | |
24 | proc r {args} { | |
25 | set client [lindex $::clients end] | |
26 | $client {*}$args | |
27 | } | |
28 | ||
29 | proc 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 | ||
51 | main |