2
0

logging.tcl 824 B

123456789101112131415161718192021222324
  1. set server_path [tmpdir server.log]
  2. set system_name [string tolower [exec uname -s]]
  3. if {$system_name eq {linux} || $system_name eq {darwin}} {
  4. start_server [list overrides [list dir $server_path]] {
  5. test "Server is able to generate a stack trace on selected systems" {
  6. r config set watchdog-period 200
  7. r debug sleep 1
  8. set pattern "*debugCommand*"
  9. set retry 10
  10. while {$retry} {
  11. set result [exec tail -100 < [srv 0 stdout]]
  12. if {[string match $pattern $result]} {
  13. break
  14. }
  15. incr retry -1
  16. after 1000
  17. }
  18. if {$retry == 0} {
  19. error "assertion:expected stack trace not found into log file"
  20. }
  21. }
  22. }
  23. }