Skip to content

Commit

Permalink
test/unit: fix bashism - use . instead of source and use regular …
Browse files Browse the repository at this point in the history
…syntax files
  • Loading branch information
mslehto committed Jan 5, 2017
1 parent 2c7f0b4 commit 915efd3
Show file tree
Hide file tree
Showing 40 changed files with 166 additions and 93 deletions.
2 changes: 1 addition & 1 deletion test/unit/1.sh
Expand Up @@ -19,7 +19,7 @@
# 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
. include/common

CFG=1.cfg

Expand Down
2 changes: 1 addition & 1 deletion test/unit/10.sh
Expand Up @@ -19,7 +19,7 @@
# 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
. include/common

cd $CTL_DIR

Expand Down
6 changes: 3 additions & 3 deletions test/unit/11.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

CFG=11.cfg

Expand Down
4 changes: 2 additions & 2 deletions test/unit/12.sh
Expand Up @@ -19,8 +19,8 @@
# 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
source include/require
. include/common
. include/require.sh

CFG=12.cfg
TMPFILE=`mktemp -t kamailio-test.XXXXXXXXXX`
Expand Down
6 changes: 3 additions & 3 deletions test/unit/13.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

CFG=13.cfg

Expand Down
4 changes: 2 additions & 2 deletions test/unit/14.sh
Expand Up @@ -19,8 +19,8 @@
# 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
source include/require
. include/common
. include/require.sh

CFG=14.cfg

Expand Down
4 changes: 2 additions & 2 deletions test/unit/15.sh
Expand Up @@ -19,8 +19,8 @@
# 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
source include/require
. include/common
. include/require.sh

CFG=15.cfg

Expand Down
4 changes: 2 additions & 2 deletions test/unit/16.sh
Expand Up @@ -19,8 +19,8 @@
# 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
source include/require
. include/common
. include/require.sh

# Needs a default kamailio database setup for postgres

Expand Down
4 changes: 2 additions & 2 deletions test/unit/17.sh
Expand Up @@ -19,8 +19,8 @@
# 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
source include/require
. include/common
. include/require.sh

if ! (check_kamailio && check_module "db_berkeley" ); then
exit 0
Expand Down
4 changes: 2 additions & 2 deletions test/unit/18.sh
Expand Up @@ -20,8 +20,8 @@
# 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
source include/require
. include/common
. include/require.sh

if ! (check_kamailio); then
exit 0
Expand Down
6 changes: 3 additions & 3 deletions test/unit/19.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_sipp && check_kamailio && check_module "db_mysql" && check_mysql); then
exit 0
Expand Down
6 changes: 3 additions & 3 deletions test/unit/2.sh
Expand Up @@ -21,9 +21,9 @@

# Needs a default kamailio database setup for mysql

source include/common
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

CFG=2.cfg

Expand Down
6 changes: 3 additions & 3 deletions test/unit/20.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_sipp && check_kamailio && check_module "db_mysql" && check_mysql); then
exit 0
Expand Down
6 changes: 3 additions & 3 deletions test/unit/21.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_sipp && check_kamailio && check_module "db_mysql" && check_mysql); then
exit 0
Expand Down
6 changes: 3 additions & 3 deletions test/unit/22.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_sipsak && check_kamailio && check_module "db_postgres" && check_postgres); then
exit 0
Expand Down
6 changes: 3 additions & 3 deletions test/unit/23.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_kamailio && check_module "carrierroute" && check_module "db_postgres" && check_postgres); then
exit 0
Expand Down
4 changes: 2 additions & 2 deletions test/unit/24.sh
Expand Up @@ -22,7 +22,7 @@
# Needs a mysql database, the root user password must be given
# in the file 'dbrootpw' in the test directory

source include/common
. include/common

if [ ! -f ~/.pgpass ] ; then
echo "no .pgpass file, not run"
Expand Down Expand Up @@ -55,4 +55,4 @@ mv $CTLRC.bak $CTLRC
mv $DBCTL.bak $DBCTL

cd -
exit $ret
exit $ret
6 changes: 3 additions & 3 deletions test/unit/25.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

function cleanup() {
killall -9 sipp > /dev/null 2>&1
Expand Down
6 changes: 3 additions & 3 deletions test/unit/26.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_kamailio && check_module "carrierroute" && check_module "db_mysql" && check_mysql); then
exit 0
Expand Down
6 changes: 3 additions & 3 deletions test/unit/27.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_sipp && check_kamailio && check_module "db_mysql" \
&& check_module "presence" && check_module "presence_xml" \
Expand Down
6 changes: 3 additions & 3 deletions test/unit/28.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_sipp && check_kamailio && check_module "db_mysql" && check_module "cpl-c" && check_mysql); then
exit 0
Expand Down
4 changes: 2 additions & 2 deletions test/unit/29.sh
Expand Up @@ -19,8 +19,8 @@
# 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
source include/require
. include/common
. include/require.sh

if ! (check_sipp && check_kamailio && check_module "db_postgres" && check_module "cpl-c"); then
exit 0
Expand Down
4 changes: 2 additions & 2 deletions test/unit/3.sh
Expand Up @@ -25,14 +25,14 @@
# If MySQL root password is empty, add in the file the line:
# PWSKIP=yes

source include/common
. include/common

if [ ! -f dbrootpw ] ; then
echo "no root password, not run"
exit 0
fi ;

source dbrootpw
. dbrootpw

tmp_name=""$RANDOM"_kamailiodb_tmp"

Expand Down
4 changes: 2 additions & 2 deletions test/unit/30.sh
Expand Up @@ -19,8 +19,8 @@
# 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
source include/require
. include/common
. include/require.sh

if ! (check_sipp && check_kamailio && check_module "carrierroute"); then
exit 0
Expand Down
6 changes: 3 additions & 3 deletions test/unit/31.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_kamailio && check_module "db_mysql" && check_mysql); then
exit 0
Expand Down
4 changes: 2 additions & 2 deletions test/unit/4.sh
Expand Up @@ -19,8 +19,8 @@
# 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
source include/require
. include/common
. include/require.sh

CFG=4.cfg

Expand Down
6 changes: 3 additions & 3 deletions test/unit/42.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_kamailio && check_module "carrierroute" && check_module "db_mysql" && check_mysql); then
exit 0
Expand Down
6 changes: 3 additions & 3 deletions test/unit/43.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_kamailio && check_module "utils" && check_module "db_mysql" && check_mysql); then
exit 0
Expand Down
6 changes: 3 additions & 3 deletions test/unit/44.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_sipsak && check_kamailio && check_module "db_unixodbc" && check_unixodbc); then
exit 0
Expand Down
6 changes: 3 additions & 3 deletions test/unit/45.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_sipp && check_kamailio && check_module "db_mysql" && check_mysql && check_module "memcached"); then
exit 0
Expand Down
6 changes: 3 additions & 3 deletions test/unit/46.sh
Expand Up @@ -19,9 +19,9 @@
# 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
source include/require
source include/database
. include/common
. include/require.sh
. include/database.sh

if ! (check_sipp && check_kamailio && check_module "db_mysql" && check_mysql ); then
exit 0
Expand Down
4 changes: 2 additions & 2 deletions test/unit/5.sh
Expand Up @@ -21,8 +21,8 @@

# Needs a default kamailio database setup for mysql

source include/common
source include/require
. include/common
. include/require.sh

CFG=$TOP_DIR/etc/kamailio.cfg

Expand Down

0 comments on commit 915efd3

Please sign in to comment.