1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #2394 from phiros/split_builds_in_mcu_groups

tests/travis: split build tests into MCU groups.
This commit is contained in:
Philipp Rosenkranz 2015-02-22 15:27:28 +01:00
commit 7a73503a4d
38 changed files with 120 additions and 44 deletions

View File

@ -3,7 +3,14 @@ language: c
cache: apt
env:
- NPROC_MAX=8
- NPROC_MAX=8 BUILDTEST_MCU_GROUP=avr8
- NPROC_MAX=8 BUILDTEST_MCU_GROUP=msp430
- NPROC_MAX=8 BUILDTEST_MCU_GROUP=x86
- NPROC_MAX=8 BUILDTEST_MCU_GROUP=arm7
- NPROC_MAX=8 BUILDTEST_MCU_GROUP=cortex_m0
- NPROC_MAX=8 BUILDTEST_MCU_GROUP=cortex_m3_1
- NPROC_MAX=8 BUILDTEST_MCU_GROUP=cortex_m3_2
- NPROC_MAX=8 BUILDTEST_MCU_GROUP=cortex_m4
before_install:
- sudo apt-get install emdebian-archive-keyring
@ -18,21 +25,7 @@ before_install:
install:
- >
sudo apt-get install \
build-essential \
gcc-multilib \
gcc-arm-none-eabi \
gcc-msp430 \
pcregrep \
libpcre3 \
qemu-system-x86 \
python3 \
g++-multilib \
gcc-avr \
binutils-avr \
avr-libc \
cppcheck \
doxygen
sudo apt-get install $(./dist/tools/travis-scripts/get-pkg-list.py)
- git config --global user.email "travis@example.com"
- git config --global user.name "Travis CI"
@ -41,33 +34,7 @@ install:
- git log -1 --pretty=format:%H riot/master
script:
- make -s -C ./examples/default info-concurrency
- git rebase riot/master || git rebase --abort
- ./dist/tools/whitespacecheck/check.sh master || exit
- ./dist/tools/licenses/check.sh master --diff-filter=MR --error-exitcode=0 || exit
- ./dist/tools/licenses/check.sh master --diff-filter=AC || exit
- ./dist/tools/doccheck/check.sh master || exit
- ./dist/tools/externc/check.sh master || exit
# TODO:
# Remove all but `master` parameters to cppcheck (and remove second
# invocation) once all warnings of cppcheck have been taken care of
# in master.
- ./dist/tools/cppcheck/check.sh master --diff-filter=MR --error-exitcode=0 || exit
- ./dist/tools/cppcheck/check.sh master --diff-filter=AC || exit
- make -C ./tests/unittests all test BOARD=native || exit
# TODO:
# Reenable once https://github.com/RIOT-OS/RIOT/issues/2300 is
# resolved:
# - make -C ./tests/unittests all test BOARD=qemu-i386 || exit
- ./dist/tools/compile_test/compile_test.py
- ./dist/tools/pr_check/pr_check.sh riot/master
- ./dist/tools/travis-scripts/build_and_test.sh
notifications:
email: false

View File

@ -216,11 +216,14 @@ ifneq (, $(filter info-boards-supported info-boards-features-missing info-build,
define board_missing_features
FEATURES_PROVIDED := $(FEATURES_PROVIDED_BAK)
-include $${RIOTBOARD}/${1}/Makefile.features
ifneq ($(BUILDTEST_MCU_GROUP), $$(FEATURES_MCU_GROUP))
BOARDS_FEATURES_MISSING += "${1} $${BUILDTEST_MCU_GROUP}"
BOARDS_WITH_MISSING_FEATURES += ${1}
endif
FEATURES_MISSING := $$(filter-out $$(FEATURES_PROVIDED), $$(FEATURES_REQUIRED))
ifneq (, $${FEATURES_MISSING})
BOARDS_FEATURES_MISSING += "${1} $${FEATURES_MISSING}"
ifneq (, $$(filter-out $$(FEATURES_OPTIONAL), $$(FEATURES_MISSING)))
BOARDS_WITH_MISSING_FEATURES += ${1}
endif

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_random periph_rtt periph_cpuid
FEATURES_MCU_GROUP = cortex_m0

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_spi periph_random
FEATURES_MCU_GROUP = cortex_m3_1

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += periph_uart
FEATURES_MCU_GROUP = avr8

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += transceiver periph_rtc
FEATURES_MCU_GROUP = arm7

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_random periph_cpuid
FEATURES_MCU_GROUP = cortex_m3_1

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += transceiver periph_rtc
FEATURES_MCU_GROUP = msp430

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart
FEATURES_MCU_GROUP = cortex_m4

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += transceiver periph_gpio periph_uart periph_spi periph_i2c periph_rtt periph_cpuid cpp
FEATURES_MCU_GROUP = cortex_m3_1

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += transceiver periph_gpio periph_uart periph_spi periph_i2c periph_rtt periph_cpuid cpp
FEATURES_MCU_GROUP = cortex_m3_1

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart
FEATURES_MCU_GROUP = cortex_m3_1

View File

@ -0,0 +1 @@
FEATURES_MCU_GROUP = msp430

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += transceiver config
FEATURES_MCU_GROUP = msp430

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += transceiver periph_pwm periph_rtc cpp config
FEATURES_MCU_GROUP = arm7

View File

@ -1,3 +1,4 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_spi periph_i2c periph_pwm
FEATURES_PROVIDED += transceiver
FEATURES_MCU_GROUP = cortex_m4

View File

@ -1,3 +1,4 @@
FEATURES_PROVIDED += transceiver periph_cpuid config cpp
FEATURES_PROVIDED += periph_random
FEATURES_PROVIDED += periph_rtc
FEATURES_MCU_GROUP = x86

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += periph_uart
FEATURES_PROVIDED += cpp
FEATURES_MCU_GROUP = cortex_m4

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += periph_gpio periph_uart periph_spi periph_i2c periph_cpuid
FEATURES_PROVIDED += cpp
FEATURES_MCU_GROUP = cortex_m3_2

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_random periph_cpuid
FEATURES_MCU_GROUP = cortex_m3_2

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_random periph_rtt periph_cpuid
FEATURES_MCU_GROUP = cortex_m0

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_random periph_rtt periph_cpuid
FEATURES_MCU_GROUP = cortex_m0

View File

@ -1,3 +1,4 @@
# Enable this after fixing https://github.com/RIOT-OS/RIOT/issues/659
#FEATURES_PROVIDED += transceiver
FEATURES_PROVIDED += periph_rtc
FEATURES_MCU_GROUP = arm7

View File

@ -0,0 +1 @@
FEATURES_MCU_GROUP = x86

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += transceiver
FEATURES_MCU_GROUP = arm7

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += transceiver periph_gpio periph_spi cpp periph_timer periph_uart periph_i2c cpp periph_rtc periph_cpuid
FEATURES_MCU_GROUP = cortex_m0

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart
FEATURES_MCU_GROUP = cortex_m3_2

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += periph_adc periph_gpio periph_spi periph_uart cpp
FEATURES_MCU_GROUP = cortex_m0

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_pwm periph_spi
FEATURES_MCU_GROUP = cortex_m3_2

View File

@ -1,3 +1,4 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_spi periph_i2c periph_pwm periph_random \
periph_adc periph_dac
FEATURES_MCU_GROUP = cortex_m4

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += transceiver
FEATURES_MCU_GROUP = msp430

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_spi periph_random
FEATURES_MCU_GROUP = cortex_m3_2

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += transceiver config
FEATURES_MCU_GROUP = msp430

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += transceiver config
FEATURES_MCU_GROUP = msp430

View File

@ -1,2 +1,3 @@
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += periph_uart periph_gpio periph_random periph_rtt periph_cpuid
FEATURES_MCU_GROUP = cortex_m0

View File

@ -1 +1,2 @@
FEATURES_PROVIDED += transceiver
FEATURES_MCU_GROUP = msp430

36
dist/tools/travis-scripts/build_and_test.sh vendored Executable file
View File

@ -0,0 +1,36 @@
#!/bin/bash
set -e
make -s -C ./examples/default info-concurrency
git rebase riot/master || git rebase --abort
./dist/tools/whitespacecheck/check.sh master || exit
./dist/tools/licenses/check.sh master --diff-filter=MR --error-exitcode=0 || exit
./dist/tools/licenses/check.sh master --diff-filter=AC || exit
./dist/tools/doccheck/check.sh master || exit
./dist/tools/externc/check.sh master || exit
# TODO:
# Remove all but `master` parameters to cppcheck (and remove second
# invocation) once all warnings of cppcheck have been taken care of
# in master.
./dist/tools/cppcheck/check.sh master --diff-filter=MR --error-exitcode=0 || exit
./dist/tools/cppcheck/check.sh master --diff-filter=AC || exit
if [[ $BUILDTEST_MCU_GROUP ]]
then
if [ "$BUILDTEST_MCU_GROUP" == "x86" ]
then
make -C ./tests/unittests all test BOARD=native || exit
# TODO:
# Reenable once https://github.com/RIOT-OS/RIOT/issues/2300 is
# resolved:
# - make -C ./tests/unittests all test BOARD=qemu-i386 || exit
fi
./dist/tools/compile_test/compile_test.py
./dist/tools/pr_check/pr_check.sh riot/master
fi

36
dist/tools/travis-scripts/get-pkg-list.py vendored Executable file
View File

@ -0,0 +1,36 @@
#!/usr/bin/env python
import os
arm_mcu_groups = ["arm7", "cortex_m0", "cortex_m3", "cortex_m3_2", "cortex_m4"]
msp_mcu_groups = ["msp430"]
x86_mcu_groups = ["x86"]
avr8_mcu_groups = ["avr8"]
known_mcu_groups = arm_mcu_groups + msp_mcu_groups + x86_mcu_groups + avr8_mcu_groups
common_pkgs = ["pcregrep", "libpcre3", "python3", "cppcheck", "doxygen"]
arm_pkgs = ["gcc-arm-none-eabi"]
msp_pkgs = ["gcc-msp430"]
x86_pkgs = ["qemu-system-x86", "g++-multilib", "gcc-multilib", \
"build-essential"]
avr8_pkgs = ["gcc-avr", "binutils-avr", "avr-libc"]
all_mcu_pkgs = arm_pkgs + msp_pkgs + x86_pkgs + avr8_pkgs
pkgs_to_install = common_pkgs
if "BUILDTEST_MCU_GROUP" in os.environ:
mcu_group = os.environ["BUILDTEST_MCU_GROUP"]
if mcu_group not in known_mcu_groups:
pkgs_to_install += all_mcu_pkgs
elif mcu_group in arm_mcu_groups:
pkgs_to_install += arm_pkgs
elif mcu_group in msp_mcu_groups:
pkgs_to_install += msp_pkgs
elif mcu_group in x86_mcu_groups:
pkgs_to_install += x86_pkgs
elif mcu_group in avr8_mcu_groups:
pkgs_to_install += avr8_pkgs
else:
pkgs_to_install += all_mcu_pkgs
print " ".join(pkgs_to_install)