]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
patman: Use git to set up the test config
authorSimon Glass <sjg@chromium.org>
Thu, 8 May 2025 03:02:07 +0000 (05:02 +0200)
committerSimon Glass <sjg@chromium.org>
Tue, 27 May 2025 09:07:42 +0000 (10:07 +0100)
At present the branch information is dropped when writing the
configuration. It is easier to get git to set up the config anyway, so
update the test to do this.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/patman/func_test.py

index 61df82312ba759297cff5df781b45ebd53550b47..d055a7e595230f96bdae31a64b1131cff31532a4 100644 (file)
@@ -448,6 +448,11 @@ Changes in v2:
         self.repo = repo
         new_tree = repo.TreeBuilder().write()
 
+        common = ['git', f'--git-dir={self.gitdir}', 'config']
+        tools.run(*(common + ['user.name', 'Dummy']), cwd=self.gitdir)
+        tools.run(*(common + ['user.email', 'dumdum@dummy.com']),
+                  cwd=self.gitdir)
+
         # pylint doesn't seem to find this
         # pylint: disable=E1101
         author = pygit2.Signature('Test user', 'test@email.com')