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

Re: [PATCH 0/2] Add Windows support to the new RUNTIME_PREFIX design

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 28, 2018, 17:12 UTC
Message-ID
<xmqqa7us86pi.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAD1RUU9XK837mdRwicMwM5qVApzz8o2e4Eg=B0LH3SRtLqG9WQ@mail.gmail.com>
Daniel Jacques <dnj@google.com> writes:
Show 9 quoted lines
> A simple grep suggests that the current test suite doesn't seem to have any
> RUNTIME_PREFIX-specific tests. When I've been running the test suites, I've
> been doing it with a "config.mak" file that explicitly enables
> RUNTIME_PREFIX to get the runtime prefix code tested against the standard
> Git testing suites.
>
> From a Git maintainer's perspective, would such a test be a prerequisite
> for landing this patch series, or is this a good candidate for follow-up
> work to improve our testing coverage?

It would be a nice-to-have follow-up, I would say, but as you two seem to be working well together and it shouldn't be too involved to have the minimum test that makes sure the version of "git" being tested thinks things should be where we think they should be, with something like...

	test_expect_success RUNTIME_PREFIX 'runtime-prefix basics' '
		(
			# maybe others
			safe_unset GIT_EXEC_PATH &&
			git --exec-path >actual
		) &&
		# compute the expected value -- we know the first
		# element of $PATH is where we find "git", so things
		# should be computable relative to that, perhaps?
		echo >expect "${PATH%%:*}/..." &&
		# then compare
		test_cmp expect actual		
	'

so I am hoping such a minimum test to be in the series when it graduate to 'master' and become a part of a release.

On the other hand, "make a whole test install and try running it" may actually be easier but that probably can be done using existing GIT_TEST_INSTALLED framework? In short, you would probably do

 - make RUNTIME_PREFIX=YesPlease
 - make RUNTIME_PREFIX=YesPlease DESTDIR=...some..where... install
 - GIT_TEST_INSTALLED=...some..where.../bin make test
or something like that.
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 17 of 20 in “RUNTIME_PREFIX relocatable Git”
  1. 0/3 RUNTIME_PREFIX relocatable GitDan Jacques, Mar 25, 2018
  2. 1/3 Makefile: generate Perl header from template fileDan Jacques, Mar 25, 2018
  3. 2/3 Makefile: add Perl runtime prefix supportDan Jacques, Mar 25, 2018
  4. 3/3 exec_cmd: RUNTIME_PREFIX on some POSIX systemsDan Jacques, Mar 25, 2018
  5. Ævar Arnfjörð BjarmasonMar 25, 2018
  6. Daniel JacquesMar 26, 2018
  7. Ævar Arnfjörð BjarmasonMar 26, 2018
  8. Daniel JacquesMar 26, 2018
  9. Junio C HamanoMar 26, 2018
  10. Daniel JacquesMar 26, 2018
  11. Johannes SchindelinMar 26, 2018
  12. 0/2 Add Windows support to the new RUNTIME_PREFIX designJohannes Schindelin, Mar 26, 2018
  13. Daniel JacquesMar 27, 2018
  14. Johannes SchindelinMar 27, 2018
  15. Daniel JacquesMar 27, 2018
  16. Johannes SchindelinMar 27, 2018
  17. Junio C HamanoMar 28, 2018
  18. Johannes SchindelinMar 29, 2018
  19. 1/2 exec_cmd: provide a new-style RUNTIME_PREFIX helper for WindowsJohannes Schindelin, Mar 26, 2018
  20. 2/2 mingw/msvc: use the new-style RUNTIME_PREFIX helperJohannes Schindelin, Mar 26, 2018

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.