public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v1 0/3] CI: Add 'env' testsuite
@ 2025-07-16 10:40 Zhihang Wei
  2025-07-16 10:40 ` [PATCH v1 1/3] CI: Add nop testcase Zhihang Wei
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Zhihang Wei @ 2025-07-16 10:40 UTC (permalink / raw)
  To: isar-users; +Cc: wzh

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.

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

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250716104010.778032-1-wzh%40ilbers.de.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 1/3] CI: Add nop testcase
  2025-07-16 10:40 [PATCH v1 0/3] CI: Add 'env' testsuite Zhihang Wei
@ 2025-07-16 10:40 ` Zhihang Wei
  2025-07-16 10:40 ` [PATCH v1 2/3] CI: Add bitbake testcase Zhihang Wei
  2025-07-16 10:40 ` [PATCH v1 3/3] CI: Add minimal artifact building testcase Zhihang Wei
  2 siblings, 0 replies; 4+ messages in thread
From: Zhihang Wei @ 2025-07-16 10:40 UTC (permalink / raw)
  To: isar-users; +Cc: wzh

The test_nop testcase always passes to indicate that the test
environment can start testcases.

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

diff --git a/testsuite/citest.py b/testsuite/citest.py
index 9f18a51f..22d9b580 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -18,6 +18,18 @@ except path.CmdNotFoundError:
     SKOPEO_AVAILABLE = False
 
 
+class EnvTest(CIBaseTest):
+
+    """
+    Test environment
+
+    :avocado: tags=env
+    """
+
+    def test_nop(self):
+        self.log.info("test_nop finish")
+
+
 class DevTest(CIBaseTest):
 
     """
-- 
2.39.5

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250716104010.778032-2-wzh%40ilbers.de.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 2/3] CI: Add bitbake testcase
  2025-07-16 10:40 [PATCH v1 0/3] CI: Add 'env' testsuite Zhihang Wei
  2025-07-16 10:40 ` [PATCH v1 1/3] CI: Add nop testcase Zhihang Wei
@ 2025-07-16 10:40 ` Zhihang Wei
  2025-07-16 10:40 ` [PATCH v1 3/3] CI: Add minimal artifact building testcase Zhihang Wei
  2 siblings, 0 replies; 4+ messages in thread
From: Zhihang Wei @ 2025-07-16 10:40 UTC (permalink / raw)
  To: isar-users; +Cc: wzh

This test runs bitbake -e and passes on success, indicating that bitbake
can be started.

Signed-off-by: Zhihang Wei <wzh@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

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250716104010.778032-3-wzh%40ilbers.de.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 3/3] CI: Add minimal artifact building testcase
  2025-07-16 10:40 [PATCH v1 0/3] CI: Add 'env' testsuite Zhihang Wei
  2025-07-16 10:40 ` [PATCH v1 1/3] CI: Add nop testcase Zhihang Wei
  2025-07-16 10:40 ` [PATCH v1 2/3] CI: Add bitbake testcase Zhihang Wei
@ 2025-07-16 10:40 ` Zhihang Wei
  2 siblings, 0 replies; 4+ messages in thread
From: Zhihang Wei @ 2025-07-16 10:40 UTC (permalink / raw)
  To: isar-users; +Cc: wzh

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 <wzh@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)
+
 
 class DevTest(CIBaseTest):
 
-- 
2.39.5

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250716104010.778032-4-wzh%40ilbers.de.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-16 13:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-16 10:40 [PATCH v1 0/3] CI: Add 'env' testsuite Zhihang Wei
2025-07-16 10:40 ` [PATCH v1 1/3] CI: Add nop testcase Zhihang Wei
2025-07-16 10:40 ` [PATCH v1 2/3] CI: Add bitbake testcase Zhihang Wei
2025-07-16 10:40 ` [PATCH v1 3/3] CI: Add minimal artifact building testcase Zhihang Wei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox