-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_server
executable file
·18 lines (16 loc) · 744 Bytes
/
run_server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
set -o pipefail
set -e
serverName=localhost/mutinackTesting
if [ ! -z $1 ]; then serverName="$1"; fi
tmp_dir=$(mktemp -d /tmp/Mutinack_server_PID.XXXXXX)
trap 'rm -Rf "$tmp_dir"' EXIT INT TERM HUP
tmp_pipe=${tmp_dir}/pid
mkfifo -m 600 "${tmp_pipe}"
(java -Djavax.net.ssl.trustStore=mutinack_public_trustStore -Djavax.net.ssl.trustStorePassword=changeit -Djava.security.manager -Djava.security.policy==java.policy -jar mutinack.jar -recordRunsTo recordedFunctionalTestRuns.bin -startServer ${serverName} -writePIDPath ${tmp_pipe} -noStatusMessages > run_server_out_err 2>&1 || true; (echo FAILED > ${tmp_pipe}) 2> /dev/null) > /dev/null &
result=`cat "${tmp_pipe}"`
if [ "${result}" = "FAILED" ];
then
exit 1
fi
echo ${result}