Support running with arbitrary other servers.

This commit is contained in:
Tony Garnock-Jones 2014-05-05 11:02:03 -04:00
parent 63d0ffaf73
commit 1c33949f3b
1 changed files with 16 additions and 2 deletions

View File

@ -15,7 +15,8 @@
["--host" name "hostname where server is reachable" (set! server-hostname name)]
#:once-any
["--erlang" "use erlang server" (set! server-variation 'erlang)]
["--minimart" "use minimart server" (set! server-variation 'minimart)])
["--minimart" "use minimart server" (set! server-variation 'minimart)]
["--other" name "use other server" (set! server-variation name)])
(when (not server-variation)
(error 'external-latency "Please choose a server variation."))
@ -50,7 +51,14 @@
#:label "erlang-version"
(string-trim (with-output-to-string
(lambda () (system erlang-version-command)))))
"./run-erlang-server.sh"])))
"./run-erlang-server.sh"]
[(? string? other)
(printf "Please start the other server on hostname '~a' now.\n" server-hostname)
(printf "Press enter when it has started.\n")
(read-line)
(printf "Continuing...\n")
"true"
])))
(sleep 5)
@ -64,6 +72,12 @@
(log-info "Waiting for client termination...")
(client-control 'wait)
(log-info "Waiting for server termination...")
(void (match server-variation
[(? string? other)
(printf "Press enter when the server has terminated.\n")
(read-line)]))
(server-control 'wait)
(log-info "Done.")