chiark / gitweb /
Makefile: Set HOME when running tests
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 14 Oct 2018 13:52:28 +0000 (14:52 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 14 Oct 2018 14:17:27 +0000 (15:17 +0100)
A nonexistent directory is sufficient.

Otherwise the tests can pick up the user's git configuration, which is
undesirable.  For example, I have

    [branch]
            autoSetupMerge = false

which causes this test

    >>> clone.create_branch('foo', 'origin/foo')
    >>> clone.get_merge_branch('foo')
    'origin/foo'

to fail.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Makefile

index e791e9f197670e4da766d80a02fc4bbba31d8866..908d992efd39bf41e43d1564a913c3ad99d3de88 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ test:
        export GIT_COMMITTER_NAME=$$GIT_AUTHOR_NAME;    \
        export GIT_COMMITTER_EMAIL=$$GIT_AUTHOR_EMAIL;  \
        PYTHONPATH=.                                    \
+       HOME=$(PWD)/tests-home-does-not-exist           \
        LC_ALL=$(TEST_LOCALE) python3 setup.py nosetests $(NOSE_OPTS)
 
 syntax-check: