* tests/fake-home/.gitconfig: New file. Provide minimal git
* build-aux/test-env.in: Set HOME to the fake home.
* Makefile.am(EXTRA_DIST): Add fake-home/.gitconfig.
build-aux/test-env.in | 4 ++++
tests/fake-home/.gitconfig | 21 +++++++++++++++++++++
3 files changed, 27 insertions(+)
create mode 100644 tests/fake-home/.gitconfig
Toggle diff (71 lines)
diff --git a/Makefile.am b/Makefile.am
index 344ecdbc42..5eb918d599 100644
# Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
# Copyright © 2018 Alex Vong <alexvong1995@gmail.com>
# Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+# Copyright © 2020 Gábor Boskovits <boskovits@gmail.com>
# This file is part of GNU Guix.
@@ -560,6 +561,7 @@ EXTRA_DIST += \
build-aux/update-NEWS.scm \
+ tests/fake-home/.gitconfig \
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
# GNU Guix --- Functional package management for GNU
# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2020 Gábor Boskovits <boskovits@gmail.com>
# This file is part of GNU Guix.
@@ -151,6 +152,9 @@ export GUIX_BUILD_OPTIONS
+# Provide fake home for tests using git
+HOME="@abs_top_srcdir@/tests/fake-home"
datarootdir="@datarootdir@"
diff --git a/tests/fake-home/.gitconfig b/tests/fake-home/.gitconfig
index 0000000000..c32de560e7
+++ b/tests/fake-home/.gitconfig
+# GNU Guix --- Functional package management for GNU
+# Copyright © 2020 Gábor Boskovits <boskovits@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/>.
+ email = alice@example.com