I installed the attached patch. It has this commit message: maint: fix bug in sc_tests_executable for VPATH builds.
* cfg.mk (sc_tests_executable): "git ls-files ../foo/tests" fails when the current directory is not below a directory which has a .git subdirectory. But this is often the case for VPATH builds (i.e. builds run outside the source tree). Avoid the problem by temporarily changing working directory, as we do in other syntax checks.
From ee4751cd9710080ffe6f524586f4fd7631b42f74 Mon Sep 17 00:00:00 2001 From: James Youngman <[email protected]> Date: Sun, 28 Jun 2026 08:37:23 +0100 Subject: [PATCH] maint: fix bug in sc_tests_executable for VPATH builds. * cfg.mk (sc_tests_executable): "git ls-files ../foo/tests" fails when the current directory is not below a directory which has a .git subdirectory. But this is often the case for VPATH builds (i.e. builds run outside the source tree). Avoid the problem by temporarily changing working directory, as we do in other syntax checks. --- cfg.mk | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/cfg.mk b/cfg.mk index 8adcfc31..51afb74b 100644 --- a/cfg.mk +++ b/cfg.mk @@ -133,13 +133,15 @@ sc_tests_list_consistency: # Ensure that all version-controlled test scripts are executable. sc_tests_executable: - @set -o noglob 2>/dev/null || set -f; \ - find_ext="-name '' "`printf -- "-o -name *%s " $(TEST_EXTENSIONS)`;\ - find $(srcdir)/tests \( $$find_ext \) \! -perm -u+x -print \ - | { sed "s|^$(srcdir)/||"; git ls-files $(srcdir)/tests/; } \ - | sort | uniq -d \ - | grep -Ev '^tests/.*\.c$$' \ - | sed -e "s/^/$(ME): Please make test executable: /" | grep . \ + @set -o noglob 2>/dev/null || set -f; \ + find_ext="-name '' "`printf -- "-o -name *%s " $(TEST_EXTENSIONS)`; \ + ( cd "$(srcdir)" && \ + { find tests/ \( $$find_ext \) \! -perm -u+x -print ; \ + git ls-files tests/; } \ + ) \ + | sort | uniq -d \ + | grep -Ev '^tests/.*\.c$$' \ + | sed -e "s/^/$(ME): Please make test executable: /" | grep . \ && exit 1; : # Avoid :>file which doesn't propagate errors -- 2.47.3
