|
|
@ -1,6 +1,7 @@
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
|
|
|
|
CIDIR=$(dirname $(readlink -fn $0))
|
|
|
|
CIDIR=$(dirname $(readlink -fn $0))
|
|
|
|
|
|
|
|
COVERAGE=0
|
|
|
|
REF_DEBUG=0
|
|
|
|
REF_DEBUG=0
|
|
|
|
source $CIDIR/ci.functions
|
|
|
|
source $CIDIR/ci.functions
|
|
|
|
|
|
|
|
|
|
|
@ -28,6 +29,15 @@ gen_mods() {
|
|
|
|
|
|
|
|
|
|
|
|
[ x"$OUTPUT_DIR" != x ] && mkdir -p "$OUTPUT_DIR" 2> /dev/null
|
|
|
|
[ x"$OUTPUT_DIR" != x ] && mkdir -p "$OUTPUT_DIR" 2> /dev/null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ -z $TESTED_ONLY ]; then
|
|
|
|
|
|
|
|
# Skip building untested modules by default if coverage is enabled.
|
|
|
|
|
|
|
|
TESTED_ONLY=$COVERAGE
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ -z $LCOV_DIR ]; then
|
|
|
|
|
|
|
|
LCOV_DIR="${OUTPUT_DIR:+${OUTPUT_DIR}/}lcov"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ x"$CACHE_DIR" != x ] ; then
|
|
|
|
if [ x"$CACHE_DIR" != x ] ; then
|
|
|
|
mkdir -p $CACHE_DIR/sounds $CACHE_DIR/externals 2> /dev/null
|
|
|
|
mkdir -p $CACHE_DIR/sounds $CACHE_DIR/externals 2> /dev/null
|
|
|
|
fi
|
|
|
|
fi
|
|
|
@ -63,6 +73,9 @@ MAKE=`which make`
|
|
|
|
common_config_args="--prefix=/usr ${_libdir:+--libdir=${_libdir}} --sysconfdir=/etc --with-pjproject-bundled"
|
|
|
|
common_config_args="--prefix=/usr ${_libdir:+--libdir=${_libdir}} --sysconfdir=/etc --with-pjproject-bundled"
|
|
|
|
common_config_args+=" ${CACHE_DIR:+--with-sounds-cache=${CACHE_DIR}/sounds --with-externals-cache=${CACHE_DIR}/externals}"
|
|
|
|
common_config_args+=" ${CACHE_DIR:+--with-sounds-cache=${CACHE_DIR}/sounds --with-externals-cache=${CACHE_DIR}/externals}"
|
|
|
|
common_config_args+=" --enable-dev-mode"
|
|
|
|
common_config_args+=" --enable-dev-mode"
|
|
|
|
|
|
|
|
if [ $COVERAGE -eq 1 ] ; then
|
|
|
|
|
|
|
|
common_config_args+=" --enable-coverage"
|
|
|
|
|
|
|
|
fi
|
|
|
|
export WGET_EXTRA_ARGS="--quiet"
|
|
|
|
export WGET_EXTRA_ARGS="--quiet"
|
|
|
|
|
|
|
|
|
|
|
|
runner ./configure ${common_config_args} > ${OUTPUT_DIR:+${OUTPUT_DIR}/}configure.txt
|
|
|
|
runner ./configure ${common_config_args} > ${OUTPUT_DIR:+${OUTPUT_DIR}/}configure.txt
|
|
|
@ -81,6 +94,25 @@ cat_enables+=" MENUSELECT_PBX MENUSELECT_RES MENUSELECT_UTILS MENUSELECT_TESTS"
|
|
|
|
runner menuselect/menuselect `gen_cats enable $cat_enables` menuselect.makeopts
|
|
|
|
runner menuselect/menuselect `gen_cats enable $cat_enables` menuselect.makeopts
|
|
|
|
|
|
|
|
|
|
|
|
mod_disables="res_digium_phone chan_vpb"
|
|
|
|
mod_disables="res_digium_phone chan_vpb"
|
|
|
|
|
|
|
|
if [ $TESTED_ONLY -eq 1 ] ; then
|
|
|
|
|
|
|
|
# These modules are not tested at all. They are loaded but nothing is ever done
|
|
|
|
|
|
|
|
# with them, no testsuite tests depend on them.
|
|
|
|
|
|
|
|
mod_disables+=" app_adsiprog app_alarmreceiver app_celgenuserevent app_db app_dictate"
|
|
|
|
|
|
|
|
mod_disables+=" app_dumpchan app_externalivr app_festival app_getcpeid app_ices app_image"
|
|
|
|
|
|
|
|
mod_disables+=" app_jack app_milliwatt app_minivm app_morsecode app_mp3 app_nbscat app_privacy"
|
|
|
|
|
|
|
|
mod_disables+=" app_readexten app_sms app_speech_utils app_test app_url app_waitforring"
|
|
|
|
|
|
|
|
mod_disables+=" app_waitforsilence app_waituntil app_zapateller"
|
|
|
|
|
|
|
|
mod_disables+=" cdr_adaptive_odbc cdr_custom cdr_manager cdr_odbc cdr_pgsql cdr_radius"
|
|
|
|
|
|
|
|
mod_disables+=" cdr_syslog cdr_tds"
|
|
|
|
|
|
|
|
mod_disables+=" cel_odbc cel_pgsql cel_radius cel_sqlite3_custom cel_tds"
|
|
|
|
|
|
|
|
mod_disables+=" chan_alsa chan_console chan_mgcp chan_motif chan_oss chan_rtp chan_skinny chan_unistim"
|
|
|
|
|
|
|
|
mod_disables+=" func_frame_trace func_pitchshift func_speex func_volume func_dialgroup"
|
|
|
|
|
|
|
|
mod_disables+=" func_periodic_hook func_sprintf func_enum func_extstate func_sysinfo func_iconv"
|
|
|
|
|
|
|
|
mod_disables+=" func_callcompletion func_version func_rand func_sha1 func_module func_md5"
|
|
|
|
|
|
|
|
mod_disables+=" pbx_dundi pbx_loopback"
|
|
|
|
|
|
|
|
mod_disables+=" res_ael_share res_calendar res_config_ldap res_config_pgsql res_corosync"
|
|
|
|
|
|
|
|
mod_disables+=" res_http_post res_pktccops res_rtp_multicast res_snmp res_xmpp"
|
|
|
|
|
|
|
|
fi
|
|
|
|
[ "$BRANCH_NAME" == "master" ] && mod_disables+=" codec_opus codec_silk codec_g729a codec_siren7 codec_siren14"
|
|
|
|
[ "$BRANCH_NAME" == "master" ] && mod_disables+=" codec_opus codec_silk codec_g729a codec_siren7 codec_siren14"
|
|
|
|
runner menuselect/menuselect `gen_mods disable $mod_disables` menuselect.makeopts
|
|
|
|
runner menuselect/menuselect `gen_mods disable $mod_disables` menuselect.makeopts
|
|
|
|
|
|
|
|
|
|
|
@ -91,6 +123,21 @@ runner menuselect/menuselect `gen_mods enable $mod_enables` menuselect.makeopts
|
|
|
|
|
|
|
|
|
|
|
|
runner ${MAKE} -j8 || runner ${MAKE} -j1 NOISY_BUILD=yes
|
|
|
|
runner ${MAKE} -j8 || runner ${MAKE} -j1 NOISY_BUILD=yes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
runner rm -f ${LCOV_DIR}/*.info
|
|
|
|
|
|
|
|
if [ $COVERAGE -eq 1 ] ; then
|
|
|
|
|
|
|
|
runner mkdir -p ${LCOV_DIR}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Zero counter data
|
|
|
|
|
|
|
|
runner lcov --quiet --directory . --zerocounters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Branch coverage is not supported by --initial. Disable to suppresses a notice
|
|
|
|
|
|
|
|
# printed if it was enabled in lcovrc.
|
|
|
|
|
|
|
|
# This initial capture ensures any module which was built but never loaded is
|
|
|
|
|
|
|
|
# reported with 0% coverage for all sources.
|
|
|
|
|
|
|
|
runner lcov --quiet --directory . --no-external --capture --initial --rc lcov_branch_coverage=0 \
|
|
|
|
|
|
|
|
--output-file ${LCOV_DIR}/initial.info
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
ALEMBIC=$(which alembic 2>/dev/null || : )
|
|
|
|
ALEMBIC=$(which alembic 2>/dev/null || : )
|
|
|
|
if [ x"$ALEMBIC" = x ] ; then
|
|
|
|
if [ x"$ALEMBIC" = x ] ; then
|
|
|
|
echo "Alembic not installed"
|
|
|
|
echo "Alembic not installed"
|
|
|
|