* [PATCHv2 1/4] runtime/cases: Fix case numbers, missing cases and unused classes
@ 2017-01-31 21:05 Aníbal Limón
2017-01-31 21:05 ` [PATCHv2 2/4] testimage.bbclass: Fixes about suites and dependencies Aníbal Limón
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Aníbal Limón @ 2017-01-31 21:05 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
gcc: Removed unneded lines.
multilib: fixed case number.
syslog: added a missing test.
[YOCTO #10964]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
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(-)
diff --git a/meta/lib/oeqa/runtime/cases/gcc.py b/meta/lib/oeqa/runtime/cases/gcc.py
index 064fa49..9110831 100644
--- a/meta/lib/oeqa/runtime/cases/gcc.py
+++ b/meta/lib/oeqa/runtime/cases/gcc.py
@@ -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
diff --git a/meta/lib/oeqa/runtime/cases/multilib.py b/meta/lib/oeqa/runtime/cases/multilib.py
index 8f6d2b2..8c167f1 100644
--- a/meta/lib/oeqa/runtime/cases/multilib.py
+++ b/meta/lib/oeqa/runtime/cases/multilib.py
@@ -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):
"""
diff --git a/meta/lib/oeqa/runtime/cases/syslog.py b/meta/lib/oeqa/runtime/cases/syslog.py
index 1016e67..537c519 100644
--- a/meta/lib/oeqa/runtime/cases/syslog.py
+++ b/meta/lib/oeqa/runtime/cases/syslog.py
@@ -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"])
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCHv2 2/4] testimage.bbclass: Fixes about suites and dependencies
2017-01-31 21:05 [PATCHv2 1/4] runtime/cases: Fix case numbers, missing cases and unused classes Aníbal Limón
@ 2017-01-31 21:05 ` Aníbal Limón
2017-01-31 21:05 ` [PATCHv2 3/4] oeqa/core/context.py: Add validation for run-tests option Aníbal Limón
2017-01-31 21:05 ` [PATCHv2 4/4] oeqa/runtime/cases: Rename syslog module to oe_syslog Aníbal Limón
2 siblings, 0 replies; 4+ messages in thread
From: Aníbal Limón @ 2017-01-31 21:05 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
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]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
meta/classes/testimage.bbclass | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 47bccbc..7495fe1 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -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
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCHv2 3/4] oeqa/core/context.py: Add validation for run-tests option
2017-01-31 21:05 [PATCHv2 1/4] runtime/cases: Fix case numbers, missing cases and unused classes Aníbal Limón
2017-01-31 21:05 ` [PATCHv2 2/4] testimage.bbclass: Fixes about suites and dependencies Aníbal Limón
@ 2017-01-31 21:05 ` Aníbal Limón
2017-01-31 21:05 ` [PATCHv2 4/4] oeqa/runtime/cases: Rename syslog module to oe_syslog Aníbal Limón
2 siblings, 0 replies; 4+ messages in thread
From: Aníbal Limón @ 2017-01-31 21:05 UTC (permalink / raw)
To: openembedded-core
The run-tests option is optional so if isn't specified set
to None instead of crash on split().
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
meta/lib/oeqa/core/context.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index efed4e6..4476750 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -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
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCHv2 4/4] oeqa/runtime/cases: Rename syslog module to oe_syslog
2017-01-31 21:05 [PATCHv2 1/4] runtime/cases: Fix case numbers, missing cases and unused classes Aníbal Limón
2017-01-31 21:05 ` [PATCHv2 2/4] testimage.bbclass: Fixes about suites and dependencies Aníbal Limón
2017-01-31 21:05 ` [PATCHv2 3/4] oeqa/core/context.py: Add validation for run-tests option Aníbal Limón
@ 2017-01-31 21:05 ` Aníbal Limón
2 siblings, 0 replies; 4+ messages in thread
From: Aníbal Limón @ 2017-01-31 21:05 UTC (permalink / raw)
To: openembedded-core
Debian 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]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
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%)
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 7495fe1..c6e4cec 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -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"
diff --git a/meta/lib/oeqa/runtime/cases/syslog.py b/meta/lib/oeqa/runtime/cases/oe_syslog.py
similarity index 92%
rename from meta/lib/oeqa/runtime/cases/syslog.py
rename to meta/lib/oeqa/runtime/cases/oe_syslog.py
index 537c519..005b697 100644
--- a/meta/lib/oeqa/runtime/cases/syslog.py
+++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py
@@ -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')
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-31 21:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-31 21:05 [PATCHv2 1/4] runtime/cases: Fix case numbers, missing cases and unused classes Aníbal Limón
2017-01-31 21:05 ` [PATCHv2 2/4] testimage.bbclass: Fixes about suites and dependencies Aníbal Limón
2017-01-31 21:05 ` [PATCHv2 3/4] oeqa/core/context.py: Add validation for run-tests option Aníbal Limón
2017-01-31 21:05 ` [PATCHv2 4/4] oeqa/runtime/cases: Rename syslog module to oe_syslog Aníbal Limón
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox