mirror of https://gitee.com/bigwinds/arangodb
added unittests.sh
This commit is contained in:
parent
ebc9062a56
commit
993dd2858e
37
build.sh
37
build.sh
|
@ -3,19 +3,18 @@
|
|||
echo "########################################################"
|
||||
echo "# build.sh #"
|
||||
echo "########################################################"
|
||||
echo
|
||||
|
||||
. config/detect_distro.sh
|
||||
|
||||
OPTIONS="--disable-dependency-tracking --disable-relative"
|
||||
PREFIX="--prefix=/usr --sysconfdir=/etc"
|
||||
RESULTS="avocado avocsh"
|
||||
RESULTS="avocado avocsh avocirb"
|
||||
|
||||
export CPPFLAGS=""
|
||||
export LDFLAGS=""
|
||||
export MAKEJ=2
|
||||
export LDD_INFO="no"
|
||||
export VALGRIND_TEST="no"
|
||||
export RSPEC_AVAILABLE="yes"
|
||||
|
||||
echo
|
||||
echo "########################################################"
|
||||
|
@ -34,7 +33,6 @@ case $TRI_OS_LONG in
|
|||
Linux-openSUSE-11*)
|
||||
echo "Using configuration for openSuSE 11"
|
||||
OPTIONS="$OPTIONS --enable-all-in-one"
|
||||
VALGRIND_TEST="yes"
|
||||
LDD_INFO="yes"
|
||||
;;
|
||||
|
||||
|
@ -48,14 +46,12 @@ case $TRI_OS_LONG in
|
|||
echo "Using configuration for Debian"
|
||||
OPTIONS="$OPTIONS --enable-all-in-one"
|
||||
LDD_INFO="yes"
|
||||
RSPEC_AVAILABLE="no"
|
||||
;;
|
||||
|
||||
Linux-CentOS-*)
|
||||
echo "Using configuration for Centos"
|
||||
OPTIONS="$OPTIONS --enable-all-in-one"
|
||||
LDD_INFO="yes"
|
||||
RSPEC_AVAILABLE="no"
|
||||
;;
|
||||
|
||||
Linux-Ubuntu-11.10*)
|
||||
|
@ -123,32 +119,3 @@ for result in $RESULTS; do
|
|||
echo
|
||||
fi
|
||||
done
|
||||
|
||||
echo
|
||||
|
||||
echo
|
||||
echo "########################################################"
|
||||
echo "unittests:"
|
||||
echo " make unittests"
|
||||
echo "########################################################"
|
||||
echo
|
||||
|
||||
make unittests-boost || exit 1
|
||||
make unittests-shell-server || exit 1
|
||||
|
||||
if text "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 --leak-check=full" || exit 1
|
||||
fi
|
||||
|
|
|
@ -0,0 +1,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/avocado.supp --leak-check=full" || exit 1
|
||||
fi
|
Loading…
Reference in New Issue