Skip to content
Snippets Groups Projects
Commit 94b2e081 authored by René Kijewski's avatar René Kijewski
Browse files

tests: limit concurrency level

Some Travis CI machines have 32 CPUs. This sets our concurrency level to 33.
Travis CI kills our buildtest for obvious reasons.

This PR limits the concurrency level to 8 on Travis CI.
parent 639dae4a
No related branches found
No related tags found
No related merge requests found
language: c language: c
env:
- NPROC_MAX=8
before_install: before_install:
- sudo apt-get install emdebian-archive-keyring - sudo apt-get install emdebian-archive-keyring
- echo 'deb http://www.emdebian.org/debian wheezy main' | sudo tee /etc/apt/sources.list.d/emdebian.list > /dev/null - echo 'deb http://www.emdebian.org/debian wheezy main' | sudo tee /etc/apt/sources.list.d/emdebian.list > /dev/null
...@@ -27,6 +30,7 @@ install: ...@@ -27,6 +30,7 @@ install:
- git log -1 --pretty=format:%H riot/master - git log -1 --pretty=format:%H riot/master
script: script:
- make -s -C ./examples/default info-concurrency
- git rebase riot/master || git rebase --abort - git rebase riot/master || git rebase --abort
- ./dist/tools/compile_test/compile_test.py - ./dist/tools/compile_test/compile_test.py
......
ifneq (, $(filter buildtest, $(MAKECMDGOALS))) ifneq (, $(filter buildtest info-concurrency, $(MAKECMDGOALS)))
ifeq (, $(strip $(NPROC))) ifeq (, $(strip $(NPROC)))
# Linux (utility program) # Linux (utility program)
NPROC := $(shell nproc 2>/dev/null) NPROC := $(shell nproc 2>/dev/null)
...@@ -17,6 +17,13 @@ ifneq (, $(filter buildtest, $(MAKECMDGOALS))) ...@@ -17,6 +17,13 @@ ifneq (, $(filter buildtest, $(MAKECMDGOALS)))
endif endif
NPROC := $(shell echo $$(($(NPROC) + 1))) NPROC := $(shell echo $$(($(NPROC) + 1)))
ifneq (, $(NPROC_MAX))
NPROC := $(shell if [ ${NPROC} -gt $(NPROC_MAX) ]; then echo $(NPROC_MAX); else echo ${NPROC}; fi)
endif
ifneq (, $(NPROC_MIN))
NPROC := $(shell if [ ${NPROC} -lt $(NPROC_MIN) ]; then echo $(NPROC_MIN); else echo ${NPROC}; fi)
endif
endif endif
endif endif
...@@ -190,3 +197,6 @@ info-build: ...@@ -190,3 +197,6 @@ info-build:
info-boards-supported: info-boards-supported:
@echo "$(BOARDS)" @echo "$(BOARDS)"
info-concurrency:
@echo "$(NPROC)"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment