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
|
|
|
|
|
2015-02-28 18:56:48 +01:00
|
|
|
git rebase riot/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-02-28 18:56:48 +01:00
|
|
|
./dist/tools/pr_check/pr_check.sh riot/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
|
2015-05-26 19:28:44 +02:00
|
|
|
./dist/tools/compile_test/compile_test.py riot/master
|
2015-02-06 03:36:16 +01:00
|
|
|
fi
|