GNU bug report logs - #37679
Local git configuration interferes with testsuite

Previous Next

Package: guix;

Reported by: Gábor Boskovits <boskovits <at> gmail.com>

Date: Wed, 9 Oct 2019 10:37:01 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 37679 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Gábor Boskovits <boskovits <at> gmail.com>
Cc: 37679 <at> debbugs.gnu.org
Subject: Re: bug#37679: Local git configuration interferes with testsuite
Date: Tue, 07 Jan 2020 10:11:32 +0100
Hello!

Gábor Boskovits <boskovits <at> gmail.com> skribis:

> From abf20477ea139bfaf1f2e21f09c2420fe618c9ca Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?G=C3=A1bor=20Boskovits?= <boskovits <at> gmail.com>
> Date: Tue, 8 Oct 2019 22:41:20 +0200
> Subject: [PATCH] tests: Isolate git from external configuration.
>
> * Makefile.am(AM_TESTS_ENVIRONMENT): Add environment variables to
> make git ignore the user and system configuration files.
> * tests/fake-home/.gitconfig: New file. Provide minimal git
> configuration for tests.
> ---
>  Makefile.am                |  9 ++++++++-
>  tests/fake-home/.gitconfig | 21 +++++++++++++++++++++
>  2 files changed, 29 insertions(+), 1 deletion(-)
>  create mode 100644 tests/fake-home/.gitconfig
>
> diff --git a/Makefile.am b/Makefile.am
> index 36767c2f47..e7bf819a6b 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -14,6 +14,7 @@
>  # Copyright © 2018 Oleg Pykhalov <go.wigust <at> gmail.com>
>  # Copyright © 2018 Alex Vong <alexvong1995 <at> gmail.com>
>  # Copyright © 2019 Efraim Flashner <efraim <at> flashner.co.il>
> +# Copyright © 2019 Gábor Boskovits <boskovits <at> gmail.com>
>  #
>  # This file is part of GNU Guix.
>  #
> @@ -472,7 +473,13 @@ SH_TESTS =					\
>  
>  TESTS = $(SCM_TESTS) $(SH_TESTS)
>  
> -AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
> +AM_TESTS_ENVIRONMENT = 				\
> +  abs_top_srcdir="$(abs_top_srcdir)" 		\
> +  GUILE_AUTO_COMPILE=0				\
> +  GIT_CONFIG_NOSYSTEM=1				\
> +  GIT_ATTR_NOSYSTEM=1				\
> +  HOME="$(abs_top_srcdir)/tests/fake-home"	\
> +  XDG_CONFIG_HOME="$(abs_top_srcdir)/tests/fake-xgd-config-home"

Ooh, good catch.  This change fixes issues with ‘tests/git.scm’, is that
correct?

The ‘GIT_’ environment variables are honored by Git itself, not by
libgit2/Guile-Git, right?

Can we avoid setting HOME and XDG_CONFIG_HOME?

Perhaps these variables should all be set in ‘test-env’ along with their
friends, for consistency?

Last, if we end up keeping ‘tests/fake-home’, make sure to also add it
to ‘EXTRA_DIST’ in ‘Makefile.am’.

Could you send an updated patch?

Thanks for addressing it, and sorry for the loooong delay!

Ludo’.




This bug report was last modified 5 years and 35 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.