summaryrefslogtreecommitdiff
path: root/tools/patman/test_common.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-05-10 13:05:01 +0200
committerSimon Glass <sjg@chromium.org>2025-05-27 10:07:42 +0100
commitc9efedfc2fbd0088d340ef67c04b0a03b2cdd754 (patch)
tree54498b3891c88260d732cd5b8fb8948809f340ca /tools/patman/test_common.py
parentdd16f0e26260de30dafd91d64bc41da63c9863eb (diff)
patman: Avoid touching the system or local config
Set the git variables to ensure that any local gitconfig is not used or affected by the tests. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/test_common.py')
-rw-r--r--tools/patman/test_common.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/patman/test_common.py b/tools/patman/test_common.py
index bc27b2d3cef..7da995dda22 100644
--- a/tools/patman/test_common.py
+++ b/tools/patman/test_common.py
@@ -109,6 +109,9 @@ class TestCommon:
Returns:
pygit2.Repository: repository
"""
+ os.environ['GIT_CONFIG_GLOBAL'] = '/dev/null'
+ os.environ['GIT_CONFIG_SYSTEM'] = '/dev/null'
+
repo = pygit2.init_repository(self.gitdir)
self.repo = repo
new_tree = repo.TreeBuilder().write()