patchtest: use HEAD commit as base for the selftest and not master

Patchtest applies patches on top of poky master branch by default;
this means selftest does the same, and any commits from the branch-under-test
are then discarded.

This can cause issues for example, if bitbake-server process started by selftest
from the master branch tries to parse bitbake.conf from the branch under test:
https://valkyrie.yoctoproject.org/#/builders/71/builds/460

(From OE-Core rev: 03c6b2e0277c00faf55c12c4d0b4b5e3a4898f8c)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexander Kanavin
2024-11-18 17:26:41 +01:00
committed by Richard Purdie
parent b3c2e1f30a
commit 4ed3c83240

View File

@@ -38,7 +38,7 @@ def test(root, patch):
res = True
patchpath = os.path.abspath(os.path.join(root, patch))
cmd = 'patchtest --repodir %s --testdir %s/tests --patch %s' % (repodir, topdir, patchpath)
cmd = 'patchtest --base-commit HEAD --repodir %s --testdir %s/tests --patch %s' % (repodir, topdir, patchpath)
results = subprocess.check_output(cmd, stderr=subprocess.STDOUT, universal_newlines=True, shell=True)
return results