Browse Source

Add an expect-based test for starting and stopping the server

The test reads for specific output in startup and shutdown to ensure
things are OK.
modded
parent
commit
d19f9729fb
Signed by: hristoast GPG Key ID: 5FC7664AD47AA1C5
  1. 19
      test-start-server

19
test-start-server

@ -0,0 +1,19 @@
#!/usr/bin/expect -f
# Try to spawn a server process. Ensure it started properly by reading for a
# specific string. Once found, send a newline to gracefully stop the server.
# Then check for two success strings before considering all to be well.
set timeout -1
spawn make
expect "Called \"OnServerPostInit\""
send -- "\n"
expect "Error state: false"
expect "Quitting peacefully."
expect eof
Loading…
Cancel
Save