Skip to content

Commit 0eba62e

Browse files
committed
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]: https://github.com/nextcloud/desktop/blob/d7b881feb6c2dbee84d9c49bef0f494afe25b6b8/sync-exclude.lst#L3
1 parent c2cf1b2 commit 0eba62e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile.include

+1-1
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ reset:
570570
$(RESET) $(RESET_FLAGS)
571571

572572
.PHONY: test test/available
573-
TESTS ?= $(foreach file,$(wildcard $(APPDIR)/tests/*),\
573+
TESTS ?= $(foreach file,$(wildcard $(APPDIR)/tests/*[^~]),\
574574
$(shell test -f $(file) -a -x $(file) && echo $(file)))
575575
test: $(TEST_DEPS)
576576
$(Q) for t in $(TESTS); do \

0 commit comments

Comments
 (0)