Skip to content

Commit

Permalink
Do not look for self-tests in hidden directories
Browse files Browse the repository at this point in the history
There are various circumstances where hidden directory may contain what
looks like a test we may want to run, but it would be futile to do so.
Let's skip looking at any dot-files while looking for zmk tests.

Signed-off-by: Zygmunt Krynicki <[email protected]>
  • Loading branch information
zyga committed Jan 16, 2024
1 parent 88af8a0 commit 28d959b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ $(eval $(call ZMK.Expand,Tarball.Src,$(ZMK.releaseArchive)))
check:: check-unit

# Some hackery is performed to map slashes to dashes, except in "(lib)?hello-".
tests = $(patsubst -%-,%,$(subst /,-,$(subst $(ZMK.SrcDir)/,/,$(dir $(shell find $(ZMK.SrcDir) -name Test.mk)))))
# Exclude any files in hidden directories, such as .git.
tests = $(patsubst -%-,%,$(subst /,-,$(subst $(ZMK.SrcDir)/,/,$(dir $(shell find $(ZMK.SrcDir) -not -path './.*' -name Test.mk)))))
.PHONY: check-unit
check-unit: $(addprefix check-,$(tests))
.PHONY: $(addprefix check-,$(tests))
Expand Down
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Changes in the next release:
* The Toolchain module adds `-g` to `CFLAGS` when `Configure.DebugBuild` is set
to `yes`.

* ZMK self-tests are no longer looking into hidden directories when looking for
unit tests. This notably fixes support for the Debian `dgit` tool which uses
`.git` for storing local state that looks like the source tree.

Changes in 0.5.1

* ZMK now defines `ZMK.BugFixes` as a set of identifiers of issues that were
Expand Down

0 comments on commit 28d959b

Please sign in to comment.