mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge #19673
19673: tools/build_system_sanity_check: add check to verify test applications are at the right place r=maribu a=aabadie Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
This commit is contained in:
commit
e690ef4c12
27
dist/tools/buildsystem_sanity_check/check.sh
vendored
27
dist/tools/buildsystem_sanity_check/check.sh
vendored
@ -362,6 +362,32 @@ check_stderr_null() {
|
||||
| error_with_message "Redirecting stderr and stdout to /dev/null is \`>/dev/null 2>&1\`; the other way round puts the old stderr to the new stdout."
|
||||
}
|
||||
|
||||
# Test application directories that starts by the following strings are invalid
|
||||
# and should moved to the corresponding tests subdirectory.
|
||||
FORBIDDEN_TEST_DIRS=()
|
||||
FORBIDDEN_TEST_DIRS+=('build_system')
|
||||
FORBIDDEN_TEST_DIRS+=('core') # => move under tests/core
|
||||
FORBIDDEN_TEST_DIRS+=('cpu') # => move under tests/cpu
|
||||
FORBIDDEN_TEST_DIRS+=('driver') # => move under tests/drivers
|
||||
FORBIDDEN_TEST_DIRS+=('gnrc') # => move under tests/net
|
||||
FORBIDDEN_TEST_DIRS+=('periph') # => move under tests/periph
|
||||
FORBIDDEN_TEST_DIRS+=('net') # => move under tests/net
|
||||
FORBIDDEN_TEST_DIRS+=('pkg') # => move under tests/pkg
|
||||
FORBIDDEN_TEST_DIRS+=('sys') # => move under tests/sys
|
||||
FORBIDDEN_TEST_DIRS+=('vfs') # => move under tests/sys
|
||||
FORBIDDEN_TEST_DIRS+=('xtimer') # => move under tests/sys
|
||||
FORBIDDEN_TEST_DIRS+=('ztimer') # => move under tests/sys
|
||||
|
||||
check_tests_application_path() {
|
||||
local patterns=()
|
||||
patterns+=(-regex "^tests/bench_.*/Makefile")
|
||||
for forbidden in "${FORBIDDEN_TEST_DIRS[@]}"; do
|
||||
patterns+=(-o -regex "^tests/${forbidden}_.*/Makefile")
|
||||
done
|
||||
|
||||
find tests/ -type f "${patterns[@]}" | error_with_message "Invalid application path in tests/"
|
||||
}
|
||||
|
||||
error_on_input() {
|
||||
! grep ''
|
||||
}
|
||||
@ -383,6 +409,7 @@ all_checks() {
|
||||
check_no_pkg_source_local
|
||||
check_no_riot_config
|
||||
check_stderr_null
|
||||
check_tests_application_path
|
||||
}
|
||||
|
||||
main() {
|
||||
|
Loading…
Reference in New Issue
Block a user