[svn-commits] russell: testsuite/bamboo/trunk r107 - /bamboo/trunk/bin/build-asterisk.sh
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sat Mar 20 07:46:18 CDT 2010
Author: russell
Date: Sat Mar 20 07:46:15 2010
New Revision: 107
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=107
Log:
Add FreeBSD changes for the Asterisk build and test script.
Modified:
bamboo/trunk/bin/build-asterisk.sh
Modified: bamboo/trunk/bin/build-asterisk.sh
URL: http://svnview.digium.com/svn/testsuite/bamboo/trunk/bin/build-asterisk.sh?view=diff&rev=107&r1=106&r2=107
==============================================================================
--- bamboo/trunk/bin/build-asterisk.sh (original)
+++ bamboo/trunk/bin/build-asterisk.sh Sat Mar 20 07:46:15 2010
@@ -1,8 +1,26 @@
-#!/bin/bash
+#!/bin/sh
+#
+# Build and test Asterisk from http://bamboo.asterisk.org/.
+#
+# Platforms tested
+# - Linux
+# - Mac OSX 10.6
+# - FreeBSD 8.0
+#
PLAN=$1
-BUILD_DIR=/srv/bamboo/xml-data/build-dir/${PLAN}
-TEST_RESULTS_DIR=${BUILD_DIR}/test-reports
+PWD=`pwd`
+TEST_RESULTS_DIR=${PWD}/test-reports
+
+if which gmake ; then
+ MAKE=gmake
+else
+ MAKE=make
+fi
+
+if [ "`uname`" = "FreeBSD" ] && [ "`uname -m`" = "i386" ] ; then
+ ASTCFLAGS=-march=i686
+fi
start_asterisk() {
echo "*** Starting Asterisk ***"
@@ -67,22 +85,22 @@
mkdir ${TEST_RESULTS_DIR}
./configure --enable-dev-mode
-make uninstall-all
-make menuselect.makeopts
+${MAKE} uninstall-all
+${MAKE} menuselect.makeopts
if [ "${UNIT_TESTS}" = "yes" ] ; then
menuselect/menuselect --enable TEST_FRAMEWORK menuselect.makeopts
menuselect/menuselect --enable-category MENUSELECT_TEST menuselect.makeopts
fi
-make
+${MAKE} ASTCFLAGS=${ASTCFLAGS}
if [ -f doc/core-en_US.xml ] ; then
echo "*** Validating XML documentation ***"
- make validate-docs
+ ${MAKE} validate-docs
fi
echo "*** Installing Asterisk and Sample Configuration ***"
-WGET_EXTRA_ARGS=--quiet make install
-make samples
+WGET_EXTRA_ARGS=--quiet ${MAKE} install
+${MAKE} samples
if [ "${UNIT_TESTS}" = "yes" ] ; then
start_asterisk
More information about the svn-commits
mailing list