Commit dd8d883c authored by antirez's avatar antirez
Browse files

Sentiel test: add test start time in output.

parent c5edd917
...@@ -101,9 +101,9 @@ proc parse_options {} { ...@@ -101,9 +101,9 @@ proc parse_options {} {
} elseif {$opt eq "--help"} { } elseif {$opt eq "--help"} {
puts "Hello, I'm sentinel.tcl and I run Sentinel unit tests." puts "Hello, I'm sentinel.tcl and I run Sentinel unit tests."
puts "\nOptions:" puts "\nOptions:"
puts "--single <pattern> Only runs tests specified by pattern." puts "--single <pattern> Only runs tests specified by pattern."
puts "--pause-on-error Pause for manual inspection on error." puts "--pause-on-error Pause for manual inspection on error."
puts "--help Shows this help." puts "--help Shows this help."
exit 0 exit 0
} else { } else {
puts "Unknown option $opt" puts "Unknown option $opt"
...@@ -137,7 +137,8 @@ proc pause_on_error {} { ...@@ -137,7 +137,8 @@ proc pause_on_error {} {
# We redefine 'test' as for Sentinel we don't use the server-client # We redefine 'test' as for Sentinel we don't use the server-client
# architecture for the test, everything is sequential. # architecture for the test, everything is sequential.
proc test {descr code} { proc test {descr code} {
puts -nonewline "> $descr: " set ts [clock format [clock seconds] -format %H:%M:%S]
puts -nonewline "$ts> $descr: "
flush stdout flush stdout
if {[catch {set retval [uplevel 1 $code]} error]} { if {[catch {set retval [uplevel 1 $code]} error]} {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment