[7/9] cibuilder.py: add -S support to the bitbake method

Message ID 20240405163135.2987489-8-chris.larson@siemens.com
State Accepted, archived
Headers show
Series Add more signature cachability tests to the testsuite | expand

Commit Message

Larson, Chris April 5, 2024, 4:31 p.m. UTC
From: Christopher Larson <chris.larson@siemens.com>

This allows a test writer to call `bitbake -S none`, to generate
signature data in tmp/stamps.

Submitted at https://groups.google.com/g/isar-users/c/2NB-PXyswq8/m/gGz9b65TAQAJ.

Signed-off-by: Christopher Larson <chris.larson@siemens.com>
---
 testsuite/cibuilder.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index fa30c2f5..e968d14d 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -188,7 +188,7 @@  def move_in_build_dir(self, src, dst):
         if os.path.exists(self.build_dir + '/' + src):
             shutil.move(self.build_dir + '/' + src, self.build_dir + '/' + dst)
 
-    def bitbake(self, target, bitbake_cmd=None, **kwargs):
+    def bitbake(self, target, bitbake_cmd=None, sig_handler=None, **kwargs):
         self.check_init()
         self.log.info('===================================================')
         self.log.info('Building ' + str(target))
@@ -200,6 +200,9 @@  def bitbake(self, target, bitbake_cmd=None, **kwargs):
         if bitbake_cmd:
             cmdline.append('-c')
             cmdline.append(bitbake_cmd)
+        if sig_handler:
+            cmdline.append('-S')
+            cmdline.append(sig_handler)
         if isinstance(target, list):
             cmdline.extend(target)
         else: