1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

make: don't execute tilde files on test target

My system (Ubuntu 16.04) creates a backup when opening a file with
`vim`. This backup is called `filename~`. Due to it being a copy of the
file before opening, it also is executable, which is why it is selected
for execution with the `make test` target.

This change makes the `TESTS` macro exclude files ending in `~`. This
way files ending in `~` are not executed with `make test`.

Since e.g. projects like NextCloud are excluding such files also from
their sync [[1]], I think this is fine.

[1]: d7b881feb6/sync-exclude.lst (L3)
This commit is contained in:
Martine Lenders 2019-04-17 19:41:44 +02:00
parent c2cf1b209c
commit 0eba62e5b0

View File

@ -570,7 +570,7 @@ reset:
$(RESET) $(RESET_FLAGS)
.PHONY: test test/available
TESTS ?= $(foreach file,$(wildcard $(APPDIR)/tests/*),\
TESTS ?= $(foreach file,$(wildcard $(APPDIR)/tests/*[^~]),\
$(shell test -f $(file) -a -x $(file) && echo $(file)))
test: $(TEST_DEPS)
$(Q) for t in $(TESTS); do \