unit/protocol
unit/basic
unit/type/list
+ unit/type/list-2
+ unit/type/list-3
unit/type/set
unit/type/zset
unit/type/hash
unit/cas
unit/quit
integration/replication
+ integration/replication-2
+ integration/replication-3
integration/aof
unit/pubsub
unit/slowlog
}
# 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
set bytes [gets $fd]
set payload [read $fd $bytes]
foreach {status data} $payload break
- puts "($fd) \[$status\]: $data"
if {$status eq {ready}} {
+ puts "\[$status\]: $data"
signal_idle_client $fd
} elseif {$status eq {done}} {
set elapsed [expr {[clock seconds]-$::clients_start_time($fd)}]
- puts "+++ [llength $::active_clients] units still in execution ($elapsed seconds)."
+ puts "\[[colorstr yellow $status]\]: $data ($elapsed seconds)"
+ 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"
}
}
[lsearch -all -inline -not -exact $::active_clients $fd]
# New unit to process?
if {$::next_test != [llength $::all_tests]} {
- puts "Spawing new test process for: [lindex $::all_tests $::next_test]"
+ puts [colorstr bold-white "Testing [lindex $::all_tests $::next_test]"]
set ::clients_start_time($fd) [clock seconds]
send_data_packet $fd run [lindex $::all_tests $::next_test]
lappend ::active_clients $fd