Skip to content

Commit

Permalink
dist/tools/insufficient_memory: always update Makefile.ci
Browse files Browse the repository at this point in the history
Previously the `add_insufficient_memory_board.sh` script would only
add the tested board to `Makefile.ci` when resource requirements grew,
but never remove it when resource requirements got lower.

This updates the script to also remove boards from `Makefile.ci` if
it is no longer needed. It is also rename (`add` --> `update`) to
match the change in behavior.
  • Loading branch information
maribu committed Dec 1, 2023
1 parent a38ab98 commit 922d8c8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/tools/insufficient_memory/Makefile.for_sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ define create_Makefile.ci
@echo " #" >> $(1)
endef

BOARD_INSUFFICIENT_MEMORY += $(BOARD)
BOARD_INSUFFICIENT_MEMORY += $(ADD_BOARDS)
BOARD_INSUFFICIENT_MEMORY := $(filter-out $(REMOVE_BOARDS),$(BOARD_INSUFFICIENT_MEMORY))

.PHONY: Makefile.ci
ifeq ($(BOARD_INSUFFICIENT_MEMORY),)
Expand Down
2 changes: 1 addition & 1 deletion dist/tools/insufficient_memory/create_makefile.ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ for BOARD in $(EXTERNAL_BOARD_DIRS="" make --no-print-directory info-boards-sup
done

rm "${APP_DIR}/Makefile.ci"
make -f "$(dirname "$0")"/Makefile.for_sh DIR="${APP_DIR}" BOARD="${BOARDS}" Makefile.ci > /dev/null
make -f "$(dirname "$0")"/Makefile.for_sh DIR="${APP_DIR}" ADD_BOARDS="${BOARDS}" Makefile.ci > /dev/null
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ APPLICATIONS="${APPLICATIONS} $(make -sC "${RIOTBASE}" info-applications)"

for application in ${APPLICATIONS}; do
printf "${CNORMAL}%-40s${CRESET}" "${application}"

# First, remove the board from Makefile.ci; otherwise linking step will be
# skipped with RIOT_CI_BUILD=1 when the board is already in the list.
make -f "$(dirname "$0")"/Makefile.for_sh DIR="${RIOTBASE}/${application}" REMOVE_BOARDS="${BOARD}" Makefile.ci > /dev/null
# disable warning about globbing and word splitting for ${LOCAL_MAKE_ARGS}
# as this is exactly what we want here
# shellcheck disable=SC2086
Expand All @@ -62,7 +66,7 @@ for application in ${APPLICATIONS}; do
-e "wraps around address space" \
"$TMPFILE" > /dev/null; then
printf "${CBIG}%s${CRESET}\n" "too big"
make -f "$(dirname "$0")"/Makefile.for_sh DIR="${RIOTBASE}/${application}" BOARD="${BOARD}" Makefile.ci > /dev/null
make -f "$(dirname "$0")"/Makefile.for_sh DIR="${RIOTBASE}/${application}" ADD_BOARDS="${BOARD}" Makefile.ci > /dev/null
elif grep -e "not whitelisted" \
-e "unsatisfied feature requirements" \
-e "Some feature requirements are blacklisted:" \
Expand Down

0 comments on commit 922d8c8

Please sign in to comment.