-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathlocal
executable file
·46 lines (35 loc) · 1010 Bytes
/
local
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
#!/bin/bash
. tools/ci/common.sh
# Hardcoded in docker.sh
cntr="scion"
if [ -n "$DOCKER" ]; then
# Stop a local scion run because we don't want to interfere
./scion.sh stop
echo "Stop local zookeeper"
systemctl is-active --quiet zookeeper && { sudo service zookeeper stop || exit 1; }
fi
./docker.sh build || exit 1
[ -n "$DOCKER" ] && { make -sC docker/perapp || exit 1; }
docker container inspect "$cntr" &>/dev/null && { echo "Removing stale container"; docker rm -f "$cntr"; }
tmpdir=$(mktemp -d /tmp/artifacts.XXXXXXX)
SCION_MOUNT="$tmpdir" ./docker.sh start || exit 1
result=0
./tools/ci/build
result=$((result+$?))
./tools/ci/lint
result=$((result+$?))
./tools/ci/unittest
result=$((result+$?))
./tools/ci/sphinx
result=$((result+$?))
./tools/ci/integration
result=$((result+$?))
echo "Artifacts dir: $tmpdir"
[ $result -eq 0 ] && ./docker.sh stop
./scion.sh stop
if [ $result -eq 0 ]; then
echo "All tests successful"
else
echo "$result tests failed"
fi
exit $result