[asterisk-commits] pabelanger: branch pabelanger/run_tests r373437 - in /team/pabelanger/run_tes...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Sep 24 13:53:57 CDT 2012
Author: pabelanger
Date: Mon Sep 24 13:53:53 2012
New Revision: 373437
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373437
Log:
Import latest changes
Also some bug fixes that need to be merged into asterisk
Modified:
team/pabelanger/run_tests/autoconf/ast_check_pwlib.m4
team/pabelanger/run_tests/channels/chan_h323.c
team/pabelanger/run_tests/contrib/scripts/install_prereq
team/pabelanger/run_tests/run_tests.sh
team/pabelanger/run_tests/tools/compile.sh
team/pabelanger/run_tests/tools/hook.d/F20Prerequisites.sh
team/pabelanger/run_tests/tools/pbuilderrc
Modified: team/pabelanger/run_tests/autoconf/ast_check_pwlib.m4
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/run_tests/autoconf/ast_check_pwlib.m4?view=diff&rev=373437&r1=373436&r2=373437
==============================================================================
--- team/pabelanger/run_tests/autoconf/ast_check_pwlib.m4 (original)
+++ team/pabelanger/run_tests/autoconf/ast_check_pwlib.m4 Mon Sep 24 13:53:53 2012
@@ -116,7 +116,9 @@
PWLIB_LIBDIR="/usr/local/lib"
fi
fi
- PWLIB_LIB=`${PTLIB_CONFIG} --ldflags --libs`
+ if test "${PTLIB_CONFIG:-unset}" != "unset" ; then
+ PWLIB_LIB=`${PTLIB_CONFIG} --ldflags --libs`
+ fi
PWLIB_LIB="-L${PWLIB_LIBDIR} `echo ${PWLIB_LIB}`"
else
AC_CHECK_HEADER(/usr/include/ptlib.h, HAS_PWLIB=1, )
@@ -134,7 +136,9 @@
PWLIB_LIBDIR="/usr/lib"
fi
fi
- PWLIB_LIB=`${PTLIB_CONFIG} --ldflags --libs`
+ if test "${PTLIB_CONFIG:-unset}" != "unset" ; then
+ PWLIB_LIB=`${PTLIB_CONFIG} --ldflags --libs`
+ fi
PWLIB_LIB="-L${PWLIB_LIBDIR} `echo ${PWLIB_LIB}`"
fi
fi
@@ -153,7 +157,7 @@
PWLIBDIR=`$PTLIB_CONFIG --prefix`
else
echo "Cannot find ptlib-config - please install and try again"
- exit
+ #exit
fi
fi
Modified: team/pabelanger/run_tests/channels/chan_h323.c
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/run_tests/channels/chan_h323.c?view=diff&rev=373437&r1=373436&r2=373437
==============================================================================
--- team/pabelanger/run_tests/channels/chan_h323.c (original)
+++ team/pabelanger/run_tests/channels/chan_h323.c Mon Sep 24 13:53:53 2012
@@ -346,8 +346,8 @@
if (h323debug)
ast_debug(1, "Preparing %s for new native format\n", ast_channel_name(c));
ast_format_cap_from_old_bitfield(ast_channel_nativeformats(c), pvt->nativeformats);
- ast_set_read_format(c, &c->readformat);
- ast_set_write_format(c, &c->writeformat);
+ ast_set_read_format(c, ast_channel_readformat(c));
+ ast_set_write_format(c, ast_channel_writeformat(c));
}
if (pvt->needhangup) {
if (h323debug)
@@ -787,8 +787,8 @@
pvt->nativeformats = ast_format_to_old_bitfield(&f->subclass.format);
- ast_set_read_format(pvt->owner, &pvt->owner->readformat);
- ast_set_write_format(pvt->owner, &pvt->owner->writeformat);
+ ast_set_read_format(pvt->owner, ast_channel_readformat(pvt->owner));
+ ast_set_write_format(pvt->owner, ast_channel_writeformat(pvt->owner));
ast_channel_unlock(pvt->owner);
}
/* Do in-band DTMF detection */
@@ -854,7 +854,7 @@
if (!(ast_format_cap_iscompatible(ast_channel_nativeformats(c), &frame->subclass.format))) {
char tmp[256];
ast_log(LOG_WARNING, "Asked to transmit frame type '%s', while native formats is '%s' (read/write = %s/%s)\n",
- ast_getformatname(&frame->subclass.format), ast_getformatname_multiple(tmp, sizeof(tmp), ast_channel_nativeformats(c)), ast_getformatname(&c->readformat), ast_getformatname(&c->writeformat));
+ ast_getformatname(&frame->subclass.format), ast_getformatname_multiple(tmp, sizeof(tmp), ast_channel_nativeformats(c)), ast_getformatname(ast_channel_readformat(c)), ast_getformatname(ast_channel_writeformat(c)));
return 0;
}
}
@@ -1061,10 +1061,10 @@
pvt->nativeformats = ast_format_cap_to_old_bitfield(ast_channel_nativeformats(ch));
ast_best_codec(ast_channel_nativeformats(ch), &tmpfmt);
- ast_format_copy(&ch->writeformat, &tmpfmt);
- ast_format_copy(&ch->rawwriteformat, &tmpfmt);
- ast_format_copy(&ch->readformat, &tmpfmt);
- ast_format_copy(&ch->rawreadformat, &tmpfmt);
+ ast_format_copy(ast_channel_writeformat(ch), &tmpfmt);
+ ast_format_copy(ast_channel_rawwriteformat(ch), &tmpfmt);
+ ast_format_copy(ast_channel_readformat(ch), &tmpfmt);
+ ast_format_copy(ast_channel_rawreadformat(ch), &tmpfmt);
if (!pvt->rtp)
__oh323_rtp_create(pvt);
#if 0
@@ -2079,11 +2079,11 @@
if (!(ast_format_cap_identical(ast_channel_nativeformats(pvt->owner), pvt_native))) {
if (h323debug) {
char tmp[256], tmp2[256];
- ast_debug(1, "Native format changed to '%s' from '%s', read format is %s, write format is %s\n", ast_getformatname_multiple(tmp, sizeof(tmp), pvt_native), ast_getformatname_multiple(tmp2, sizeof(tmp2), ast_channel_nativeformats(pvt->owner)), ast_getformatname(&pvt->owner->readformat), ast_getformatname(&pvt->owner->writeformat));
+ ast_debug(1, "Native format changed to '%s' from '%s', read format is %s, write format is %s\n", ast_getformatname_multiple(tmp, sizeof(tmp), pvt_native), ast_getformatname_multiple(tmp2, sizeof(tmp2), ast_channel_nativeformats(pvt->owner)), ast_getformatname(ast_channel_readformat(pvt->owner)), ast_getformatname(ast_channel_writeformat(pvt->owner)));
}
ast_format_cap_copy(ast_channel_nativeformats(pvt->owner), pvt_native);
- ast_set_read_format(pvt->owner, &pvt->owner->readformat);
- ast_set_write_format(pvt->owner, &pvt->owner->writeformat);
+ ast_set_read_format(pvt->owner, ast_channel_readformat(pvt->owner));
+ ast_set_write_format(pvt->owner, ast_channel_writeformat(pvt->owner));
}
if (pvt->options.progress_audio)
ast_queue_control(pvt->owner, AST_CONTROL_PROGRESS);
Modified: team/pabelanger/run_tests/contrib/scripts/install_prereq
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/run_tests/contrib/scripts/install_prereq?view=diff&rev=373437&r1=373436&r2=373437
==============================================================================
--- team/pabelanger/run_tests/contrib/scripts/install_prereq (original)
+++ team/pabelanger/run_tests/contrib/scripts/install_prereq Mon Sep 24 13:53:53 2012
@@ -18,93 +18,49 @@
echo "Usage: $0 install-unpackaged Really install unpackaged requirements."
}
-# Basic build system:
-PACKAGES_DEBIAN="build-essential"
-# Asterisk: basic requirements:
-PACKAGES_DEBIAN="$PACKAGES_DEBIAN libncurses-dev libz-dev libssl-dev libxml2-dev libsqlite3-dev"
-# Asterisk: for addons:
-PACKAGES_DEBIAN="$PACKAGES_DEBIAN libcurl-dev libspeex-dev libspeexdsp-dev libogg-dev libvorbis-dev libasound2-dev portaudio19-dev libcurl4-openssl-dev"
-PACKAGES_DEBIAN="$PACKAGES_DEBIAN libpq-dev unixodbc-dev libsqlite0-dev libmysqlclient15-dev libneon27-dev libgmime-dev libusb-dev liblua5.1-0-dev lua5.1"
-PACKAGES_DEBIAN="$PACKAGES_DEBIAN libopenh323-dev libvpb-dev libgtk2.0-dev libmysqlclient-dev libbluetooth-dev libradiusclient-ng-dev freetds-dev"
-PACKAGES_DEBIAN="$PACKAGES_DEBIAN libsnmp-dev libiksemel-dev libcorosync-dev libnewt-dev libpopt-dev libical-dev libspandsp-dev libjack-dev"
-PACKAGES_DEBIAN="$PACKAGES_DEBIAN libresample-dev libc-client-dev binutils-dev libsrtp-dev libgsm1-dev libedit-dev"
-PACKAGES_RH="automake gcc gcc-c++ ncurses-devel openssl-devel libxml2-devel unixODBC-devel libcurl-devel libogg-devel libvorbis-devel speex-devel"
-PACKAGES_RH="$PACKAGES_RH spandsp-devel freetds-devel net-snmp-devel iksemel-devel corosynclib-devel newt-devel popt-devel libtool-ltdl-devel lua-devel"
-PACKAGES_RH="$PACKAGES_RH libsqlite3x-devel radiusclient-ng-devel portaudio-devel postgresql-devel libresample-devel neon-devel libical-devel"
-PACKAGES_RH="$PACKAGES_RH openldap-devel gmime22-devel sqlite2-devel mysql-devel bluez-libs-devel jack-audio-connection-kit-devel gsm-devel libedit-devel"
+PACKAGES=""
-PACKAGES_OBSD="popt gmake wget libxml libogg libvorbis curl iksemel spandsp speex iodbc freetds-0.63p1-msdblib mysql-client gmime sqlite sqlite3 jack"
-
-KVERS=`uname -r`
+ubuntu_common() {
+ PACKAGES="$PACKAGES build-essential subversion wget"
+ PACKAGES="$PACKAGES libncurses5-dev libz-dev libssl-dev libxml2-dev libsqlite3-dev"
+ PACKAGES="$PACKAGES libspeex-dev libspeexdsp-dev libogg-dev libvorbis-dev"
+ PACKAGES="$PACKAGES libasound2-dev portaudio19-dev libcurl4-openssl-dev libneon27-dev"
+ PACKAGES="$PACKAGES libpq-dev unixodbc-dev libsqlite0-dev libmysqlclient15-dev"
+ PACKAGES="$PACKAGES libusb-dev liblua5.1-0-dev lua5.1 libradiusclient-ng-dev"
+ PACKAGES="$PACKAGES libvpb-dev libgtk2.0-dev libmysqlclient-dev"
+ PACKAGES="$PACKAGES libsnmp-dev libiksemel-dev libcorosync-dev libnewt-dev"
+ PACKAGES="$PACKAGES libpopt-dev libical-dev libspandsp-dev libjack-dev freetds-dev"
+ PACKAGES="$PACKAGES libresample-dev libc-client-dev binutils-dev"
+ PACKAGES="$PACKAGES libbluetooth-dev libgsm1-dev libedit-dev libosptk3-dev"
+}
case "$1" in
-test) testcmd=echo ;;
-install) testcmd='' ;;
-install-unpackaged) unpackaged="yes" ;;
-'') usage; exit 0 ;;
-*) usage; exit 1 ;;
+ test) testcmd=echo ;;
+ install) testcmd='' ;;
+ '') usage; exit 0 ;;
+ *) usage; exit 1 ;;
esac
in_test_mode() {
- test "$testcmd" != ''
+ test "$testcmd" != ''
}
-check_installed_debs() {
- aptitude -F '%c %p' search "$@" 2>/dev/null \
- | awk '/^p/{print $2}'
+handle_lucid() {
+ PACKAGES="$PACKAGES libgmime-2.4-dev libopenh323-dev"
+ ubuntu_common
+ $testcmd apt-get install -y $PACKAGES
}
-# parsing the output of yum is close to impossible.
-# We'll use rpm and hope for the best:
-check_installed_rpms() {
- for pack in "$@"
- do
- if ! rpm -q $pack >/dev/null 2>/dev/null
- then echo $pack
- fi
- done
+handle_precise() {
+ PACKAGES="$PACKAGES libgmime-2.6-dev libopenh323-dev libsrtp-dev"
+ ubuntu_common
+ $testcmd apt-get install -y $PACKAGES
}
-check_installed_pkgs() {
- for pack in "$@"
- do
- if [ `pkg_info -a | grep $pack | wc -l` = 0 ]; then
- echo $pack
- fi
- done
-}
-
-handle_debian() {
- # echo "# Distribution is Debian or compatible"
- extra_packs=`check_installed_debs $PACKAGES_DEBIAN`
- $testcmd aptitude install -y $extra_packs
-}
-
-handle_rh() {
- # echo "# Distribution is RedHat-based or compatible"
- extra_packs=`check_installed_rpms $PACKAGES_RH`
- # FIXME: is there yum with RHEL 4?
- $testcmd yum install -y $extra_packs
-}
-
-handle_obsd() {
- # echo "# Distribution is OpenBSD or compatible"
- extra_packs=`check_installed_pkgs $PACKAGES_OBSD`
- $testcmd pkg_add $extra_packs
-}
-
-install_unpackaged() {
- echo "*** Installing NBS (Network Broadcast Sound) ***"
- svn co http://svn.digium.com/svn/nbs/trunk nbs-trunk
- cd nbs-trunk
- make && make install
- cd ..
-
- echo "*** Installing libresample ***"
- svn co http://svn.digium.com/svn/thirdparty/libresample/trunk libresample-trunk
- cd libresample-trunk
- ./configure && make && make install
- cd ..
+handle_quantal() {
+ PACKAGES="$PACKAGES libgmime-2.6-dev libh323plus-dev libsrtp-dev"
+ ubuntu_common
+ $testcmd apt-get install -y $PACKAGES
}
if in_test_mode; then
@@ -117,44 +73,13 @@
exit 0
fi
-OS=`uname -s`
-unsupported_distro=''
+RELEASE=`cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -f 2 -d '='`
-# A number of distributions we don't (yet?) support.
-if [ "$OS" != 'Linux' -a "$OS" != 'OpenBSD' ]; then
- echo >&2 "$0: Your OS ($OS) is currently not supported. Aborting."
- exit 1
-fi
-
-if [ -f /etc/gentoo-release ]; then
- unsupported_distro='Gentoo'
-fi
-
-if [ -f /etc/mandrake-release ]; then
- unsupported_distro='Mandriva'
-fi
-
-if [ -f /etc/SuSE-release ]; then
- unsupported_distro='SUSE'
-fi
-
-if [ -f /etc/slackware-version ]; then
- unsupported_distro='Slackware'
-fi
-
-if [ "$unsupported_distro" != '' ]; then
- echo >&2 "$0: Your distribution ($unsupported_distro) is currently not supported. Aborting."
- exit 1
-fi
-
-# The distributions we do support:
-if [ -r /etc/debian_version ]; then
- handle_debian
-elif [ -r /etc/redhat-release ]; then
- handle_rh
-elif [ "$OS" = 'OpenBSD' ]; then
- handle_obsd
-fi
+case "$RELEASE" in
+ lucid) handle_lucid;;
+ precise) handle_precise;;
+ quantal) handle_quantal;;
+esac
if ! in_test_mode; then
echo "#############################################"
Modified: team/pabelanger/run_tests/run_tests.sh
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/run_tests/run_tests.sh?view=diff&rev=373437&r1=373436&r2=373437
==============================================================================
--- team/pabelanger/run_tests/run_tests.sh (original)
+++ team/pabelanger/run_tests/run_tests.sh Mon Sep 24 13:53:53 2012
@@ -40,7 +40,7 @@
function destroy_venv {
echo "Removing environment..."
- rm -rf $venv
+ sudo rm -rf $venv
rm -f .environment_version
echo "Environment removed."
}
Modified: team/pabelanger/run_tests/tools/compile.sh
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/run_tests/tools/compile.sh?view=diff&rev=373437&r1=373436&r2=373437
==============================================================================
--- team/pabelanger/run_tests/tools/compile.sh (original)
+++ team/pabelanger/run_tests/tools/compile.sh Mon Sep 24 13:53:53 2012
@@ -7,6 +7,9 @@
set +e
./contrib/scripts/get_mp3_source.sh
set -e
+
+./contrib/scripts/install_prereq install
+
./configure --enable-dev-mode
make NOISY_BUILD=yes clean
@@ -17,6 +20,8 @@
menuselect/menuselect --enable TEST_FRAMEWORK menuselect.makeopts
menuselect/menuselect --enable-category MENUSELECT_TESTS menuselect.makeopts
menuselect/menuselect --enable-category MENUSELECT_ADDONS menuselect.makeopts
+menuselect/menuselect --enable-category MENUSELECT_AGIS menuselect.makeopts
+menuselect/menuselect --enable-category MENUSELECT_APPS menuselect.makeopts
menuselect/menuselect --enable-category MENUSELECT_BRIDGES menuselect.makeopts
menuselect/menuselect --enable-category MENUSELECT_CEL menuselect.makeopts
menuselect/menuselect --enable-category MENUSELECT_CDR menuselect.makeopts
@@ -27,10 +32,13 @@
menuselect/menuselect --enable-category MENUSELECT_PBX menuselect.makeopts
menuselect/menuselect --enable-category MENUSELECT_RES menuselect.makeopts
menuselect/menuselect --enable-category MENUSELECT_UTILS menuselect.makeopts
+menuselect/menuselect --disable-category MENUSELECT_CORE_SOUNDS menuselect.makeopts
+menuselect/menuselect --disable-category MENUSELECT_MOH menuselect.makeopts
cat menuselect.makeopts
make NOISY_BUILD=yes
+make NOISY_BUILD=yes full
make NOISY_BUILD=yes install
make NOISY_BUILD=yes samples
make NOISY_BUILD=yes clean
Modified: team/pabelanger/run_tests/tools/hook.d/F20Prerequisites.sh
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/run_tests/tools/hook.d/F20Prerequisites.sh?view=diff&rev=373437&r1=373436&r2=373437
==============================================================================
--- team/pabelanger/run_tests/tools/hook.d/F20Prerequisites.sh (original)
+++ team/pabelanger/run_tests/tools/hook.d/F20Prerequisites.sh Mon Sep 24 13:53:53 2012
@@ -1,28 +1,0 @@
-#!/bin/bash
-
-PACKAGES=""
-
-function common_packages {
- PACKAGES="$PACKAGES build-essential subversion wget xmlstarlet libssl-dev"
- PACKAGES="$PACKAGES unixodbc-dev libasound2-dev libpq-dev libmysqlclient-dev"
- PACKAGES="$PACKAGES libbluetooth-dev libvpb-dev libnewt-dev libsqlite0-dev"
- PACKAGES="$PACKAGES libspeex-dev libspeexdsp-dev libcurl4-openssl-dev"
- PACKAGES="$PACKAGES libncurses5-dev libxml2-dev libsqlite3-dev libiksemel-dev"
- PACKAGES="$PACKAGES libradiusclient-ng-dev libsnmp-dev freetds-dev"
- PACKAGES="$PACKAGES libc-client2007e-dev libgmime-2.6-dev libjack-dev liblua5.1-0-dev"
- PACKAGES="$PACKAGES libcap-dev libspandsp-dev libopenr2-dev libresample1-dev"
- PACKAGES="$PACKAGES libopenais-dev libneon27-gnutls-dev libical-dev libsrtp0-dev"
- PACKAGES="$PACKAGES zlib1g-dev"
-}
-
-function precise_packages {
- common_packages
-}
-
-RELEASE=`cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -f 2 -d '='`
-
-case "${RELEASE}" in
- precise) precise_packages;;
-esac
-
-apt-get install -y ${PACKAGES}
Modified: team/pabelanger/run_tests/tools/pbuilderrc
URL: http://svnview.digium.com/svn/asterisk/team/pabelanger/run_tests/tools/pbuilderrc?view=diff&rev=373437&r1=373436&r2=373437
==============================================================================
--- team/pabelanger/run_tests/tools/pbuilderrc (original)
+++ team/pabelanger/run_tests/tools/pbuilderrc Mon Sep 24 13:53:53 2012
@@ -20,7 +20,7 @@
"unstable" "testing" "stable" "oldstable")
# List of Ubuntu suites. Update these when needed.
-UBUNTU_SUITES=("precise" "oneiric" "natty" "maverick" "lucid")
+UBUNTU_SUITES=("quantal" "precise" "oneiric" "natty" "maverick" "lucid")
# Mirrors to use. Update these to your preferred mirror.
DEBIAN_MIRROR="ftp.us.debian.org"
More information about the asterisk-commits
mailing list