diff options
Diffstat (limited to 'meta-selftest/lib/oeqa/runtime/cases')
| -rw-r--r-- | meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py | 51 | ||||
| -rw-r--r-- | meta-selftest/lib/oeqa/runtime/cases/selftest.json | 6 | ||||
| -rw-r--r-- | meta-selftest/lib/oeqa/runtime/cases/selftest.py | 31 | ||||
| -rw-r--r-- | meta-selftest/lib/oeqa/runtime/cases/virgl.py | 18 |
4 files changed, 0 insertions, 106 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 @@ | |||
| 1 | from oeqa.core.decorator.depends import OETestDepends | ||
| 2 | from oeqa.runtime.cases.dnf import DnfTest | ||
| 3 | from oeqa.utils.httpserver import HTTPService | ||
| 4 | from oeqa.core.decorator.data import skipIfDataVar | ||
| 5 | |||
| 6 | class 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 @@ | |||
| 1 | from oeqa.runtime.case import OERuntimeTestCase | ||
| 2 | from oeqa.core.decorator.depends import OETestDepends | ||
| 3 | |||
| 4 | class 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 @@ | |||
| 1 | from oeqa.runtime.case import OERuntimeTestCase | ||
| 2 | from oeqa.core.decorator.depends import OETestDepends | ||
| 3 | import subprocess | ||
| 4 | import oe.lsb | ||
| 5 | |||
| 6 | class 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)) | ||
