Browse Source

tests/travis: split buildtests into MCU groups.

dev/timer
Philipp Rosenkranz 8 years ago
parent
commit
02d0c88284
  1. 53
      .travis.yml
  2. 5
      Makefile.buildtests
  3. 1
      boards/airfy-beacon/Makefile.features
  4. 1
      boards/arduino-due/Makefile.features
  5. 1
      boards/arduino-mega2560/Makefile.features
  6. 1
      boards/avsextrem/Makefile.features
  7. 1
      boards/cc2538dk/Makefile.features
  8. 1
      boards/chronos/Makefile.features
  9. 1
      boards/f4vi1/Makefile.features
  10. 1
      boards/fox/Makefile.features
  11. 1
      boards/iot-lab_M3/Makefile.features
  12. 1
      boards/mbed_lpc1768/Makefile.features
  13. 1
      boards/msb-430/Makefile.features
  14. 1
      boards/msb-430h/Makefile.features
  15. 1
      boards/msba2/Makefile.features
  16. 1
      boards/msbiot/Makefile.features
  17. 1
      boards/native/Makefile.features
  18. 1
      boards/nucleo-f334/Makefile.features
  19. 1
      boards/nucleo-l1/Makefile.features
  20. 1
      boards/openmote/Makefile.features
  21. 1
      boards/pca10000/Makefile.features
  22. 1
      boards/pca10005/Makefile.features
  23. 1
      boards/pttu/Makefile.features
  24. 1
      boards/qemu-i386/Makefile.features
  25. 1
      boards/redbee-econotag/Makefile.features
  26. 1
      boards/samr21-xpro/Makefile.features
  27. 1
      boards/spark-core/Makefile.features
  28. 1
      boards/stm32f0discovery/Makefile.features
  29. 1
      boards/stm32f3discovery/Makefile.features
  30. 1
      boards/stm32f4discovery/Makefile.features
  31. 1
      boards/telosb/Makefile.features
  32. 1
      boards/udoo/Makefile.features
  33. 1
      boards/wsn430-v1_3b/Makefile.features
  34. 1
      boards/wsn430-v1_4/Makefile.features
  35. 1
      boards/yunjia-nrf51822/Makefile.features
  36. 1
      boards/z1/Makefile.features
  37. 36
      dist/tools/travis-scripts/build_and_test.sh
  38. 36
      dist/tools/travis-scripts/get-pkg-list.py

53
.travis.yml

@ -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

5
Makefile.buildtests

@ -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

1
boards/airfy-beacon/Makefile.features

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

1
boards/arduino-due/Makefile.features

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

1
boards/arduino-mega2560/Makefile.features

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

1
boards/avsextrem/Makefile.features

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

1
boards/cc2538dk/Makefile.features

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

1
boards/chronos/Makefile.features

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

1
boards/f4vi1/Makefile.features

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

1
boards/fox/Makefile.features

@ -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

1
boards/iot-lab_M3/Makefile.features

@ -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

1
boards/mbed_lpc1768/Makefile.features

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

1
boards/msb-430/Makefile.features

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

1
boards/msb-430h/Makefile.features

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

1
boards/msba2/Makefile.features

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

1
boards/msbiot/Makefile.features

@ -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

1
boards/native/Makefile.features

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

1
boards/nucleo-f334/Makefile.features

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

1
boards/nucleo-l1/Makefile.features

@ -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

1
boards/openmote/Makefile.features

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

1
boards/pca10000/Makefile.features

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

1
boards/pca10005/Makefile.features

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

1
boards/pttu/Makefile.features

@ -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

1
boards/qemu-i386/Makefile.features

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

1
boards/redbee-econotag/Makefile.features

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

1
boards/samr21-xpro/Makefile.features

@ -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

1
boards/spark-core/Makefile.features

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

1
boards/stm32f0discovery/Makefile.features

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

1
boards/stm32f3discovery/Makefile.features

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

1
boards/stm32f4discovery/Makefile.features

@ -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

1
boards/telosb/Makefile.features

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

1
boards/udoo/Makefile.features

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

1
boards/wsn430-v1_3b/Makefile.features

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

1
boards/wsn430-v1_4/Makefile.features

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

1
boards/yunjia-nrf51822/Makefile.features

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

1
boards/z1/Makefile.features

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

36
dist/tools/travis-scripts/build_and_test.sh vendored

@ -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

@ -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)
Loading…
Cancel
Save