Skip to contentSkip to conversation

arm/oeqa/selftest: tag all tests with "meta-arm"

PATCH Applied [email protected] 2 participants 4 messages Oct 13, 2023 – Oct 17, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 arm/oeqa/selftest: tag all tests with "meta-arm"

From: Ross Burton <[email protected]>

Tag all of the tests in meta-arm so that they can be selectively ran without needing to explicitly list them.

---
 meta-arm/lib/oeqa/selftest/cases/runfvp.py | 4 ++++
 1 file changed, 4 insertions(+)
meta-arm/lib/oeqa/selftest/cases/runfvp.py +4 -0
index d60aa3c4..61ce2ab9 100644
@@ -7,10 +7,12 @@ import tempfile
 import unittest.mock
 
 from oeqa.selftest.case import OESelftestTestCase
+from oeqa.core.decorator import OETestTag
 
 runfvp = pathlib.Path(__file__).parents[5] / "scripts" / "runfvp"
 testdir = pathlib.Path(__file__).parent / "tests"
 
+@OETestTag("meta-arm")
 class RunFVPTests(OESelftestTestCase):
     def setUpLocal(self):
         self.assertTrue(runfvp.exists())
@@ -51,6 +53,7 @@ class RunFVPTests(OESelftestTestCase):
         # test-parameter sets one argument, add another manually
         self.run_fvp(testdir / "test-parameter.json", "--", "--parameter", "board.dog=woof")
 
+@OETestTag("meta-arm")
 class ConfFileTests(OESelftestTestCase):
     def test_no_exe(self):
         from fvp import conffile
@@ -80,6 +83,7 @@ class ConfFileTests(OESelftestTestCase):
             self.assertTrue("env" in conf)
 
 
+@OETestTag("meta-arm")
 class RunnerTests(OESelftestTestCase):
     def create_mock(self):
         return unittest.mock.patch("subprocess.Popen")
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/3 CI: don't hardcode the selftest tests to run

From: Ross Burton <[email protected]>

Just execute all tests with the meta-arm tag, instead of hardcoding the list of tests.

Also run two tests in parallel as there's no reason to limit it to one.

---
 .gitlab-ci.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.yml +1 -1
index 0466c096..e1845be5 100644
@@ -234,7 +234,7 @@ selftest:
   extends: .setup
   script:
     - KASFILES=./ci/qemuarm64.yml:./ci/selftest.yml:lockfile.yml
-    - kas shell --update --force-checkout $KASFILES -c 'oe-selftest --num-processes 1 --run-tests runfvp'
+    - kas shell --update --force-checkout $KASFILES -c 'oe-selftest --num-processes 2 --select-tag meta-arm --run-all-tests'
 
 # Validate layers are Yocto Project Compatible
 check-layers:
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/3 CI: also run the _qemutiny testcase for poky-tiny

In reply to [email protected]

From: Ross Burton <[email protected]>

The terribly named qemutiny test case tries to login to the target over the serial console. It's designed for poky-tiny, so add it to the tests we run in poky-tiny builds.

---
 ci/poky-tiny.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ci/poky-tiny.yml +1 -1
index d869c557..f1763010 100644
@@ -5,7 +5,7 @@ distro: poky-tiny
 
 local_conf_header:
   hacking: |
-    TEST_SUITES = "ping"
+    TEST_SUITES = "_qemutiny ping"
   extrapackages: |
     # Intentionally blank to prevent perf from being added to the image in base.yml
 
Signature · 1 line
2.34.1
Applied
#3 lore raw
In reply to [email protected]
Quoted 4 lines · On Fri, 13 Oct 2023 17:52:03 +0100, [email protected] wrote:

Tag all of the tests in meta-arm so that they can be selectively ran without needing to explicitly list them.

Applied, thanks!

[1/3] arm/oeqa/selftest: tag all tests with "meta-arm"

      commit: cadb42a66c8879fa30db84156e94d10cf1ea63e0
[2/3] CI: don't hardcode the selftest tests to run
      commit: 19d2d8a484d55805704aad1b76cfc36ad4bc9032
[3/3] CI: also run the _qemutiny testcase for poky-tiny
      commit: ebe4d2437ce56fce42821170c1557440cf0aa617

Best regards,

Signature · 1 line
Jon Mason <[email protected]>