tests: set HOME to an unexisting directory
authorAntonio Terceiro <terceiro@debian.org>
Sat, 23 Apr 2022 12:37:41 +0000 (09:37 -0300)
committerGuido Günther <agx@sigxcpu.org>
Sat, 23 Apr 2022 13:47:33 +0000 (15:47 +0200)
The test suite contains several assumptions about the global git
configuration, including but not limited to the default branch name
being `master`. By running the tests against a unexisting HOME, git will
not load the user configuration and instead use all the git defaults.

Makefile

index 618f1a186b5ee09c2ca5a53153bc7ecf0f1b55ef..db5ad88eb77a5f5527d55943845d890e92727288 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,7 @@ all+net:
        $(MAKE) GBP_NETWORK_TESTS=1 all
 
 test:
+       export HOME=/nonexisting;                       \
        export GIT_AUTHOR_NAME="Gbp Tests";             \
        export GIT_AUTHOR_EMAIL=tests@example.com;      \
        export GIT_COMMITTER_NAME=$$GIT_AUTHOR_NAME;    \