runtime/cases: Fix case numbers, missing cases and unused classes
PATCH 1/4 runtime/cases: Fix case numbers, missing cases and unused classes
From: Mariano Lopez <[email protected]>
gcc: Removed unneded lines.
multilib: fixed case number.
syslog: added a missing test.
[YOCTO #10964]
--- meta/lib/oeqa/runtime/cases/gcc.py | 3 --- meta/lib/oeqa/runtime/cases/multilib.py | 2 +- meta/lib/oeqa/runtime/cases/syslog.py | 9 +++++++++ 3 files changed, 10 insertions(+), 4 deletions(-)
meta/lib/oeqa/runtime/cases/gcc.py +0 -3
@@ -11,15 +11,12 @@ class GccCompileTest(OERuntimeTestCase): def setUpClass(cls): dst = '/tmp/' src = os.path.join(cls.tc.files_dir, 'test.c') - #dst = '/tmp/test.c' cls.tc.target.copyTo(src, dst) src = os.path.join(cls.tc.runtime_files_dir, 'testmakefile') - #dst = '/tmp/testmakefile' cls.tc.target.copyTo(src, dst) src = os.path.join(cls.tc.files_dir, 'test.cpp') - #dst = '/tmp/test.cpp' cls.tc.target.copyTo(src, dst) @classmethod
meta/lib/oeqa/runtime/cases/multilib.py +1 -1
@@ -23,9 +23,9 @@ class MultilibTest(OERuntimeTestCase): msg = "%s isn't %s (is %s)" % (binary, arch, theclass) self.assertEqual(theclass, arch, msg=msg) + @OETestID(1593) @skipIfNotInDataVar('MULTILIBS', 'multilib:lib32', "This isn't a multilib:lib32 image") - @OETestID(201) @OETestDepends(['ssh.SSHTest.test_ssh']) def test_check_multilib_libc(self): """
meta/lib/oeqa/runtime/cases/syslog.py +9 -0
@@ -34,6 +34,15 @@ class SyslogTestConfig(OERuntimeTestCase): ' Output: %s ' % output) self.assertEqual(status, 0, msg=msg) + @OETestID(1150) + @OETestDepends(['syslog.SyslogTest.test_syslog_running']) + def test_syslog_restart(self): + if "systemd" != self.tc.td.get("VIRTUAL-RUNTIME_init_manager", ""): + (_, _) = self.target.run('/etc/init.d/syslog restart') + else: + (_, _) = self.target.run('systemctl restart syslog.service') + + @OETestID(202) @OETestDepends(['syslog.SyslogTestConfig.test_syslog_logger']) @OEHasPackage(["!sysklogd", "busybox"])
Signature · 1 line
2.1.4
PATCH 2/4 testimage.bbclass: Add missing suites on some sato images, dependency of createrepo and DL_DIR update
From: Mariano Lopez <[email protected]>
There are some missing suites on sato-sdk and lsb-sdk images so add it.
The createrepo-native needs to be built before run testimage in order to create a repository from install packages.
The DL_DIR data also needs to be updated from the current bitbake environment instead of use the value from testdata file.
[YOCTO #10964]
--- meta/classes/testimage.bbclass | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
meta/classes/testimage.bbclass +5 -4
@@ -49,11 +49,11 @@ DEFAULT_TEST_SUITES_pn-core-image-x11 = "${MINTESTSUITE}" DEFAULT_TEST_SUITES_pn-core-image-lsb = "${NETTESTSUITE} pam parselogs ${RPMTESTSUITE}" DEFAULT_TEST_SUITES_pn-core-image-sato = "${NETTESTSUITE} connman xorg parselogs ${RPMTESTSUITE} \ ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python', '', d)}" -DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "${NETTESTSUITE} connman xorg perl python \ - ${DEVTESTSUITE} parselogs ${RPMTESTSUITE}" +DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "${NETTESTSUITE} buildcvs buildiptables buildgalculator \ + connman ${DEVTESTSUITE} logrotate perl parselogs python ${RPMTESTSUITE} xorg" DEFAULT_TEST_SUITES_pn-core-image-lsb-dev = "${NETTESTSUITE} pam perl python parselogs ${RPMTESTSUITE}" DEFAULT_TEST_SUITES_pn-core-image-lsb-sdk = "${NETTESTSUITE} buildcvs buildiptables buildgalculator \ - connman ${DEVTESTSUITE} pam perl python parselogs ${RPMTESTSUITE}" + connman ${DEVTESTSUITE} logrotate pam parselogs perl python ${RPMTESTSUITE}" DEFAULT_TEST_SUITES_pn-meta-toolchain = "auto" # aarch64 has no graphics
@@ -79,13 +79,14 @@ TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python-smartp TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 'opkg-utils-native:do_populate_sysroot', '', d)}" TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'deb', 'apt-native:do_populate_sysroot', '', d)}" TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python-smartpm-native:do_populate_sysroot', '', d)}" +TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'createrepo-native:do_populate_sysroot', '', d)}" TESTIMAGELOCK = "${TMPDIR}/testimage.lock" TESTIMAGELOCK_qemuall = "" TESTIMAGE_DUMP_DIR ?= "/tmp/oe-saved-tests/" -TESTIMAGE_UPDATE_VARS ?= "WORKDIR DEPLOY_DIR" +TESTIMAGE_UPDATE_VARS ?= "DL_DIR WORKDIR DEPLOY_DIR" testimage_dump_target () { top -bn1
Signature · 1 line
2.1.4
PATCH 3/4 oeqa/core/context.py: Add validation for run-tests option
In reply to Aníbal LimónThe run-tests option is optional so if isn't specified set to None instead of crash on split().
--- meta/lib/oeqa/core/context.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta/lib/oeqa/core/context.py +5 -1
@@ -215,7 +215,11 @@ class OETestContextExecutor(object): else: self.tc_kwargs['init']['td'] = {} - self.tc_kwargs['load']['modules'] = args.run_tests.split() + + if args.run_tests: + self.tc_kwargs['load']['modules'] = args.run_tests.split() + else: + self.tc_kwargs['load']['modules'] = None self.module_paths = args.CASES_PATHS
Signature · 1 line
2.1.4
PATCH 4/4 oeqa/runtime/cases: Rename syslog module to oe_syslog
In reply to Aníbal LimónDebian based distros has a builtin syslog module so when try to load tests using unittest it references the builtin module instead of runtime/cases.
[YOCTO #10964]
---
meta/classes/testimage.bbclass | 2 +-
meta/lib/oeqa/runtime/cases/{syslog.py => oe_syslog.py} | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
rename meta/lib/oeqa/runtime/cases/{syslog.py => oe_syslog.py} (92%)meta/classes/testimage.bbclass +1 -1
@@ -38,7 +38,7 @@ TEST_PACKAGED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/packaged" RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'smart rpm', '', d)}" SYSTEMDSUITE = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" MINTESTSUITE = "ping" -NETTESTSUITE = "${MINTESTSUITE} ssh df date scp syslog ${SYSTEMDSUITE}" +NETTESTSUITE = "${MINTESTSUITE} ssh df date scp oe_syslog ${SYSTEMDSUITE}" DEVTESTSUITE = "gcc kernelmodule ldd" DEFAULT_TEST_SUITES = "${MINTESTSUITE} auto"
meta/lib/oeqa/runtime/cases/oe_syslog.py renamed from meta/lib/oeqa/runtime/cases/syslog.py +3 -3
@@ -18,7 +18,7 @@ class SyslogTest(OERuntimeTestCase): class SyslogTestConfig(OERuntimeTestCase): @OETestID(1149) - @OETestDepends(['syslog.SyslogTest.test_syslog_running']) + @OETestDepends(['oe_syslog.SyslogTest.test_syslog_running']) def test_syslog_logger(self): status, output = self.target.run('logger foobar') msg = "Can't log into syslog. Output: %s " % output
@@ -35,7 +35,7 @@ class SyslogTestConfig(OERuntimeTestCase): self.assertEqual(status, 0, msg=msg) @OETestID(1150) - @OETestDepends(['syslog.SyslogTest.test_syslog_running']) + @OETestDepends(['oe_syslog.SyslogTest.test_syslog_running']) def test_syslog_restart(self): if "systemd" != self.tc.td.get("VIRTUAL-RUNTIME_init_manager", ""): (_, _) = self.target.run('/etc/init.d/syslog restart')
@@ -44,7 +44,7 @@ class SyslogTestConfig(OERuntimeTestCase): @OETestID(202) - @OETestDepends(['syslog.SyslogTestConfig.test_syslog_logger']) + @OETestDepends(['oe_syslog.SyslogTestConfig.test_syslog_logger']) @OEHasPackage(["!sysklogd", "busybox"]) @skipIfDataVar('VIRTUAL-RUNTIME_init_manager', 'systemd', 'Not appropiate for systemd image')
Signature · 1 line
2.1.4
✗ patchtest: failure for "runtime/cases: Fix case number..." and 3 more
In reply to Aníbal Limón== Series Details ==
Series: "runtime/cases: Fix case number..." and 3 more
Revision: 1
URL : https://patchwork.openembedded.org/series/5081/
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:
* Patch [2/4] testimage.bbclass: Add missing suites on some sato images, dependency of createrepo and DL_DIR update Issue Commit shortlog is too long [test_shortlog_length] Suggested fix Edit shortlog so that it is 90 characters or less (currently 101 characters)
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