Support running with arbitrary other servers.
This commit is contained in:
parent
63d0ffaf73
commit
1c33949f3b
|
@ -15,7 +15,8 @@
|
||||||
["--host" name "hostname where server is reachable" (set! server-hostname name)]
|
["--host" name "hostname where server is reachable" (set! server-hostname name)]
|
||||||
#:once-any
|
#:once-any
|
||||||
["--erlang" "use erlang server" (set! server-variation 'erlang)]
|
["--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)
|
(when (not server-variation)
|
||||||
(error 'external-latency "Please choose a server variation."))
|
(error 'external-latency "Please choose a server variation."))
|
||||||
|
@ -50,7 +51,14 @@
|
||||||
#:label "erlang-version"
|
#:label "erlang-version"
|
||||||
(string-trim (with-output-to-string
|
(string-trim (with-output-to-string
|
||||||
(lambda () (system erlang-version-command)))))
|
(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)
|
(sleep 5)
|
||||||
|
|
||||||
|
@ -64,6 +72,12 @@
|
||||||
|
|
||||||
(log-info "Waiting for client termination...")
|
(log-info "Waiting for client termination...")
|
||||||
(client-control 'wait)
|
(client-control 'wait)
|
||||||
|
|
||||||
(log-info "Waiting for server termination...")
|
(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)
|
(server-control 'wait)
|
||||||
(log-info "Done.")
|
(log-info "Done.")
|
||||||
|
|
Loading…
Reference in New Issue