GNU bug report logs -
#37679
Local git configuration interferes with testsuite
Previous Next
Full log
View this message in rfc822 format
* tests/fake-home/.gitconfig: New file. Provide minimal git
configuration for tests.
* build-aux/test-env.in: Set HOME to the fake home.
* Makefile.am(EXTRA_DIST): Add fake-home/.gitconfig.
---
Makefile.am | 2 ++
build-aux/test-env.in | 4 ++++
tests/fake-home/.gitconfig | 21 +++++++++++++++++++++
3 files changed, 27 insertions(+)
create mode 100644 tests/fake-home/.gitconfig
diff --git a/Makefile.am b/Makefile.am
index 344ecdbc42..5eb918d599 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 © 2020 Gábor Boskovits <boskovits <at> gmail.com>
#
# This file is part of GNU Guix.
#
@@ -560,6 +561,7 @@ EXTRA_DIST += \
build-aux/update-NEWS.scm \
d3.v3.js \
graph.js \
+ tests/fake-home/.gitconfig \
tests/test.drv \
tests/signing-key.pub \
tests/signing-key.sec \
diff --git a/build-aux/test-env.in b/build-aux/test-env.in
index 59ab58cc94..1121570fbc 100644
--- a/build-aux/test-env.in
+++ b/build-aux/test-env.in
@@ -2,6 +2,7 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo <at> gnu.org>
+# Copyright © 2020 Gábor Boskovits <boskovits <at> gmail.com>
#
# This file is part of GNU Guix.
#
@@ -151,6 +152,9 @@ export GUIX_BUILD_OPTIONS
# Ignore user settings.
unset GUIX_PACKAGE_PATH
+# Provide fake home for tests using git
+HOME="@abs_top_srcdir@/tests/fake-home"
+
storedir="@storedir@"
prefix="@prefix@"
datarootdir="@datarootdir@"
diff --git a/tests/fake-home/.gitconfig b/tests/fake-home/.gitconfig
new file mode 100644
index 0000000000..c32de560e7
--- /dev/null
+++ b/tests/fake-home/.gitconfig
@@ -0,0 +1,21 @@
+# GNU Guix --- Functional package management for GNU
+# Copyright © 2020 Gábor Boskovits <boskovits <at> gmail.com>
+#
+# This file is part of GNU Guix.
+#
+# GNU Guix is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or (at
+# your option) any later version.
+#
+# GNU Guix is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+[user]
+ email = alice <at> example.com
+ name = Alice
--
2.25.0
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.