summaryrefslogtreecommitdiffstats
path: root/meta-selftest/lib/oeqa
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:31:53 +0000
commit8c22ff0d8b70d9b12f0487ef696a7e915b9e3173 (patch)
treeefdc32587159d0050a69009bdf2330a531727d95 /meta-selftest/lib/oeqa
parentd412d2747595c1cc4a5e3ca975e3adc31b2f7891 (diff)
downloadpoky-8c22ff0d8b70d9b12f0487ef696a7e915b9e3173.tar.gz
The poky repository master branch is no longer being updated.
You can either: a) switch to individual clones of bitbake, openembedded-core, meta-yocto and yocto-docs b) use the new bitbake-setup You can find information about either approach in our documentation: https://docs.yoctoproject.org/ Note that "poky" the distro setting is still available in meta-yocto as before and we continue to use and maintain that. Long live Poky! Some further information on the background of this change can be found in: https://lists.openembedded.org/g/openembedded-architecture/message/2179 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest/lib/oeqa')
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py51
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/selftest.json6
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/selftest.py31
-rw-r--r--meta-selftest/lib/oeqa/runtime/cases/virgl.py18
-rw-r--r--meta-selftest/lib/oeqa/selftest/cases/external-layer.py16
5 files changed, 0 insertions, 122 deletions
diff --git a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
deleted file mode 100644
index d2f0f88f7d..0000000000
--- a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py
+++ /dev/null
@@ -1,51 +0,0 @@
1from oeqa.core.decorator.depends import OETestDepends
2from oeqa.runtime.cases.dnf import DnfTest
3from oeqa.utils.httpserver import HTTPService
4from oeqa.core.decorator.data import skipIfDataVar
5
6class DnfSelftest(DnfTest):
7
8 @classmethod
9 def setUpClass(cls):
10 import tempfile
11 cls.temp_dir = tempfile.TemporaryDirectory(prefix="oeqa-remotefeeds-")
12 cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-rootfs-repo'),
13 '0.0.0.0', port=cls.tc.target.server_port,
14 logger=cls.tc.logger)
15 cls.repo_server.start()
16
17 @classmethod
18 def tearDownClass(cls):
19 cls.repo_server.stop()
20 cls.temp_dir.cleanup()
21
22 @OETestDepends(['dnf.DnfBasicTest.test_dnf_help'])
23 @skipIfDataVar('PACKAGE_FEED_URIS', None,
24 'Not suitable as PACKAGE_FEED_URIS is not set')
25 def test_verify_package_feeds(self):
26 """
27 Summary: Check correct setting of PACKAGE_FEED_URIS var
28 Expected: 1. Feeds were correctly set for dnf
29 2. Update recovers packages from host's repo
30 Author: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
31 Author: Alexander Kanavin <alex.kanavin@gmail.com>
32 """
33 # When we created an image, we had to supply fake ip and port
34 # for the feeds. Now we can patch the real ones into the config file.
35 temp_file = os.path.join(self.temp_dir.name, 'tmp.repo')
36 self.tc.target.copyFrom("/etc/yum.repos.d/oe-remote-repo.repo", temp_file)
37 fixed_config = open(temp_file, "r").read().replace("bogus_ip", self.tc.target.server_ip).replace("bogus_port", str(self.repo_server.port))
38 with open(temp_file, "w") as f:
39 f.write(fixed_config)
40 self.tc.target.copyTo(temp_file, "/etc/yum.repos.d/oe-remote-repo.repo")
41
42 import re
43 # Use '-y' for non-interactive mode: automatically import the feed signing key
44 output_makecache = self.dnf('-vy makecache')
45 self.assertTrue(re.match(r".*Failed to synchronize cache", output_makecache, re.DOTALL) is None, msg = "dnf makecache failed to synchronize repo: %s" %(output_makecache))
46 self.assertTrue(re.match(r".*Metadata cache created", output_makecache, re.DOTALL) is not None, msg = "dnf makecache failed: %s" %(output_makecache))
47
48 output_repoinfo = self.dnf('-v repoinfo')
49 matchobj = re.match(r".*Repo-pkgs\s*:\s*(?P<n_pkgs>[0-9]+)", output_repoinfo, re.DOTALL)
50 self.assertTrue(matchobj is not None, msg = "Could not find the amount of packages in dnf repoinfo output: %s" %(output_repoinfo))
51 self.assertTrue(int(matchobj.group('n_pkgs')) > 0, msg = "Amount of remote packages is not more than zero: %s\n" %(output_repoinfo))
diff --git a/meta-selftest/lib/oeqa/runtime/cases/selftest.json b/meta-selftest/lib/oeqa/runtime/cases/selftest.json
deleted file mode 100644
index e5ae46ecd4..0000000000
--- a/meta-selftest/lib/oeqa/runtime/cases/selftest.json
+++ /dev/null
@@ -1,6 +0,0 @@
1{
2 "test_install_package": {
3 "pkg": "socat",
4 "rm": true
5 }
6}
diff --git a/meta-selftest/lib/oeqa/runtime/cases/selftest.py b/meta-selftest/lib/oeqa/runtime/cases/selftest.py
deleted file mode 100644
index 19de740623..0000000000
--- a/meta-selftest/lib/oeqa/runtime/cases/selftest.py
+++ /dev/null
@@ -1,31 +0,0 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.core.decorator.depends import OETestDepends
3
4class Selftest(OERuntimeTestCase):
5
6 @OETestDepends(['ssh.SSHTest.test_ssh'])
7 def test_install_package(self):
8 """
9 Summary: Check basic package installation functionality.
10 Expected: 1. Before the test socat must be installed using scp.
11 2. After the test socat must be uninstalled using ssh.
12 This can't be checked in this test.
13 Product: oe-core
14 Author: Mariano Lopez <mariano.lopez@intel.com>
15 """
16
17 (status, output) = self.target.run("socat -V")
18 self.assertEqual(status, 0, msg="socat is not installed")
19
20 @OETestDepends(['selftest.Selftest.test_install_package'])
21 def test_verify_uninstall(self):
22 """
23 Summary: Check basic package installation functionality.
24 Expected: 1. test_install_package must uninstall socat.
25 This test is just to verify that.
26 Product: oe-core
27 Author: Mariano Lopez <mariano.lopez@intel.com>
28 """
29
30 (status, output) = self.target.run("socat -V")
31 self.assertNotEqual(status, 0, msg="socat is still installed")
diff --git a/meta-selftest/lib/oeqa/runtime/cases/virgl.py b/meta-selftest/lib/oeqa/runtime/cases/virgl.py
deleted file mode 100644
index f19cdee9f0..0000000000
--- a/meta-selftest/lib/oeqa/runtime/cases/virgl.py
+++ /dev/null
@@ -1,18 +0,0 @@
1from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.core.decorator.depends import OETestDepends
3import subprocess
4import oe.lsb
5
6class VirglTest(OERuntimeTestCase):
7
8 @OETestDepends(['ssh.SSHTest.test_ssh'])
9 def test_kernel_driver(self):
10 status, output = self.target.run('dmesg|grep virgl')
11 self.assertEqual(status, 0, "Checking for virgl driver in dmesg returned non-zero: %d\n%s" % (status, output))
12 self.assertIn("features: +virgl", output, "virgl acceleration seems to be disabled:\n%s" %(output))
13
14 @OETestDepends(['virgl.VirglTest.test_kernel_driver'])
15 def test_kmscube(self):
16 status, output = self.target.run('kmscube')
17 self.assertEqual(status, 0, "kmscube exited with non-zero status %d and output:\n%s" %(status, output))
18 self.assertIn('renderer: "virgl', output, "kmscube does not seem to use virgl:\n%s" %(output))
diff --git a/meta-selftest/lib/oeqa/selftest/cases/external-layer.py b/meta-selftest/lib/oeqa/selftest/cases/external-layer.py
deleted file mode 100644
index 59b1afab7d..0000000000
--- a/meta-selftest/lib/oeqa/selftest/cases/external-layer.py
+++ /dev/null
@@ -1,16 +0,0 @@
1#from oeqa.selftest.base import oeSelfTest
2from oeqa.selftest.case import OESelftestTestCase
3#from oeqa.utils.decorators import testcase
4
5
6class ImportedTests(OESelftestTestCase):
7
8 def test_unconditional_pass(self):
9 """
10 Summary: Doesn't check anything, used to check import test from other layers.
11 Expected: 1. Pass unconditionally
12 Product: oe-core
13 Author: Mariano Lopez <mariano.lopez@intel.com
14 """
15
16 self.assertEqual(True, True, msg = "Impossible to fail this test")