2015-11-18 13:36:51 +01:00
|
|
|
#!/usr/bin/env bash
|
2015-02-24 00:23:34 +01:00
|
|
|
#
|
|
|
|
# Copyright (C) 2015 Philipp Rosenkranz <philipp.rosenkranz@fu-berlin.de>
|
|
|
|
#
|
|
|
|
# This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
# General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
# directory for more details.
|
|
|
|
#
|
|
|
|
|
2015-02-06 03:36:16 +01:00
|
|
|
set -e
|
|
|
|
|
2015-02-28 19:16:48 +01:00
|
|
|
set_result() {
|
|
|
|
NEW_RESULT=$1
|
|
|
|
LAST_RESULT=$2
|
|
|
|
|
|
|
|
if [ $LAST_RESULT -ne 0 ] && [ $NEW_RESULT -eq 0 ]
|
|
|
|
then
|
|
|
|
NEW_RESULT=$LAST_RESULT
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo $NEW_RESULT
|
|
|
|
}
|
|
|
|
|
2015-02-24 00:17:28 +01:00
|
|
|
if [[ $BUILDTEST_MCU_GROUP ]]
|
|
|
|
then
|
2015-05-20 14:10:34 +02:00
|
|
|
|
2015-02-28 18:56:48 +01:00
|
|
|
if [ "$BUILDTEST_MCU_GROUP" == "static-tests" ]
|
|
|
|
then
|
2015-02-28 19:16:48 +01:00
|
|
|
RESULT=0
|
|
|
|
|
2016-02-28 20:44:27 +01:00
|
|
|
if git diff master HEAD -- .travis.yml &> /dev/null; then
|
|
|
|
# check if .travis.yml was changed in the current PR and skip if so
|
|
|
|
if ! git diff --name-only $(git merge-base HEAD master)..HEAD -- \
|
|
|
|
.travis.yml &> 1; then
|
|
|
|
echo "==============================================================" >&2
|
|
|
|
echo -e "\033[1;31m.travis.yml differs in upstream.\033[0m"
|
|
|
|
echo -e "\033[1;31mPlease rebase your PR to current upstream or expect errors!!!!\033[0m" >&2
|
|
|
|
echo " git fetch https://github.com/RIOT-OS/RIOT master" >&2
|
|
|
|
echo " git rebase FETCH_HEAD" >&2
|
|
|
|
echo " git push -f origin $(git rev-parse --abbrev-ref HEAD)" >&2
|
|
|
|
echo "==============================================================" >&2
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2015-12-06 22:30:00 +01:00
|
|
|
git rebase master || git rebase --abort
|
2015-02-28 19:16:48 +01:00
|
|
|
RESULT=$(set_result $? $RESULT)
|
2015-02-28 18:56:48 +01:00
|
|
|
|
2015-02-28 19:06:31 +01:00
|
|
|
./dist/tools/whitespacecheck/check.sh master
|
2015-02-28 19:16:48 +01:00
|
|
|
RESULT=$(set_result $? $RESULT)
|
2015-02-28 18:56:48 +01:00
|
|
|
|
2015-02-28 19:06:31 +01:00
|
|
|
./dist/tools/licenses/check.sh master --diff-filter=MR --error-exitcode=0
|
2015-02-28 19:16:48 +01:00
|
|
|
RESULT=$(set_result $? $RESULT)
|
|
|
|
|
2015-02-28 19:06:31 +01:00
|
|
|
./dist/tools/licenses/check.sh master --diff-filter=AC
|
2015-02-28 19:16:48 +01:00
|
|
|
RESULT=$(set_result $? $RESULT)
|
2015-02-28 18:56:48 +01:00
|
|
|
|
2015-02-28 19:06:31 +01:00
|
|
|
./dist/tools/doccheck/check.sh master
|
2015-02-28 19:16:48 +01:00
|
|
|
RESULT=$(set_result $? $RESULT)
|
2015-02-28 18:56:48 +01:00
|
|
|
|
2015-02-28 19:06:31 +01:00
|
|
|
./dist/tools/externc/check.sh master
|
2015-02-28 19:16:48 +01:00
|
|
|
RESULT=$(set_result $? $RESULT)
|
2015-02-28 18:56:48 +01:00
|
|
|
|
|
|
|
# TODO:
|
|
|
|
# Remove all but `master` parameters to cppcheck (and remove second
|
|
|
|
# invocation) once all warnings of cppcheck have been taken care of
|
|
|
|
# in master.
|
2015-02-28 19:06:31 +01:00
|
|
|
./dist/tools/cppcheck/check.sh master --diff-filter=MR --error-exitcode=0
|
2015-02-28 19:16:48 +01:00
|
|
|
RESULT=$(set_result $? $RESULT)
|
|
|
|
|
2015-02-28 19:06:31 +01:00
|
|
|
./dist/tools/cppcheck/check.sh master --diff-filter=AC
|
2015-02-28 19:16:48 +01:00
|
|
|
RESULT=$(set_result $? $RESULT)
|
|
|
|
|
2015-12-06 22:30:00 +01:00
|
|
|
./dist/tools/pr_check/pr_check.sh master
|
2015-02-28 19:16:48 +01:00
|
|
|
RESULT=$(set_result $? $RESULT)
|
|
|
|
|
|
|
|
exit $RESULT
|
2015-02-28 18:56:48 +01:00
|
|
|
fi
|
|
|
|
|
2015-05-26 19:28:44 +02:00
|
|
|
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
|
2015-02-28 18:56:48 +01:00
|
|
|
fi
|
2016-01-07 16:03:46 +01:00
|
|
|
./dist/tools/compile_test/compile_test.py $TRAVIS_BRANCH
|
2015-02-06 03:36:16 +01:00
|
|
|
fi
|