[PATCH v2 2/3] CI: Add bitbake testcase

2 views
Skip to first unread message

Zhihang Wei

unread,
Sep 17, 2025, 10:26:46 AM (10 days ago) Sep 17
to isar-...@googlegroups.com
This test runs bitbake -e and passes on success, indicating that bitbake
can be started.

Signed-off-by: Zhihang Wei <w...@ilbers.de>
---
testsuite/citest.py | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/testsuite/citest.py b/testsuite/citest.py
index 22d9b580..510ceea9 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -29,6 +29,17 @@ class EnvTest(CIBaseTest):
def test_nop(self):
self.log.info("test_nop finish")

+ def test_bitbake(self):
+ bitbake_ret = self.exec_cmd("-e", "bitbake")
+
+ self.log.info("result on: bitbake -e")
+ self.log.info(f"return code: {str(bitbake_ret[0])}")
+ self.log.info(f"stdout: {str(bitbake_ret[1])}")
+ self.log.info(f"stderr: {str(bitbake_ret[2])}")
+
+ if(bitbake_ret[0] != 0):
+ self.fail("bitbake -e: returned an error")
+

class DevTest(CIBaseTest):

--
2.39.5

Zhihang Wei

unread,
Sep 17, 2025, 10:26:46 AM (10 days ago) Sep 17
to isar-...@googlegroups.com
This new testsuite provides tests that only take a few minutes to show
whether the building environment is working properly.
- test_nop always returns true.
- test_bitbake uses bitbake -e to show whether bitbake can be started.
- test_build checks whether a package can be built.

Changes v2:
- add self.init() inside test_bitbake to make the test suitable for the
environment on Jenkins

Zhihang Wei (3):
CI: Add nop testcase
CI: Add bitbake testcase
CI: Add minimal artifact building testcase

testsuite/citest.py | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

--
2.39.5

Zhihang Wei

unread,
Sep 17, 2025, 10:26:47 AM (10 days ago) Sep 17
to isar-...@googlegroups.com
This testcase builds a minimal artifact (prebuilt-deb). It takes about a
minute to test whether bitbake can actually build anything.

Signed-off-by: Zhihang Wei <w...@ilbers.de>
---
testsuite/citest.py | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/testsuite/citest.py b/testsuite/citest.py
index 510ceea9..da272de7 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -40,6 +40,14 @@ class EnvTest(CIBaseTest):
if(bitbake_ret[0] != 0):
self.fail("bitbake -e: returned an error")

+ def test_build(self):
+ targets = [
+ 'mc:qemuamd64-bookworm:prebuilt-deb',
+ ]
+
+ self.init()
+ self.perform_build_test(targets)
Reply all
Reply to author
Forward
0 new messages