Include second solo test execution in total test count (#1071)

This change counts both solo test executions to give an accurate total number of tests being run.

---------

Signed-off-by: Shivshankar-Reddy <shiva.sheri.github@gmail.com>
This commit is contained in:
Shivshankar 2024-10-04 13:19:44 -04:00 committed by GitHub
parent 6a8540cefe
commit 1c22680fa7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,6 +91,7 @@ set ::ignoredigest 0
set ::large_memory 0
set ::log_req_res 0
set ::force_resp3 0
set ::solo_tests_count 0
# Set to 1 when we are running in client mode. The server test uses a
# server-client model to run tests simultaneously. The server instance
@ -373,9 +374,10 @@ proc read_from_test_client fd {
signal_idle_client $fd
} elseif {$status eq {done}} {
set elapsed [expr {[clock seconds]-$::clients_start_time($fd)}]
set all_tests_count [llength $::all_tests]
set all_tests_count [expr {[llength $::all_tests]+$::solo_tests_count}]
set running_tests_count [expr {[llength $::active_clients]-1}]
set completed_tests_count [expr {$::next_test-$running_tests_count}]
set completed_solo_tests_count [expr {$::solo_tests_count-[llength $::run_solo_tests]}]
set completed_tests_count [expr {$::next_test-$running_tests_count+$completed_solo_tests_count}]
puts "\[$completed_tests_count/$all_tests_count [colorstr yellow $status]\]: $data ($elapsed seconds)"
lappend ::clients_time_history $elapsed $data
signal_idle_client $fd
@ -427,6 +429,7 @@ proc read_from_test_client fd {
set ::active_clients_task($fd) "(KILLED SERVER) pid:$data"
} elseif {$status eq {run_solo}} {
lappend ::run_solo_tests $data
incr ::solo_tests_count
} else {
if {!$::quiet} {
puts "\[$status\]: $data"