if test -e $top/test-suite/buildtest.sh ; then
$top/test-suite/buildtest.sh $opts
elif test -e ../$top/test-suite/buildtest.sh ; then
- ../$top/test-suite/buildtest.sh $opts
+ ../$top/test-suite/buildtest.sh ../$opts
fi
} 2>&1 | logtee $log
+ grep -E "BUILD" ${log}
grep -E "${errors}" $log && exit 1
if test "${cleanup}" = "yes" ; then
- echo "REMOVE: ${btlayer}"
+ echo "REMOVE DATA: ${btlayer}"
rm -f -r ${btlayer}
fi
result=`tail -2 $log | head -1`
- test "${result}" = "Build Successful." || ( tail -5 $log ; exit 1 )
+ if test "${result}" = "Build Successful." ; then
+ echo "${result}"
+ else
+ echo "Build Failed:"
+ tail -5 $log
+ exit 1
+ fi
if test "${cleanup}" = "yes" ; then
- echo "REMOVE: ${log}"
+ echo "REMOVE LOG: ${log}"
rm -f -r $log
fi
}
# Should be run from the source package root directory with paths relative to there.
#
-dist="${1}"
-base="`dirname $0`"
+config="${1}"
+base="`dirname ${0}`"
#if we are on Linux, let's try parallelizing
pjobs="" #default
if [ -e /proc/cpuinfo ]; then
ncpus=`grep '^processor' /proc/cpuinfo | tail -1|awk '{print $3}'`
- ncpus=`expr $ncpus + 1`
- pjobs="-j$ncpus"
+ ncpus=`expr ${ncpus} + 1`
+ pjobs="-j${ncpus}"
fi
-if test -e ${dist%%.opts}.opts ; then
- echo "BUILD: ${dist%%.opts}.opts"
- . ${dist%%.opts}.opts
+if test -e ${config} ; then
+ echo "BUILD: ${config}"
+ . ${config}
else
- echo "BUILD: DEFAULT"
- OPTS=""
- FLAGS=""
+ echo -n "BUILD ERROR: Unable to locate test configuration '${config}' from " && pwd
+ exit 1;
fi
#
# empty all the existing code, reconfigure and builds test code
# but skip if we have no files to remove.
FILECOUNT=`ls -1 | grep -c .`
-if test "$FILECOUNT" != "0" ; then
+if test "${FILECOUNT}" != "0" ; then
make -k distclean || echo "distclean done. errors are unwanted but okay here."
fi