Merge pull request #700 from g-oikonomou/contrib/tests/build-all-board-detection

Detect boards automatically in the build-all script
This commit is contained in:
Atis Elsts 2018-10-15 11:32:44 +01:00 committed by GitHub
commit 0039fde747
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,17 +40,21 @@
# To invoke the building for a specific platform, run:
# $ PLATFORMS=zoul ./build.sh
#
CONTIKI_NG_TOP_DIR="../.."
EXAMPLES_DIR=$CONTIKI_NG_TOP_DIR/examples
if [[ "$PLATFORMS" == "" ]]
then
PLATFORMS=`ls ../../arch/platform`
PLATFORMS=`ls $CONTIKI_NG_TOP_DIR/arch/platform`
fi
if [[ "$MAKEFILES" == "" ]]
then
MAKEFILES=`find ../../examples/ -name Makefile`
MAKEFILES=`find $EXAMPLES_DIR -name Makefile`
fi
HELLO_WORLD=$EXAMPLES_DIR/hello-world
# Set the make goal the first argument of the script or to "all" if called w/o arguments
if [[ $# -gt 0 ]]
then
@ -97,22 +101,14 @@ do
continue
fi
if [[ "$platform" == "srf06-cc26xx" ]]
# Detect all boards for the current platform by calling
# make TARGET=$platform boards
# in the hello-world dir.
BOARDS=`make -s -C $HELLO_WORLD TARGET=$platform boards \
| grep -v "no boards" | rev | cut -f3- -d" " | rev`
if [[ -z $BOARDS ]]
then
# srf06-cc26xx has multiple boards
BOARDS="srf06/cc26xx srf06/cc13xx launchpad/cc2650 launchpad/cc1310 launchpad/cc1350 sensortag/cc2650 sensortag/cc1350"
elif [[ "$platform" == "simplelink" ]]
then
# SimpleLink has multiple boards
BOARDS="launchpad/cc1310 launchpad/cc1350 launchpad/cc1350-4 launchpad/cc2650 \
sensortag/cc1350 sensortag/cc2650 srf06/cc13x0 srf06/cc26x0 \
launchpad/cc1312r1 launchpad/cc1352r1 launchpad/cc1352p1 launchpad/cc1352p-2 launchpad/cc1352p-4 launchpad/cc26x2r1"
elif [[ "$platform" == "zoul" ]]
then
# Zoul has multiple boards
BOARDS="remote-reva remote-revb firefly-reva firefly orion"
else
# Other platforms have just a single board
BOARDS="default"
fi