git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Move test-* to t/helper/ subdirectory

From
Duy Nguyen <pclouds@gmail.com>
Date
Apr 27, 2016, 10:18 UTC
Message-ID
<20160427101833.GA5536@lanh>
In-Reply-To
<CACsJy8A8vbp4-LrxoNX510Nme97EKfu0hBBs-LDRap1Z5=v3rA@mail.gmail.com>
On Wed, Apr 27, 2016 at 07:52:41AM +0700, Duy Nguyen wrote:
Show 11 quoted lines
> > Can you (or somebody else) double check that the resulting Makefile
> > gets the build dependencies and exec path right?
> >
> > I am seeing occasional failure from t0040 when checking out between
> > master and pu, and between the branches test-parse-options do change
> > behaviour which explains the breakage.
> 
> There is a problem moving between master and next/pu though.
> bin-wrappers is not regenerated after the move so it could point to
> the old binaries (in the other place). Not sure how to fix that
> cleanly, will think of something, maybe, in about 8 hours.

This patch forces bin-wrappers regeneration every time a test program is updated. A bit wasteful, but I don't see a better option (which is also why I limit this to test programs only).

A similar patch (without "t/helper/") could be applied on maint/master, otherwise bin-wrappers is still not updated when moving back from next/pu. And of course the problem will pop up again if you build old history...

-- 8< --
diff --git a/Makefile b/Makefile
index dd178ee..6b6a844 100644
--- a/Makefile
+++ b/Makefile
@@ -2196,10 +2196,13 @@ GIT-PYTHON-VARS: FORCE
 endif
 
 test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X))
+bindir_test_programs := $(patsubst %,bin-wrappers/%,$(TEST_PROGRAMS_NEED_X))
 
 all:: $(TEST_PROGRAMS) $(test_bindir_programs)
 all:: $(NO_INSTALL)
 
+$(bindir_test_programs): bin-wrappers/%: t/helper/%$X
+
 bin-wrappers/%: wrap-for-bin.sh
 	@mkdir -p bin-wrappers
 	$(QUIET_GEN)sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
-- 8< --
-- 
Duy
Previous: Duy NguyenNext: Junio C Hamano
Message 7 of 16 in “Move test-* to t/helper/ subdirectory”
  1. Move test-* to t/helper/ subdirectoryNguyễn Thái Ngọc Duy, Apr 13, 2016
  2. Junio C HamanoApr 15, 2016
  3. Junio C HamanoApr 15, 2016
  4. Duy NguyenApr 16, 2016
  5. Junio C HamanoApr 26, 2016
  6. Duy NguyenApr 27, 2016
  7. Duy NguyenApr 27, 2016
  8. Junio C HamanoApr 27, 2016
  9. Duy NguyenMay 1, 2016
  10. Duy NguyenMay 1, 2016
  11. Junio C HamanoMay 2, 2016
  12. Duy NguyenMay 3, 2016
  13. Duy NguyenMay 8, 2016
  14. Junio C HamanoMay 9, 2016
  15. Duy NguyenMay 10, 2016
  16. Junio C HamanoMay 10, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.