oeqa/selftest: Add missing IDs to various test cases
PATCH 1/1 oeqa/selftest: Add missing IDs to various test cases
From: Jose Perez Carranza <[email protected]>
Add decorator @OETestID() with Tesopia TC-ID to the test cases that did not have it properly set.
[YOCTO #11873]
--- meta/lib/oeqa/selftest/cases/archiver.py | 3 ++- meta/lib/oeqa/selftest/cases/distrodata.py | 2 ++ meta/lib/oeqa/selftest/cases/imagefeatures.py | 3 +++ meta/lib/oeqa/selftest/cases/runcmd.py | 17 +++++++++++++++++ meta/lib/oeqa/selftest/cases/wic.py | 1 + 5 files changed, 25 insertions(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/archiver.py +2 -1
@@ -40,7 +40,7 @@ class Archiver(OESelftestTestCase): excluded_present = len(glob.glob(src_path + '/%s-*' % exclude_recipe)) self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % exclude_recipe) - + @OETestID(1900) def test_archiver_filters_by_type(self): """ Summary: The archiver is documented to filter on the recipe type.
@@ -73,6 +73,7 @@ class Archiver(OESelftestTestCase): excluded_present = len(glob.glob(src_path_native + '/%s-*' % native_recipe)) self.assertFalse(excluded_present, 'Recipe %s was not excluded.' % native_recipe) + @OETestID(1901) def test_archiver_filters_by_type_and_name(self): """ Summary: Test that the archiver archives by recipe type, taking the
meta/lib/oeqa/selftest/cases/distrodata.py +2 -0
@@ -2,6 +2,7 @@ from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars from oeqa.utils.decorators import testcase from oeqa.utils.ftools import write_file +from oeqa.core.decorator.oeid import OETestID class Distrodata(OESelftestTestCase):
@@ -10,6 +11,7 @@ class Distrodata(OESelftestTestCase): super(Distrodata, cls).setUpClass() cls.exceptions_path = os.path.join(cls.testlayer_path, 'files', 'distrodata', "checkpkg_exceptions") + @OETestID(1902) def test_checkpkg(self): """ Summary: Test that upstream version checks do not regress
meta/lib/oeqa/selftest/cases/imagefeatures.py +3 -0
@@ -131,6 +131,7 @@ class ImageFeatures(OESelftestTestCase): # check if the resulting gzip is valid self.assertTrue(runCmd('gzip -t %s' % gzip_path)) + @OETestID(1903) def test_hypervisor_fmts(self): """ Summary: Check various hypervisor formats
@@ -165,6 +166,7 @@ class ImageFeatures(OESelftestTestCase): native_sysroot=sysroot) self.assertTrue(json.loads(result.output).get('format') == itype) + @OETestID(1905) def test_long_chain_conversion(self): """ Summary: Check for chaining many CONVERSION_CMDs together
@@ -196,6 +198,7 @@ class ImageFeatures(OESelftestTestCase): self.assertTrue(runCmd('cd %s;sha256sum -c %s.%s.sha256sum' % (deploy_dir_image, link_name, conv))) + @OETestID(1904) def test_image_fstypes(self): """ Summary: Check if image of supported image fstypes can be built
meta/lib/oeqa/selftest/cases/runcmd.py +17 -0
@@ -1,6 +1,7 @@ from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import runCmd from oeqa.utils import CommandError +from oeqa.core.decorator.oeid import OETestID import subprocess import threading
@@ -26,49 +27,60 @@ class RunCmdTests(OESelftestTestCase): TIMEOUT = 2 DELTA = 1 + @OETestID(1916) def test_result_okay(self): result = runCmd("true") self.assertEqual(result.status, 0) + @OETestID(1915) def test_result_false(self): result = runCmd("false", ignore_status=True) self.assertEqual(result.status, 1) + @OETestID(1917) def test_shell(self): # A shell is used for all string commands. result = runCmd("false; true", ignore_status=True) self.assertEqual(result.status, 0) + @OETestID(1910) def test_no_shell(self): self.assertRaises(FileNotFoundError, runCmd, "false; true", shell=False) + @OETestID(1906) def test_list_not_found(self): self.assertRaises(FileNotFoundError, runCmd, ["false; true"]) + @OETestID(1907) def test_list_okay(self): result = runCmd(["true"]) self.assertEqual(result.status, 0) + @OETestID(1913) def test_result_assertion(self): self.assertRaisesRegexp(AssertionError, "Command 'echo .* false' returned non-zero exit status 1:\nfoobar", runCmd, "echo foobar >&2; false", shell=True) + @OETestID(1914) def test_result_exception(self): self.assertRaisesRegexp(CommandError, "Command 'echo .* false' returned non-zero exit status 1 with output: foobar", runCmd, "echo foobar >&2; false", shell=True, assert_error=False) + @OETestID(1911) def test_output(self): result = runCmd("echo stdout; echo stderr >&2", shell=True) self.assertEqual("stdout\nstderr", result.output) self.assertEqual("", result.error) + @OETestID(1912) def test_output_split(self): result = runCmd("echo stdout; echo stderr >&2", shell=True, stderr=subprocess.PIPE) self.assertEqual("stdout", result.output) self.assertEqual("stderr", result.error) + @OETestID(1920) def test_timeout(self): numthreads = threading.active_count() start = time.time()
@@ -79,6 +91,7 @@ class RunCmdTests(OESelftestTestCase): self.assertLess(end - start, self.TIMEOUT + self.DELTA) self.assertEqual(numthreads, threading.active_count()) + @OETestID(1921) def test_timeout_split(self): numthreads = threading.active_count() start = time.time()
@@ -89,12 +102,14 @@ class RunCmdTests(OESelftestTestCase): self.assertLess(end - start, self.TIMEOUT + self.DELTA) self.assertEqual(numthreads, threading.active_count()) + @OETestID(1918) def test_stdin(self): numthreads = threading.active_count() result = runCmd("cat", data=b"hello world", timeout=self.TIMEOUT) self.assertEqual("hello world", result.output) self.assertEqual(numthreads, threading.active_count()) + @OETestID(1919) def test_stdin_timeout(self): numthreads = threading.active_count() start = time.time()
@@ -104,12 +119,14 @@ class RunCmdTests(OESelftestTestCase): self.assertLess(end - start, self.TIMEOUT + self.DELTA) self.assertEqual(numthreads, threading.active_count()) + @OETestID(1908) def test_log(self): log = MemLogger() result = runCmd("echo stdout; echo stderr >&2", shell=True, output_log=log) self.assertEqual(["Running: echo stdout; echo stderr >&2", "stdout", "stderr"], log.info_msgs) self.assertEqual([], log.error_msgs) + @OETestID(1909) def test_log_split(self): log = MemLogger() result = runCmd("echo stdout; echo stderr >&2", shell=True, output_log=log, stderr=subprocess.PIPE)
meta/lib/oeqa/selftest/cases/wic.py +1 -0
@@ -920,6 +920,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r self.assertNotIn('\nBZIMAGE ', result.output) self.assertNotIn('\nEFI <DIR> ', result.output) + @OETestID(1922) def test_mkfs_extraopts(self): """Test wks option --mkfs-extraopts for empty and not empty partitions""" img = 'core-image-minimal'
Signature · 1 line
2.12.3
✗ patchtest: failure for oeqa/selftest: Add missing IDs to various test cases
== Series Details ==
Series: oeqa/selftest: Add missing IDs to various test cases
Revision: 1
URL : https://patchwork.openembedded.org/series/8650/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 811edd9542)
If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).
---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe