/
unittests.sh
executable file
路105 lines (81 loc) 路 2.3 KB
/
unittests.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/bash
echo "########################################################"
echo "# build.sh #"
echo "########################################################"
echo
. config/detect_distro.sh
export VALGRIND_TEST="no"
export RSPEC_AVAILABLE="yes"
echo
echo "########################################################"
echo "Building on $TRI_OS_LONG"
echo "########################################################"
echo
case $TRI_OS_LONG in
Linux-openSUSE-11.4*)
echo "Using configuration for openSuSE 11.4"
;;
Linux-openSUSE-11*)
echo "Using configuration for openSuSE 11"
VALGRIND_TEST="yes"
;;
Linux-Debian-6*)
echo "Using configuration for Debian"
;;
Linux-Debian*)
echo "Using configuration for Debian"
RSPEC_AVAILABLE="no"
;;
Linux-CentOS-*)
echo "Using configuration for Centos"
RSPEC_AVAILABLE="no"
;;
Linux-Ubuntu-11.10*)
echo "Using configuration for Ubuntu"
;;
Linux-Ubuntu-*)
echo "Using configuration for Ubuntu"
;;
Darwin*)
echo "Using configuration for DARWIN"
;;
*)
echo "Using default configuration"
;;
esac
while [ $? -ne 0 ]; do
if [ "$1" == "--valgrind" ]; then
VALGRIND_TEST="yes"
elif [ "$1" == "--no-valgrind" ]; then
VALGRIND_TEST="no"
elif [ "$1" == "--resc" ]; then
RSPEC_AVAILABLE="yes"
elif [ "$1" == "--no-resc" ]; then
RSPEC_AVAILABLE="no"
fi
shift
done
echo
echo "########################################################"
echo "unittests:"
echo " make unittests"
echo "########################################################"
echo
echo "VALGRIND: $VALGRIND_TEST"
echo "RSPEC: $RSPEC_AVAILABLE"
make unittests-boost || exit 1
make unittests-shell-server || exit 1
make unittests-shell-server-ahuacatl || exit 1
if test "x$RSPEC_AVAILABLE" = "xyes"; then
make unittests-http-server || exit 1
fi
make unittests-shell-client || exit 1
if test "x$VALGRIND_TEST" = "xyes"; then
echo
echo "########################################################"
echo "unittests with VALGRIND:"
echo " make unittests VALGRIND=valgrind --leak-check=full"
echo "########################################################"
echo
make unittests VALGRIND="valgrind --suppressions=RestServer/arango.supp --leak-check=full" || exit 1
fi