-proc execute_everything {} {
- execute_tests "unit/auth"
- execute_tests "unit/protocol"
- execute_tests "unit/basic"
- execute_tests "unit/type/list"
- execute_tests "unit/type/set"
- execute_tests "unit/type/zset"
- execute_tests "unit/type/hash"
- execute_tests "unit/sort"
- execute_tests "unit/expire"
- execute_tests "unit/other"
- execute_tests "unit/cas"
- execute_tests "unit/quit"
- execute_tests "integration/replication"
- execute_tests "integration/aof"
-# execute_tests "integration/redis-cli"
- execute_tests "unit/pubsub"
-
- # run tests with diskstore enabled
- set ::diskstore 1
- set ::global_overrides {diskstore-enabled yes}
- execute_tests "unit/protocol"
- execute_tests "unit/basic"
- execute_tests "unit/type/list"
- execute_tests "unit/type/set"
- execute_tests "unit/type/zset"
- execute_tests "unit/type/hash"
- execute_tests "unit/sort"
- execute_tests "unit/expire"
- execute_tests "unit/other"
- execute_tests "unit/cas"
-}
-
-proc main {} {
+proc find_available_port start {
+ for {set j $start} {$j < $start+1024} {incr j} {
+ if {[catch {
+ set fd [socket 127.0.0.1 $j]
+ }]} {
+ return $j
+ } else {
+ close $fd
+ }
+ }
+ if {$j == $start+1024} {
+ error "Can't find a non busy port in the $start-[expr {$start+1023}] range."
+ }
+}
+
+proc test_server_main {} {