-proc execute_everything {} {
- if 0 {
- # Use this when hacking on new tests.
- set ::verbose 1
- execute_tests "unit/first"
- return
- }
-
- execute_tests "unit/printver"
- 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"
- execute_tests "unit/scripting"
-
- return; # No diskstore tests for now...
- # run tests with diskstore enabled
- puts "\nRunning diskstore tests... this is slow, press Ctrl+C if not interested.."
- set ::diskstore 1
- lappend ::denytags nodiskstore
- 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 {} {