]> git.saurik.com Git - redis.git/blobdiff - tests/test_helper.tcl
list test further split into smaller units
[redis.git] / tests / test_helper.tcl
index 2bb18bc9ee14abb7bf74f8c925d32975a6b29ba1..8629fa57ca9c14ffa4940b35ea904c0eeb389df3 100644 (file)
@@ -15,6 +15,8 @@ set ::all_tests {
     unit/protocol
     unit/basic
     unit/type/list
+    unit/type/list-2
+    unit/type/list-3
     unit/type/set
     unit/type/zset
     unit/type/hash
@@ -24,6 +26,8 @@ set ::all_tests {
     unit/cas
     unit/quit
     integration/replication
+    integration/replication-2
+    integration/replication-3
     integration/aof
     unit/pubsub
     unit/slowlog
@@ -166,9 +170,11 @@ proc test_server_main {} {
     }
 
     # Start the client instances
+    set ::clients_pids {}
     for {set j 0} {$j < $::numclients} {incr j} {
-        exec tclsh8.5 [info script] {*}$::argv \
-            --client $port --port [expr {$::port+($j*10)}] &
+        set p [exec tclsh8.5 [info script] {*}$::argv \
+            --client $port --port [expr {$::port+($j*10)}] &]
+        lappend ::clients_pids $p
     }
 
     # Setup global state for the test server
@@ -215,13 +221,21 @@ proc read_from_test_client fd {
     } elseif {$status eq {done}} {
         set elapsed [expr {[clock seconds]-$::clients_start_time($fd)}]
         puts "\[[colorstr yellow $status]\]: $data ($elapsed seconds)"
-        puts "+++ [llength $::active_clients] units still in execution."
+        puts "+++ [expr {[llength $::active_clients]-1}] units still in execution."
         lappend ::clients_time_history $elapsed $data
         signal_idle_client $fd
     } elseif {$status eq {ok}} {
         puts "\[[colorstr green $status]\]: $data"
     } elseif {$status eq {err}} {
         puts "\[[colorstr red $status]\]: $data"
+    } elseif {$status eq {exception}} {
+        puts "\[[colorstr red $status]\]: $data"
+        foreach p $::clients_pids {
+            catch {exec kill -9 $p}
+        }
+        exit 1
+    } elseif {$status eq {testing}} {
+        # No op
     } else {
         puts "\[$status\]: $data"
     }