]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
patchtest: use HEAD commit as base for the selftest and not master
authorAlexander Kanavin <alex@linutronix.de>
Mon, 18 Nov 2024 16:26:41 +0000 (17:26 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 19 Nov 2024 12:53:45 +0000 (12:53 +0000)
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

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/lib/patchtest/selftest/selftest

index 6fad50ce616303931ec6411cd4094bee769ef891..3cf1c361f7f749d793451c5b06e2e013fe87c0cf 100755 (executable)
@@ -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