I noticed that the local git configuration interferes with the guix testsuite. After discussion on IRC with nckx I came up with the attached patch.Comments are welcome! Best regards,g_bor-- OpenPGP Key Fingerprint: 7988:3B9F:7D6A:4DBF:3719:0367:2506:A96C:CF63:0B21
Ooh, good catch. This change fixes issues with ‘tests/git.scm’, is thatcorrect? The ‘GIT_’ environment variables are honored by Git itself, not bylibgit2/Guile-Git, right? Can we avoid setting HOME and XDG_CONFIG_HOME? Perhaps these variables should all be set in ‘test-env’ along with theirfriends, for consistency? Last, if we end up keeping ‘tests/fake-home’, make sure to also add itto ‘EXTRA_DIST’ in ‘Makefile.am’. Could you send an updated patch? Thanks for addressing it, and sorry for the loooong delay! Ludo’.
[PATCH 0/2] Local git configuration interferes with testsuite
(address . email@example.com)(name . Gábor Boskovits)(address . firstname.lastname@example.org)
Create a fake home in tests with a gitconfig so that the user configurationdoes not get picked up.I investigated how to solve this best, but git only respects HOME for thecommands we are using.Also note that this does not affect libraries, only the git cli, as librariesdo not use the environment variables. Gábor Boskovits (2): tests: Isolate git from user configuration. tests: Ignore files created by the testsuite. .gitignore | 4 +++- Makefile.am | 2 ++ build-aux/test-env.in | 4 ++++ tests/fake-home/.gitconfig | 21 +++++++++++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 tests/fake-home/.gitconfig -- 2.25.0
As discussed on IRC yesterday (?), we can arrange to move thesevariables directly in (guix tests git), which is the only place where‘git’ is invoked. That way, it can’t possibly interfere with other usesof HOME, etc. WDYT of something like the patch below? Thanks,Ludo’.
(name . Gábor Boskovits)(address . email@example.com)(address . firstname.lastname@example.org)
Hi Gábor, Ludovic Courtès <email@example.com> skribis:
Toggle quote (7 lines)> As discussed on IRC yesterday (?), we can arrange to move these> variables directly in (guix tests git), which is the only place where> ‘git’ is invoked. That way, it can’t possibly interfere with other uses> of HOME, etc.>> WDYT of something like the patch below?
I pushed it as 3c91f003416c9fb79af2dc8766a7f449aa03f839. Ludo’.