make: run static_tests.sh directly with static-tests target

This commit is contained in:
Martine Lenders 2020-12-17 15:08:34 +01:00
parent 9817811b8f
commit 9066ab28e1
No known key found for this signature in database
GPG Key ID: CCD317364F63286F
3 changed files with 4 additions and 29 deletions

View File

@ -15,7 +15,7 @@
declare -A DEPS declare -A DEPS
DEPS["./dist/tools/licenses/check.sh"]="head pcregrep" DEPS["./dist/tools/licenses/check.sh"]="head pcregrep"
DEPS["./dist/tools/doccheck/check.sh"]="doxygen tput snafu" DEPS["./dist/tools/doccheck/check.sh"]="doxygen tput"
DEPS["./dist/tools/cppcheck/check.sh"]="cppcheck" DEPS["./dist/tools/cppcheck/check.sh"]="cppcheck"
DEPS["./dist/tools/vera++/check.sh"]="vera++" DEPS["./dist/tools/vera++/check.sh"]="vera++"
DEPS["./dist/tools/coccinelle/check.sh"]="spatch" DEPS["./dist/tools/coccinelle/check.sh"]="spatch"
@ -24,7 +24,7 @@ DEPS["./dist/tools/codespell/check.sh"]="codespell"
DEPS["./dist/tools/uncrustify/uncrustify.sh"]="uncrustify" DEPS["./dist/tools/uncrustify/uncrustify.sh"]="uncrustify"
if ! command -v git 2>&1 1>/dev/null; then if ! command -v git 2>&1 1>/dev/null; then
echo -n "Required command 'git' for all static tests not found in PATH " >&2 echo -n "Required command 'git' for all static tests not found in PATH "
print_warning print_warning
set_result 1 set_result 1
exit 1 exit 1
@ -61,7 +61,7 @@ set_result() {
function run { function run {
for dep in ${DEPS["$1"]}; do for dep in ${DEPS["$1"]}; do
if ! command -v ${dep} 2>&1 1>/dev/null; then if ! command -v ${dep} 2>&1 1>/dev/null; then
echo -n "Required command '${dep}' for '$*' not found in PATH " >&2 echo -n "Required command '${dep}' for '$*' not found in PATH "
print_warning print_warning
set_result 1 set_result 1
return 1 return 1

View File

@ -1,25 +0,0 @@
#!/usr/bin/env bash
#
# Copyright (C) 2015 Lucas Jenß <lucas@x3ro.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.
#
# Change to RIOT root
cd "$(dirname "$0")/../../"
function dep {
command -v $1 2>&1 1>/dev/null
if (( $? != 0 )); then
echo "Dependency not met: $1"
exit 1
fi
}
# Make sure all required commands are available
dep cppcheck
dep pcregrep
BUILDTEST_MCU_GROUP=static-tests ./dist/tools/ci/build_and_test.sh

View File

@ -1,3 +1,3 @@
static-test: static-test:
./dist/tools/static-tests.sh ./dist/tools/ci/static_tests.sh