You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kamailio/test/unit/include/require

70 lines
1.7 KiB

# Copyright (C) 2008 1&1 Internet AG
#
# This file is part of kamailio, a free SIP server.
#
# kamailio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version
#
# kamailio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
source include/common
function check_kamailio() {
if ! (test -e $BIN) ; then
echo "kamailio not found, not run"
return -1
fi;
return 0
}
function check_module() {
if [ $# -ne 1 ]; then
echo "wrong number of params in check_module()"
return -1
fi
if ! (test -e $SR_DIR/modules_k/$1/$1.so) ; then
echo "$SR_DIR/modules_k/$1/$1.so not found, try $SR_DIR/modules"
else
return 0
fi;
if ! (test -e $SR_DIR/modules/$1/$1.so) ; then
echo "$SR_DIR/modules/$1/$1.so not found, not run"
return -1
fi;
return 0
}
function check_netcat() {
if ! ( which nc > /dev/null ); then
echo "netcat not found, not run"
return -1
fi;
return 0
}
function check_sipp() {
if ! ( which sipp > /dev/null ); then
echo "sipp not found, not run"
return -1
fi;
return 0
}
function check_sipsak() {
if ! ( which sipsak > /dev/null ); then
echo "sipsak not found, not run"
return -1
fi;
return 0
}