|
|
|
@ -4,8 +4,14 @@ CIDIR=$(dirname $(readlink -fn $0))
|
|
|
|
|
COVERAGE=0
|
|
|
|
|
REF_DEBUG=0
|
|
|
|
|
DISABLE_BINARY_MODULES=0
|
|
|
|
|
NO_CONFIGURE=0
|
|
|
|
|
NO_MENUSELECT=0
|
|
|
|
|
NO_MAKE=0
|
|
|
|
|
NO_ALEMBIC=0
|
|
|
|
|
source $CIDIR/ci.functions
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
if [ -z $BRANCH_NAME ]; then
|
|
|
|
|
BRANCH_NAME=$(git config -f .gitreview --get gerrit.defaultbranch)
|
|
|
|
|
fi
|
|
|
|
@ -32,6 +38,14 @@ gen_mods() {
|
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
run_alembic() {
|
|
|
|
|
pushd contrib/ast-db-manage >/dev/null
|
|
|
|
|
runner alembic $@
|
|
|
|
|
RC=$?
|
|
|
|
|
popd > /dev/null
|
|
|
|
|
return $RC
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[ x"$OUTPUT_DIR" != x ] && mkdir -p "$OUTPUT_DIR" 2> /dev/null
|
|
|
|
|
|
|
|
|
|
if [ -z $TESTED_ONLY ]; then
|
|
|
|
@ -89,8 +103,11 @@ fi
|
|
|
|
|
|
|
|
|
|
export WGET_EXTRA_ARGS="--quiet"
|
|
|
|
|
|
|
|
|
|
if [ $NO_CONFIGURE -eq 0 ] ; then
|
|
|
|
|
runner ./configure ${common_config_args} > ${OUTPUT_DIR:+${OUTPUT_DIR}/}configure.txt
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ $NO_MENUSELECT -eq 0 ] ; then
|
|
|
|
|
runner ${MAKE} menuselect.makeopts
|
|
|
|
|
|
|
|
|
|
runner menuselect/menuselect `gen_mods enable DONT_OPTIMIZE BETTER_BACKTRACES MALLOC_DEBUG DO_CRASH TEST_FRAMEWORK` menuselect.makeopts
|
|
|
|
@ -131,8 +148,11 @@ mod_enables="app_voicemail app_directory FILE_STORAGE"
|
|
|
|
|
mod_enables+=" res_mwi_external res_ari_mailboxes res_mwi_external_ami res_stasis_mailbox"
|
|
|
|
|
mod_enables+=" CORE-SOUNDS-EN-GSM MOH-OPSOUND-GSM EXTRA-SOUNDS-EN-GSM"
|
|
|
|
|
runner menuselect/menuselect `gen_mods enable $mod_enables` menuselect.makeopts
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ $NO_MAKE -eq 0 ] ; then
|
|
|
|
|
runner ${MAKE} -j8 || runner ${MAKE} -j1 NOISY_BUILD=yes
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
runner rm -f ${LCOV_DIR}/*.info
|
|
|
|
|
if [ $COVERAGE -eq 1 ] ; then
|
|
|
|
@ -149,43 +169,44 @@ if [ $COVERAGE -eq 1 ] ; then
|
|
|
|
|
--output-file ${LCOV_DIR}/initial.info
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ $NO_ALEMBIC -eq 0 ] ; then
|
|
|
|
|
ALEMBIC=$(which alembic 2>/dev/null || : )
|
|
|
|
|
if [ x"$ALEMBIC" = x ] ; then
|
|
|
|
|
echo "Alembic not installed"
|
|
|
|
|
>&2 echo "Alembic not installed"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
cd contrib/ast-db-manage
|
|
|
|
|
find -name *.pyc -delete
|
|
|
|
|
out=$(alembic -c config.ini.sample branches)
|
|
|
|
|
find contrib/ast-db-manage -name *.pyc -delete
|
|
|
|
|
out=$(run_alembic -c config.ini.sample branches)
|
|
|
|
|
if [ "x$out" != "x" ] ; then
|
|
|
|
|
>&2 echo "Alembic branches were found for config"
|
|
|
|
|
>&2 echo $out
|
|
|
|
|
exit 1
|
|
|
|
|
else
|
|
|
|
|
>&2 echo "Alembic for 'config' OK"
|
|
|
|
|
fi
|
|
|
|
|
run_alembic -c config.ini.sample upgrade head --sql > "${OUTPUT_DIR:+${OUTPUT_DIR}/}alembic-config.sql" || exit 1
|
|
|
|
|
echo "Alembic for 'config' OK"
|
|
|
|
|
|
|
|
|
|
out=$(alembic -c cdr.ini.sample branches)
|
|
|
|
|
out=$(run_alembic -c cdr.ini.sample branches)
|
|
|
|
|
if [ "x$out" != "x" ] ; then
|
|
|
|
|
>&2 echo "Alembic branches were found for cdr"
|
|
|
|
|
>&2 echo $out
|
|
|
|
|
exit 1
|
|
|
|
|
else
|
|
|
|
|
>&2 echo "Alembic for 'cdr' OK"
|
|
|
|
|
fi
|
|
|
|
|
run_alembic -c cdr.ini.sample upgrade head --sql > "${OUTPUT_DIR:+${OUTPUT_DIR}/}alembic-cdr.sql" || exit 1
|
|
|
|
|
echo "Alembic for 'cdr' OK"
|
|
|
|
|
|
|
|
|
|
out=$(alembic -c voicemail.ini.sample branches)
|
|
|
|
|
out=$(run_alembic -c voicemail.ini.sample branches)
|
|
|
|
|
if [ "x$out" != "x" ] ; then
|
|
|
|
|
>&2 echo "Alembic branches were found for voicemail"
|
|
|
|
|
>&2 echo $out
|
|
|
|
|
exit 1
|
|
|
|
|
else
|
|
|
|
|
>&2 echo "Alembic for 'voicemail' OK"
|
|
|
|
|
fi
|
|
|
|
|
run_alembic -c voicemail.ini.sample upgrade head --sql > "${OUTPUT_DIR:+${OUTPUT_DIR}/}alembic-voicemail.sql" || exit 1
|
|
|
|
|
echo "Alembic for 'voicemail' OK"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f "doc/core-en_US.xml" ] ; then
|
|
|
|
|
${MAKE} validate-docs || ${MAKE} NOISY_BUILD=yes validate-docs
|
|
|
|
|
runner ${MAKE} validate-docs || ${MAKE} NOISY_BUILD=yes validate-docs
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|