tools: add add_insufficient_memory_board.sh#12485
Conversation
ac9feda to
e51da8d
Compare
|
sorry I don't see the overall benefit of this, also to me this is misuse of the build system. |
|
I don't think keeping those lists sorted is a good allocation of maintainer time. |
|
How does a make target achieve this. If then add the test for alphabetic order into |
I'd like to avoid that step entirely.
Maybe a warning not to edit that file by hand would help? |
|
Aren't there some scripts proposed already that could take care of reordering the list by being called in the Make function @benpicco introduces here? |
|
see #6818 |
|
As to why this is useful: It allows me to do for i in */Makefile.ci; do
test=$(dirname $i);
if make BOARD=stm32f030f4-demo -j -C $test &> /dev/null ; then
echo $test succeeds
else
echo $test fails
make BOARD=stm32f030f4-demo -C $test add_insufficient_memory
fi
done(Ok, I can make that a script outside of the build system too) |
That sorting script is aiming to achieve a bit more. We intentionally made
Of course, if the script in #6818 would be generalized to work with both flavors of type setting, my arguments become invalid. |
|
@maribu I (strongly) agree with "one board per line" for reasons you mentioned. Reference to #6818 was just to point out, that there is similar work already and also that it makes more sense to me to provide a tool/helper script for authors to automatically adapt such lists to match the desired output. However, I'm still not in favour of having this as a make target, bc its tooling and should not (IMHO) be in the build system. If someone likes it that much they can make it a pre-commit hook in git config. |
|
plus having a check (as already mentioned before) in static tests that verifies lists are ordered and one-board-per-line. |
|
Running make help currently yields Output of `make help`That is quite a bunch of targets with a lot not relevant to most users. E.g. with the DES project being long concluded, is anyone still using So my bottom line is: If there is something that is not generally useful in the daily work flow of a RIOT user, a RIOT contributor or a RIOT maintainer, I would like to have it separately from the standard build system. @benpicco: Would you mind if the feature would go to |
|
@maribu sure, I can extend it then too. |
e51da8d to
258b0b8
Compare
|
I think this feature can be useful in general and the integration in the build system is quite nice since it provides all useful informations: list of unsufficient memory boards + current board. Maybe the specific handling for this could be moved in a dedicated make files, in
It depends, make can do a lot of powerful things, not necessarily directly related to the build system. Doing the same as done here with a script would not help I think. |
258b0b8 to
09845a1
Compare
|
I moved the code to a script, so all you have to do if you add a new board is running Running this on #12433 gives…I might throw a |
Sorry for being imprecise. I ment that the default @benpicco: This is extremely nice! I'll check on Monday, if nobody else is faster. |
|
I added a workaround to make |
e251df4 to
a14a1d9
Compare
|
@maribu It's monday again 😉 |
|
Sorry, totally forgot about this. Maybe you could add two or three lines in a |
|
Actually I can just rename it to |
|
I think that the sanity check only checks for |
This adds a script that automatically compiles all examples & tests for a given board and updates Makefile.ci if necessary.
6975ff3 to
bff06a4
Compare
Contribution description
This adds a script to automatically add a new board to all
Makefile.cifiles.To achieve this it builds all examples and tests and checks if a build failure due to insufficient memory occurred.
So to add a new board, you only have to do
Testing procedure
arduino-nanofromMakefile.ci.add_insufficient_memory_board.sh arduino-nanoMakefile.cifiles.Issues/PRs references
related to #12484 and #12406