Commit 2469e470 authored by Per Cederqvist's avatar Per Cederqvist

(dbck_run): New proc.

(lyskomd_death): Call dbck_run to check the database after each shutdown.
parent 6f7db70e
......@@ -499,8 +499,43 @@ proc lyskomd_death {} {
}
system "cat etc/memory-usage >> usage.all"
check_memory_usage
dbck_run
}
proc dbck_run {} {
global nl
global test
global any_num
spawn ../dbck -d config/lyskomd-config
set test "dbck started"
expect_after {
timeout { fail "$test (timeout)" }
eof { fail "$test (eof)" }
}
expect {
-re "^MSG: init_cache: using datafile\.$nl" { pass "$test" }
}
set test "dbck sent second line"
expect {
-re "^Read $any_num confs/persons and $any_num texts, eof at $any_num$nl" {
pass "$test"
}
}
set test "dbck sent final line"
expect {
-re "^Press enter to terminate dbck$nl" {
pass "$test"
}
}
send "\n"
set test "dbck died"
expect {
eof { pass "$test"; wait }
}
unset test
}
proc client_start {nr} {
global client_id
global clientport
......
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