* [PATCH 0/3] Fix bugs found within runtime testing
@ 2017-01-25 12:20 mariano.lopez
2017-01-25 12:20 ` [PATCH 1/3] runtime/cases/connman.py: Stop using oeRuntimeTest mariano.lopez
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: mariano.lopez @ 2017-01-25 12:20 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
This will fix some bugs found in testimage when executing tests
from images downloaded from the autobuilders.
The following changes since commit aa7e2717d33c2d754ec486e9148f446c1d6a3b14:
ref-manual: remove core-image-directfb reference (2017-01-25 12:07:43 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib mariano/bug10964
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/bug10964
Mariano Lopez (3):
runtime/cases/connman.py: Stop using oeRuntimeTest
runtime/cases/smart.py: Check for IMAGE_PKGTYPE instead of
PACKAGE_CLASSES
testimage.bbclass: Allow to run tests on autobuilder's images
meta/classes/testimage.bbclass | 11 +++++++----
meta/lib/oeqa/core/utils/misc.py | 7 +++++++
meta/lib/oeqa/runtime/cases/connman.py | 2 +-
meta/lib/oeqa/runtime/cases/smart.py | 2 +-
4 files changed, 16 insertions(+), 6 deletions(-)
--
2.6.6
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] runtime/cases/connman.py: Stop using oeRuntimeTest
2017-01-25 12:20 [PATCH 0/3] Fix bugs found within runtime testing mariano.lopez
@ 2017-01-25 12:20 ` mariano.lopez
2017-01-25 12:20 ` [PATCH 2/3] runtime/cases/smart.py: Check for IMAGE_PKGTYPE instead of PACKAGE_CLASSES mariano.lopez
2017-01-25 12:20 ` [PATCH 3/3] testimage.bbclass: Allow to run tests on autobuilder's images mariano.lopez
2 siblings, 0 replies; 4+ messages in thread
From: mariano.lopez @ 2017-01-25 12:20 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
oeRuntimeTest class is not used anymore as part of runtime
migration, this particular case was missed, so fix it.
[YOCTO #10964]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
meta/lib/oeqa/runtime/cases/connman.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/runtime/cases/connman.py b/meta/lib/oeqa/runtime/cases/connman.py
index 8b47108..12456b4 100644
--- a/meta/lib/oeqa/runtime/cases/connman.py
+++ b/meta/lib/oeqa/runtime/cases/connman.py
@@ -6,7 +6,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
class ConnmanTest(OERuntimeTestCase):
def service_status(self, service):
- if oeRuntimeTest.hasFeature("systemd"):
+ if 'systemd' in self.tc.td['DISTRO_FEATURES']:
(_, output) = self.target.run('systemctl status -l %s' % service)
return output
else:
--
2.6.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] runtime/cases/smart.py: Check for IMAGE_PKGTYPE instead of PACKAGE_CLASSES
2017-01-25 12:20 [PATCH 0/3] Fix bugs found within runtime testing mariano.lopez
2017-01-25 12:20 ` [PATCH 1/3] runtime/cases/connman.py: Stop using oeRuntimeTest mariano.lopez
@ 2017-01-25 12:20 ` mariano.lopez
2017-01-25 12:20 ` [PATCH 3/3] testimage.bbclass: Allow to run tests on autobuilder's images mariano.lopez
2 siblings, 0 replies; 4+ messages in thread
From: mariano.lopez @ 2017-01-25 12:20 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
smart test requires to build the image using rpm packages, this check was
included, but it checked for PACKAGE_CLASSES=='package_rpm', and this is
not true when building packages for rpm and deb/ipk. So this would check
IMAGE_PKGTYPE instead.
[YOCTO #10964]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
meta/lib/oeqa/runtime/cases/smart.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/runtime/cases/smart.py b/meta/lib/oeqa/runtime/cases/smart.py
index 9b4d0d2..79bd9c8 100644
--- a/meta/lib/oeqa/runtime/cases/smart.py
+++ b/meta/lib/oeqa/runtime/cases/smart.py
@@ -23,7 +23,7 @@ class SmartBasicTest(SmartTest):
@skipIfNotFeature('package-management',
'Test requires package-management to be in IMAGE_FEATURES')
- @skipIfNotDataVar('PACKAGE_CLASSES', 'package_rpm',
+ @skipIfNotDataVar('IMAGE_PKGTYPE', 'rpm',
'RPM is not the primary package manager')
@OEHasPackage(['smartpm'])
@OETestID(716)
--
2.6.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] testimage.bbclass: Allow to run tests on autobuilder's images
2017-01-25 12:20 [PATCH 0/3] Fix bugs found within runtime testing mariano.lopez
2017-01-25 12:20 ` [PATCH 1/3] runtime/cases/connman.py: Stop using oeRuntimeTest mariano.lopez
2017-01-25 12:20 ` [PATCH 2/3] runtime/cases/smart.py: Check for IMAGE_PKGTYPE instead of PACKAGE_CLASSES mariano.lopez
@ 2017-01-25 12:20 ` mariano.lopez
2 siblings, 0 replies; 4+ messages in thread
From: mariano.lopez @ 2017-01-25 12:20 UTC (permalink / raw)
To: openembedded-core
From: Mariano Lopez <mariano.lopez@linux.intel.com>
With the change to the new framework data store dependecy was
removed, instead a new file is generated and used in testimage.
When testing builds from the autobuilders the test data values
are from the autobuilder, including the paths.
Some tests require paths to current environment in order to run,
this commit will update such paths and fix the error of running
images donwloaded from autobuilders.
[YOCTO #10964]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
---
meta/classes/testimage.bbclass | 11 +++++++----
meta/lib/oeqa/core/utils/misc.py | 7 +++++++
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 96e41c6..d65ac52 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -79,12 +79,13 @@ TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 'opkg-utils-na
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)}"
-
TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
TESTIMAGELOCK_qemuall = ""
TESTIMAGE_DUMP_DIR ?= "/tmp/oe-saved-tests/"
+TESTIMAGE_UPDATE_VARS ?= "WORKDIR DEPLOY_DIR"
+
testimage_dump_target () {
top -bn1
ps
@@ -137,13 +138,12 @@ def testimage_sanity(d):
def testimage_main(d):
import os
- import signal
import json
- import sys
+ import signal
import logging
- import time
from bb.utils import export_proxies
+ from oeqa.core.utils.misc import updateTestData
from oeqa.runtime.context import OERuntimeTestContext
from oeqa.runtime.context import OERuntimeTestContextExecutor
from oeqa.core.target.qemu import supported_fstypes
@@ -165,6 +165,9 @@ def testimage_main(d):
tdname = "%s.testdata.json" % image_name
td = json.load(open(tdname, "r"))
+ # Some variables need to be updates (mostly paths) with the
+ # ones of the current environment because some tests require them.
+ updateTestData(d, td, d.getVar('TESTIMAGE_UPDATE_VARS').split())
image_manifest = "%s.manifest" % image_name
image_packages = OERuntimeTestContextExecutor.readPackagesManifest(image_manifest)
diff --git a/meta/lib/oeqa/core/utils/misc.py b/meta/lib/oeqa/core/utils/misc.py
index 6ae58ad..d1eec13 100644
--- a/meta/lib/oeqa/core/utils/misc.py
+++ b/meta/lib/oeqa/core/utils/misc.py
@@ -35,3 +35,10 @@ def dataStoteToDict(d, variables):
data[v] = d.getVar(v, True)
return data
+
+def updateTestData(d, td, variables):
+ """
+ Updates variables with values of data store to test data.
+ """
+ for var in variables:
+ td[var] = d.getVar(var)
--
2.6.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-25 20:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-25 12:20 [PATCH 0/3] Fix bugs found within runtime testing mariano.lopez
2017-01-25 12:20 ` [PATCH 1/3] runtime/cases/connman.py: Stop using oeRuntimeTest mariano.lopez
2017-01-25 12:20 ` [PATCH 2/3] runtime/cases/smart.py: Check for IMAGE_PKGTYPE instead of PACKAGE_CLASSES mariano.lopez
2017-01-25 12:20 ` [PATCH 3/3] testimage.bbclass: Allow to run tests on autobuilder's images mariano.lopez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox