]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: fix range build without test command
authorWilly Tarreau <w@1wt.eu>
Thu, 12 Mar 2026 07:30:30 +0000 (08:30 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 12 Mar 2026 17:06:37 +0000 (18:06 +0100)
In 3.3, the "make range" target adopted a test command via the TEST_CMD
variable, with commit 90b70b61b1 ("BUILD: makefile: implement support
for running a command in range"). However now it breaks the script when
TEST_CMD is not set due to the shell expansion leaving two '||' operators
side by side. Let's fix this by passing the contents of the makefile
variable in positional arguments before executing them.

Makefile

index d4d9a57f40e1516a34eb0bc731b3adee049aa927..aae8f863e789675ddef3e0c32ba28275db5b3611 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1332,7 +1332,8 @@ range:
                        echo "[ $$index/$$count ]   $$commit #############################"; \
                        git checkout -q $$commit || die 1; \
                        $(MAKE) all || die 1; \
-                       [ -z "$(TEST_CMD)" ] || $(TEST_CMD) || die 1; \
+                       set -- $(TEST_CMD); \
+                       [ "$$#" -eq 0 ] || "$$@" || die 1; \
                        index=$$((index + 1)); \
                done; \
                echo;echo "Done! $${count} commit(s) built successfully for RANGE $${RANGE}" ; \