mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Merge pull request #430 from anydot/f-testsuite
Two changes of testsuite (killing redis and new option)
This commit is contained in:
commit
0934a4df93
@ -46,11 +46,16 @@ proc kill_server config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# kill server and wait for the process to be totally exited
|
# kill server and wait for the process to be totally exited
|
||||||
|
catch {exec kill $pid}
|
||||||
while {[is_alive $config]} {
|
while {[is_alive $config]} {
|
||||||
if {[incr wait 10] % 1000 == 0} {
|
incr wait 10
|
||||||
|
|
||||||
|
if {$wait >= 5000} {
|
||||||
|
puts "Forcing process $pid to exit..."
|
||||||
|
catch {exec kill -KILL $pid}
|
||||||
|
} elseif {$wait % 1000 == 0} {
|
||||||
puts "Waiting for process $pid to exit..."
|
puts "Waiting for process $pid to exit..."
|
||||||
}
|
}
|
||||||
catch {exec kill $pid}
|
|
||||||
after 10
|
after 10
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,6 +345,7 @@ proc print_help_screen {} {
|
|||||||
"--quiet Don't show individual tests."
|
"--quiet Don't show individual tests."
|
||||||
"--single <unit> Just execute the specified unit (see next option)."
|
"--single <unit> Just execute the specified unit (see next option)."
|
||||||
"--list-tests List all the available test units."
|
"--list-tests List all the available test units."
|
||||||
|
"--clients <num> Number of test clients (16)."
|
||||||
"--force-failure Force the execution of a test that always fails."
|
"--force-failure Force the execution of a test that always fails."
|
||||||
"--help Print this help screen."
|
"--help Print this help screen."
|
||||||
} "\n"]
|
} "\n"]
|
||||||
@ -390,6 +391,9 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
|
|||||||
set ::client 1
|
set ::client 1
|
||||||
set ::test_server_port $arg
|
set ::test_server_port $arg
|
||||||
incr j
|
incr j
|
||||||
|
} elseif {$opt eq {--clients}} {
|
||||||
|
set ::numclients $arg
|
||||||
|
incr j
|
||||||
} elseif {$opt eq {--help}} {
|
} elseif {$opt eq {--help}} {
|
||||||
print_help_screen
|
print_help_screen
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user