NMEA: removed macro 'MARNAV_NMEA_GETTER'.
[marnav.git] / bin / test-buildall
blobaa726bd9156f85acb801f04ff4d6d0f844bc5b98
1 #!/bin/bash -eu
3 # builds all relevant configurations, executes tests
5 export SCRIPT_BASE=$(dirname `readlink -f $0`)
6 export BASE=${SCRIPT_BASE}/..
7 export BUILD=${BASE}/build
9 # prepare master build directory
10 if [ -d ${BUILD} ] ; then
11 rm -fr ${BUILD}
13 mkdir -p ${BUILD}
15 # execute builds
16 for cfg in $(${SCRIPT_BASE}/bld --list | grep -E "clang[0-9]+|gcc[0-9]+") ; do
17 echo -n "target: ${cfg} "
18 printf '%*s' $((40 - ${#cfg})) "" | tr ' ' '.'
19 set +e
20 BUILD_DIR=${BUILD}/${cfg} ${SCRIPT_BASE}/bld ${cfg} >&${BUILD}/${cfg}.log
21 if [ $? -eq 0 ] ; then
22 echo "SUCCESS" >> ${BUILD}/${cfg}.log
23 echo -e " \033[32mSUCCESS\033[0m"
24 else
25 echo "FAILURE" >> ${BUILD}/${cfg}.log
26 echo -e " \033[31mFAILURE\033[0m"
28 set -e
29 rm -fr ${BUILD}/${cfg}
30 done