forked from COVESA/vissr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathruntest.sh
executable file
·48 lines (38 loc) · 909 Bytes
/
runtest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
usage() {
echo "usage: $0 startme|stopme" >&2
}
startme() {
echo "Starting server"
screen -S vissv2server -dm bash -c "pushd server/vissv2server && go build && mkdir -p logs && ./vissv2server -m &> ./logs/vissv2server-log.txt && popd"
echo "Starting feederv3"
screen -S feederv3 -dm bash -c "pushd feeder/feeder-template/feederv3 && go build && mkdir -p logs && ./feederv3 -i vssjson &> ./logs/feederv3-log.txt && popd"
echo "Starting testClient"
screen -S testClient bash -c "pushd client/client-1.0/testClient && go build && ./testClient && popd"
screen -list
}
stopme() {
echo "Stopping feederv3"
screen -X -S feederv3 quit
echo "Stopping vissv2server"
screen -X -S vissv2server quit
sleep 1
screen -wipe
}
if [ $# -ne 1 ] && [ $# -ne 2 ]
then
usage $0
exit 1
fi
case "$1" in
startme)
stopme
startme $# $2;;
stopme)
stopme
;;
*)
usage
exit 1
;;
esac