diff mbox series

[v2,3/6] oeqa context.py: use TEST_SUITES if set

Message ID 20250701073359.979368-3-mikko.rapeli@linaro.org
State New
Headers show
Series [v2,1/6] oeqa runtime: set self.runner and handle None | expand

Commit Message

Mikko Rapeli July 1, 2025, 7:33 a.m. UTC
If build target has set TEST_SUITES, then that should
be the default test modules to execute. Fixes testexport.bbclass
to run same tests as testimage.bbclass which already
uses TEST_SUITES.

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 meta/lib/oeqa/core/context.py | 7 +++++++
 1 file changed, 7 insertions(+)

v2: added check for unset TEST_SUITES variable which caused
    failures in autobuilder

v1: https://lists.openembedded.org/g/openembedded-core/message/219380
diff mbox series

Patch

diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index 9313271f5865..46de9135c179 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -179,9 +179,16 @@  class OETestContextExecutor(object):
         else:
             self.tc_kwargs['init']['td'] = {}
 
+        # Run image specific TEST_SUITE like testimage.bbclass by default
+        test_suites = self.tc_kwargs['init']['td'].get("TEST_SUITES")
+        if test_suites:
+            test_suites = test_suites.split()
+
         if args.run_tests:
             self.tc_kwargs['load']['modules'] = args.run_tests
             self.tc_kwargs['load']['modules_required'] = args.run_tests
+        elif test_suites:
+            self.tc_kwargs['load']['modules'] = test_suites
         else:
             self.tc_kwargs['load']['modules'] = []