Re: [OE-core] [PATCH 4/5] runqemu: validate combos

2017-07-17 Thread Robert Yang



On 07/18/2017 11:21 AM, Robert Yang wrote:

Error out ealier if the combos is invalid, e.g.:
$ runqemu tmp/deploy/images/qemux86/bzImage-qemux86.bin 
tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic

This will fail at kernel panic, no we check and error out early. We can
add other checkings in the future.

[YOCTO #11286]

Signed-off-by: Robert Yang 
---
 scripts/runqemu | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/scripts/runqemu b/scripts/runqemu
index bdb559f82ff..e9ed890bb27 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1209,6 +1209,10 @@ class BaseConfig(object):
 self.bitbake_e = ''
 logger.warn("Couldn't run 'bitbake -e' to gather environment 
information:\n%s" % err.output.decode('utf-8'))

+def validate_combos(self):
+if (self.fstype in self.vmtypes) and self.kernel:
+raise Exception("%s doesn't need kernel %s!" % (self.fstype, 
self.kernel))


I just found that here should be raise RunQemuError(), updated it in the repo.

// Robert


+
 @property
 def bindir_native(self):
 result = self.get('STAGING_BINDIR_NATIVE')
@@ -1240,6 +1244,8 @@ def main():
 config.check_args()
 config.read_qemuboot()
 config.check_and_set()
+# Check whether the combos is valid or not
+config.validate_combos()
 config.print_config()
 config.setup_network()
 config.setup_rootfs()


--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/5] runqemu: check qbconfload before running bitbake

2017-07-17 Thread Robert Yang
If qbconfload (.qemuboot.conf is found) is present, we can get
DEPLOY_DIR_IMAGE from it rather than "bitbake -e".

Signed-off-by: Robert Yang 
---
 scripts/runqemu | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 7188bd78830..781814ae651 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -466,7 +466,7 @@ class BaseConfig(object):
 
 self.check_arg_machine(unknown_arg)
 
-if not self.get('DEPLOY_DIR_IMAGE'):
+if not (self.get('DEPLOY_DIR_IMAGE') or self.qbconfload):
 self.load_bitbake_env()
 s = re.search('^DEPLOY_DIR_IMAGE="(.*)"', self.bitbake_e, re.M)
 if s:
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/5] runqemu: add --debug and --quiet

2017-07-17 Thread Robert Yang
And move some debug info into logger.debug(), this can make it easy to
read key messages like errors or warnings.

I checked meta/lib/oeqa/ they don't depend on these messages. And I have
run "oe-selftest -a", it doesn't break anything.

[YOCTO #10474]

Signed-off-by: Robert Yang 
---
 scripts/runqemu | 50 +++---
 1 file changed, 31 insertions(+), 19 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index d44afc7e7a1..7188bd78830 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -48,7 +48,7 @@ def create_logger():
 
 # create console handler and set level to debug
 ch = logging.StreamHandler()
-ch.setLevel(logging.INFO)
+ch.setLevel(logging.DEBUG)
 
 # create formatter
 formatter = logging.Formatter('%(name)s - %(levelname)s - %(message)s')
@@ -85,6 +85,8 @@ of the following environment variables (in any order):
   qemuparams= - specify custom parameters to QEMU
   bootparams= - specify custom kernel parameters during boot
   help, -h, --help: print this text
+  -d, --debug: Enable debug output
+  -q, --quite: Hide most output except error messages
 
 Examples:
   runqemu
@@ -112,7 +114,7 @@ def check_tun():
 
 def check_libgl(qemu_bin):
 cmd = 'ldd %s' % qemu_bin
-logger.info('Running %s...' % cmd)
+logger.debug('Running %s...' % cmd)
 need_gl = subprocess.Popen(cmd, shell=True, 
stdout=subprocess.PIPE).stdout.read().decode('utf-8')
 if re.search('libGLU', need_gl):
 # We can't run without a libGL.so
@@ -229,12 +231,12 @@ class BaseConfig(object):
 self.mac_slirp = "52:54:00:12:35:"
 
 def acquire_lock(self):
-logger.info("Acquiring lockfile %s..." % self.lock)
+logger.debug("Acquiring lockfile %s..." % self.lock)
 try:
 self.lock_descriptor = open(self.lock, 'w')
 fcntl.flock(self.lock_descriptor, fcntl.LOCK_EX|fcntl.LOCK_NB)
 except Exception as e:
-logger.info("Acquiring lockfile %s failed: %s" % (self.lock, e))
+logger.error("Acquiring lockfile %s failed: %s" % (self.lock, e))
 if self.lock_descriptor:
 self.lock_descriptor.close()
 return False
@@ -259,10 +261,10 @@ class BaseConfig(object):
 def is_deploy_dir_image(self, p):
 if os.path.isdir(p):
 if not re.search('.qemuboot.conf$', '\n'.join(os.listdir(p)), 
re.M):
-logger.info("Can't find required *.qemuboot.conf in %s" % p)
+logger.debug("Can't find required *.qemuboot.conf in %s" % p)
 return False
 if not any(map(lambda name: '-image-' in name, os.listdir(p))):
-logger.info("Can't find *-image-* in %s" % p)
+logger.debug("Can't find *-image-* in %s" % p)
 return False
 return True
 else:
@@ -281,9 +283,9 @@ class BaseConfig(object):
 
 def set_machine_deploy_dir(self, machine, deploy_dir_image):
 """Set MACHINE and DEPLOY_DIR_IMAGE"""
-logger.info('MACHINE: %s' % machine)
+logger.debug('MACHINE: %s' % machine)
 self.set("MACHINE", machine)
-logger.info('DEPLOY_DIR_IMAGE: %s' % deploy_dir_image)
+logger.debug('DEPLOY_DIR_IMAGE: %s' % deploy_dir_image)
 self.set("DEPLOY_DIR_IMAGE", deploy_dir_image)
 
 def check_arg_nfs(self, p):
@@ -337,10 +339,10 @@ class BaseConfig(object):
 
 elif os.path.isdir(p) or re.search(':', p) and re.search('/', p):
 if self.is_deploy_dir_image(p):
-logger.info('DEPLOY_DIR_IMAGE: %s' % p)
+logger.debug('DEPLOY_DIR_IMAGE: %s' % p)
 self.set("DEPLOY_DIR_IMAGE", p)
 else:
-logger.info("Assuming %s is an nfs rootfs" % p)
+logger.debug("Assuming %s is an nfs rootfs" % p)
 self.check_arg_nfs(p)
 elif os.path.basename(p).startswith('ovmf'):
 self.ovmf_bios.append(p)
@@ -356,7 +358,7 @@ class BaseConfig(object):
 elif re.search('/', arg):
 raise RunQemuError("Unknown arg: %s" % arg)
 
-logger.info('Assuming MACHINE = %s' % arg)
+logger.debug('Assuming MACHINE = %s' % arg)
 
 # if we're running under testimage, or similarly as a child
 # of an existing bitbake invocation, we can't invoke bitbake
@@ -393,6 +395,16 @@ class BaseConfig(object):
 self.set("MACHINE", arg)
 
 def check_args(self):
+for debug in ("-d", "--debug"):
+if debug in sys.argv:
+logger.setLevel(logging.DEBUG)
+sys.argv.remove(debug)
+
+for quiet in ("-q", "--quiet"):
+if quiet in sys.argv:
+logger.setLevel(logging.ERROR)
+sys.argv.remove(quiet)
+
 unknown_arg = ""
 for arg in sys.argv[1:]:
 if arg in self.fstypes + self.vmtypes:
@@ -608,7 

[OE-core] [PATCH 3/5] runqemu: check tar.bz2 and .tar.gz

2017-07-17 Thread Robert Yang
Handle them as nfs, so that cmd like the following can be boot:
$ runqemu tmp/deploy/images/qemux86/core-image-minimal-qemux86.tar.bz2

[YOCTO #11286]

Signed-off-by: Robert Yang 
---
 scripts/runqemu | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 781814ae651..bdb559f82ff 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -218,7 +218,8 @@ class BaseConfig(object):
 self.lock_descriptor = ''
 self.bitbake_e = ''
 self.snapshot = False
-self.fstypes = ('ext2', 'ext3', 'ext4', 'jffs2', 'nfs', 'btrfs', 
'cpio.gz', 'cpio', 'ramfs')
+self.fstypes = ('ext2', 'ext3', 'ext4', 'jffs2', 'nfs', 'btrfs',
+'cpio.gz', 'cpio', 'ramfs', 'tar.bz2', 'tar.gz')
 self.vmtypes = ('hddimg', 'hdddirect', 'wic', 'vmdk', 'qcow2', 'vdi', 
'iso')
 self.network_device = "-device e1000,netdev=net0,mac=@MAC@"
 # Use different mac section for tap and slirp to avoid
@@ -277,6 +278,8 @@ class BaseConfig(object):
 if not self.fstype or self.fstype == fst:
 if fst == 'ramfs':
 fst = 'cpio.gz'
+if fst in ('tar.bz2', 'tar.gz'):
+fst = 'nfs'
 self.fstype = fst
 else:
 raise RunQemuError("Conflicting: FSTYPE %s and %s" % (self.fstype, 
fst))
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/5] runqemu: 5 fixes

2017-07-17 Thread Robert Yang
The following changes since commit ef68005a8c527e9b1d05b7769f0ec8ebe9ec3f91:

  webkitgtk: Upgrade to 2.16.5 (2017-07-17 13:49:04 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/runqemu
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/runqemu

Robert Yang (5):
  runqemu: add --debug and --quiet
  runqemu: check qbconfload before running bitbake
  runqemu: check tar.bz2 and .tar.gz
  runqemu: validate combos
  runqemu: chmod 0o777 for lockdir

 scripts/runqemu | 64 ++---
 1 file changed, 43 insertions(+), 21 deletions(-)

-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 5/5] runqemu: chmod 0o777 for lockdir

2017-07-17 Thread Robert Yang
Multi-users may run qemu on the same host, all of them should be able to
create or remove lock in lockdir, so set lockdir's mode to 0o777.

Note, os.mkdir()'s mode is default to 0o777, but the current umask value is
first masked out, so use os.chmod() to set it.

Signed-off-by: Robert Yang 
---
 scripts/runqemu | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/runqemu b/scripts/runqemu
index e9ed890bb27..2be27804841 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -910,6 +910,7 @@ class BaseConfig(object):
 # running at the same time.
 try:
 os.mkdir(lockdir)
+os.chmod(lockdir, 0o777)
 except FileExistsError:
 pass
 
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 4/5] runqemu: validate combos

2017-07-17 Thread Robert Yang
Error out ealier if the combos is invalid, e.g.:
$ runqemu tmp/deploy/images/qemux86/bzImage-qemux86.bin 
tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic

This will fail at kernel panic, no we check and error out early. We can
add other checkings in the future.

[YOCTO #11286]

Signed-off-by: Robert Yang 
---
 scripts/runqemu | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/scripts/runqemu b/scripts/runqemu
index bdb559f82ff..e9ed890bb27 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1209,6 +1209,10 @@ class BaseConfig(object):
 self.bitbake_e = ''
 logger.warn("Couldn't run 'bitbake -e' to gather environment 
information:\n%s" % err.output.decode('utf-8'))
 
+def validate_combos(self):
+if (self.fstype in self.vmtypes) and self.kernel:
+raise Exception("%s doesn't need kernel %s!" % (self.fstype, 
self.kernel))
+
 @property
 def bindir_native(self):
 result = self.get('STAGING_BINDIR_NATIVE')
@@ -1240,6 +1244,8 @@ def main():
 config.check_args()
 config.read_qemuboot()
 config.check_and_set()
+# Check whether the combos is valid or not
+config.validate_combos()
 config.print_config()
 config.setup_network()
 config.setup_rootfs()
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] State of bitbake world, Failed tasks 2017-07-16

2017-07-17 Thread Khem Raj
firefox and ipppool seems to not fail for me here.
so I wonder what might be different.

On Mon, Jul 17, 2017 at 11:49 AM, Martin Jansa  wrote:
> The v2s of those patches really helped:
>
> http://www.openembedded.org/wiki/Bitbake_World_Status
>
> == Number of issues - stats ==
> {| class='wikitable'
> !|Date !!colspan='3'|Failed tasks!!|Signatures
> !!colspan='14'|QA !!Comment
> |-
> || ||qemuarm ||qemux86 ||qemux86_64 ||all
> ||already-stripped ||libdir ||textrel ||build-deps ||file-rdeps 
> ||version-going-backwards ||host-user-contaminated ||installed-vs-shipped 
> ||unknown-configure-option ||symlink-to-sysroot ||invalid-pkgconfig ||pkgname 
> ||ldflags ||compile-host-path ||
> |-
> ||2017-07-17 ||5 ||4 ||4 ||0 ||0 ||0 ||0 ||0 ||0 ||0 ||0 ||0 ||0 ||0 ||0 ||0 
> ||0 ||0 ||
> |}
>
> == Failed tasks 2017-07-17 ==
>
> INFO: jenkins-job.sh-1.8.25 Complete log available at
> http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.report.20170717_054804.log
>
> === common (4) ===
> * meta-browser/recipes-mozilla/firefox/firefox_45.9.0esr.bb:do_compile
> *
> meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb:do_compile
> *
> meta-webos-ports/meta-luneui/recipes-webos/pmloglib/pmloglib.bb:do_compile
> *
> openembedded-core/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb:do_compile
>
> === common-x86 (0) ===
>
> === qemuarm (1) ===
> *
> meta-openembedded/meta-oe/recipes-support/mysql/mariadb_5.5.55.bb:do_compile
>
> === qemux86 (0) ===
>
> === qemux86_64 (0) ===
>
> === Number of failed tasks (13) ===
> {| class=wikitable
> |-
> || qemuarm || 5 ||
> http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.world.qemuarm.20170717_011149.log/
> || http://errors.yoctoproject.org/Errors/Build/41271/
> |-
> || qemux86 || 4 ||
> http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.world.qemux86.20170717_011149.log/
> || http://errors.yoctoproject.org/Errors/Build/41272/
> |-
> || qemux86_64 || 4 ||
> http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.world.qemux86-64.20170717_031905.log/
> || http://errors.yoctoproject.org/Errors/Build/41273/
> |}
>
> === PNBLACKLISTs (14) ===
>
> === QA issues (0) ===
> {| class=wikitable
> !| Count ||Issue
> |-
> ||0 ||already-stripped
> |-
> ||0 ||build-deps
> |-
> ||0 ||compile-host-path
> |-
> ||0 ||file-rdeps
> |-
> ||0 ||host-user-contaminated
> |-
> ||0 ||installed-vs-shipped
> |-
> ||0 ||invalid-pkgconfig
> |-
> ||0 ||ldflags
> |-
> ||0 ||libdir
> |-
> ||0 ||pkgname
> |-
> ||0 ||symlink-to-sysroot
> |-
> ||0 ||textrel
> |-
> ||0 ||unknown-configure-option
> |-
> ||0 ||version-going-backwards
> |}
>
>
>
> === Incorrect PACKAGE_ARCH or sstate signatures (0) ===
>
> Complete log:
> http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.signatures.20170717_031354.log/
>
> No issues detected
>
>
> PNBLACKLISTs:
> openembedded-core/:
> meta-browser:
> meta-openembedded:
> meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb:PNBLACKLIST[lksctp-tools]
> ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "BROKEN: fails to
> link against sctp_connectx symbol", '', d)}"
> meta-oe/recipes-connectivity/bluez/bluez-hcidump_2.5.bb:PNBLACKLIST[bluez-hcidump]
> ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with
> bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
> meta-oe/recipes-connectivity/bluez/bluez4_4.101.bb:PNBLACKLIST[bluez4] ?=
> "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with
> bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
> meta-oe/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb:PNBLACKLIST[gst-plugin-bluetooth]
> ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with
> bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
> meta-oe/recipes-graphics/libsexy/libsexy_0.1.11.bb:PNBLACKLIST[libsexy] ?=
> "Fails to build with RSS
> http://errors.yoctoproject.org/Errors/Details/130607/ - the recipe will be
> removed on 2017-09-01 unless the issue is fixed"
> meta-oe/recipes-graphics/xorg-driver/xf86-video-geode_2.11.16.bb:PNBLACKLIST[xf86-video-geode]
> ?= "BROKEN, fails to build - the recipe will be removed on 2017-09-01 unless
> the issue is fixed"
> meta-oe/recipes-navigation/foxtrotgps/foxtrotgps_1.1.1.bb:PNBLACKLIST[foxtrotgps]
> ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with
> bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
> meta-oe/recipes-navigation/gypsy/gypsy.inc:PNBLACKLIST[gypsy] ?=
> "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with
> bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
> meta-oe/recipes-navigation/navit/navit.inc:PNBLACKLIST[navit] ?=
> "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with
> bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
> meta-oe/recipes-support/opensync/libsyncml_0.5.4.bb:PNBLACKLIST[libsyncml]
> ?= 

Re: [OE-core] [PATCH] gstreamer1.0-python: add new recipe

2017-07-17 Thread Khem Raj
On Mon, Jul 17, 2017 at 8:21 PM, Martin Kelly  wrote:
> Previously, we had a gst-python recipe, but it supported only GStreamer
> 0.1. After GStreamer switched the Python bindings to use GObject
> introspection, we were no longer able to build the bindings, and they
> were dropped in this patch:
>
> https://patchwork.openembedded.org/patch/93793/
>
> However, at this point, we have a gobject-introspection class, so we can
> use the bindings again, this time with GStreamer 1.0.
>
> Signed-off-by: Martin Kelly 
> ---
>  .../gstreamer/gstreamer1.0-python.inc  | 35 
> ++
>  .../gstreamer/gstreamer1.0-python_1.10.4.bb|  7 +
>  2 files changed, 42 insertions(+)
>  create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
>  create mode 100644 
> meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.10.4.bb

I think everything in single file would be better

>
> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc 
> b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
> new file mode 100644
> index 00..3299b89daa
> --- /dev/null
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
> @@ -0,0 +1,35 @@
> +SUMMARY = "Python bindings for GStreamer 1.0"
> +HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-python/;
> +SECTION = "multimedia"
> +LICENSE = "LGPLv2"
> +

this should be 2.1 most probably

> +DEPENDS = "gstreamer1.0 python3-pygobject"
> +RDEPENDS_${PN} += "gstreamer1.0 python3-pygobject"
> +
> +PNREAL = "gst-python"
> +
> +SRC_URI = 
> "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz;
> +
> +S = "${WORKDIR}/${PNREAL}-${PV}"
> +
> +inherit autotools pkgconfig distutils3-base upstream-version-is-even 
> gobject-introspection
> +
> +do_install_append() {
> +# gstpythonplugin hardcodes the location of the libpython from the build
> +# workspace and then fails at runtime. We can override it using
> +# --with-libpython-dir=${libdir}, but it still fails because it looks 
> for a
> +# symlinked library ending in .so instead of the actually library with
> +# LIBNAME.so.MAJOR.MINOR. Although we could patch the code to use the 
> path
> +# we want, it will break again if the library version ever changes. We 
> need
> +# to think about the best way of handling this and possibly consult
> +# upstream.
> +#
> +# Note that this particular find line is taken from the Debian packaging 
> for
> +# gst-python1.0.
> +find "${D}" \
> +-name '*.pyc' -o \
> +-name '*.pyo' -o \
> +-name '*.la' -o \
> +-name 'libgstpythonplugin*' \
> +-delete
> +}
> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.10.4.bb 
> b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.10.4.bb
> new file mode 100644
> index 00..1365f7c6dd
> --- /dev/null
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.10.4.bb
> @@ -0,0 +1,7 @@
> +require gstreamer1.0-python.inc
> +
> +SRC_URI = 
> "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz;
> +SRC_URI[md5sum] = "adcdb74f713e28d0b22a0a1e4f831573"
> +SRC_URI[sha256sum] = 
> "59508174b8bc86c05290aa9a7c5d480ac556a6f36306ddbc1d0eacf4f7868212"
> +
> +LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
> --
> 2.11.0
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for screen 4.5.1 -> 4.6.0

2017-07-17 Thread Patchwork
== Series Details ==

Series: screen 4.5.1 -> 4.6.0
Revision: 1
URL   : https://patchwork.openembedded.org/series/7780/
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:



* Patchscreen 4.5.1 -> 4.6.0
 Issue Shortlog does not follow expected format 
[test_shortlog_format] 
  Suggested fixCommit shortlog (first line of commit message) should follow 
the format ": "



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) 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

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] screen 4.5.1 -> 4.6.0

2017-07-17 Thread Bian Yaqin
Update screen from 4.5.1 to 4.6.0

Signed-off-by: Bian Yaqin 
---
 meta/recipes-extended/screen/{screen_4.5.1.bb => screen_4.6.0.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-extended/screen/{screen_4.5.1.bb => screen_4.6.0.bb} (93%)

diff --git a/meta/recipes-extended/screen/screen_4.5.1.bb 
b/meta/recipes-extended/screen/screen_4.6.0.bb
similarity index 93%
rename from meta/recipes-extended/screen/screen_4.5.1.bb
rename to meta/recipes-extended/screen/screen_4.6.0.bb
index 32c1a5a..a41efe9 100644
--- a/meta/recipes-extended/screen/screen_4.5.1.bb
+++ b/meta/recipes-extended/screen/screen_4.6.0.bb
@@ -26,8 +26,8 @@ SRC_URI = "${GNU_MIRROR}/screen/screen-${PV}.tar.gz \
file://0001-fix-for-multijob-build.patch \
   "
 
-SRC_URI[md5sum] = "a8c5da2f42f8a18fa4dada2419d1549b"
-SRC_URI[sha256sum] = 
"97db2114dd963b016cd4ded34831955dcbe3251e5eee45ac2606e67e9f097b2d"
+SRC_URI[md5sum] = "af60f716c4ec134712b923ef6cd93848"
+SRC_URI[sha256sum] = 
"9433706b653e941cc4c745f28e252e57be2a141eded923e61cc2c4a09768fed4"
 
 inherit autotools texinfo
 
-- 
2.7.4



-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 0/2] Introduce a distro feature openssl-no-weak-ciphers

2017-07-17 Thread Kang Kai

On 2017年07月17日 21:20, Alexander Kanavin wrote:

On 07/05/2017 10:58 AM, kai.k...@windriver.com wrote:

Introduce a distro feature openssl-no-weak-ciphers to make openssl 
disable weak

ciphers support, including:

* des
* ec
* ecdh
* ecdsa
* md2
* mdc2


How are those handled in openssl 1.1? If they are disabled by default, 
then maybe the whole distro feature is not needed when 1.1 is in oe-core.


It depends on whether all the packages which depends on openssl in Yocto 
have options to disable such weak ciphers. I am afraid it could not build

some packages if disable these weak ciphers by default.

Thanks,
Kai



Alex


Alex



--
Regards,
Neil | Kai Kang

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 0/1] bind: 9.10..3-P3 -> 9.10.5-P3

2017-07-17 Thread Kang Kai

On 2017年07月17日 21:38, Alexander Kanavin wrote:

On 07/12/2017 11:40 AM, Kang Kai wrote:

Kai Kang (1):
   bind: 9.10..3-P3 -> 9.10.5-P3


Why not 9.11.1?


If bind 9.11.x is needed, we could add its recipe. But I think the 
9.10.x version should be kept for compatibility.


Thanks,
Kai



Alex



--
Regards,
Neil | Kai Kang

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv2] lsb: add checking for chkconfig existence when creating the symbolic

2017-07-17 Thread Zhenbo Gao
install_initd and remove_initd will be created as the symbolic file
of chkconfig, which will be not existed when systemd is configured,
so adding the check for the existence of chkconfig before creating
the symbolic.

Signed-off-by: Zhenbo Gao 
---
 meta/recipes-extended/lsb/lsb_4.1.bb | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb 
b/meta/recipes-extended/lsb/lsb_4.1.bb
index cedf39e..c8db1a8 100644
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -90,11 +90,13 @@ do_install_append() {
install -m 0755 ${WORKDIR}/init-functions ${D}${nonarch_base_libdir}/lsb
 
# create links for LSB test
-   if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
-   install -d ${D}${nonarch_libdir}/lsb
+   if [ -e ${sbindir}/chkconfig ]; then
+   if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
+   install -d ${D}${nonarch_libdir}/lsb
+   fi
+   ln -sf ${sbindir}/chkconfig 
${D}${nonarch_libdir}/lsb/install_initd
+   ln -sf ${sbindir}/chkconfig 
${D}${nonarch_libdir}/lsb/remove_initd
fi
-   ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/install_initd
-   ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/remove_initd
 
if [ "${TARGET_ARCH}" = "x86_64" ]; then
if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] lsb: add checking for chkconfig existence when creating the symbolic

2017-07-17 Thread zhenbo



On 2017年07月17日 21:57, Leonardo Sandoval wrote:

On Mon, 2017-07-17 at 17:13 +0800, Zhenbo Gao wrote:

remove_initd and remove_initd will be created as the symbolic file

I believe you mean 'install_initd and remove_initd'...

Hi Leonardo,

Thanks for pointing this mistake, sorry about that.
I will send a V2 patch later to correct this.

Thanks,
Zhenbo


of chkconfig, which will be not existed when systemd is configured,
so adding the check for the existence of chkconfig before creating
the symbolic.

Signed-off-by: Zhenbo Gao 
---
  meta/recipes-extended/lsb/lsb_4.1.bb | 10 ++
  1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb 
b/meta/recipes-extended/lsb/lsb_4.1.bb
index cedf39e..c8db1a8 100644
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -90,11 +90,13 @@ do_install_append() {
 install -m 0755 ${WORKDIR}/init-functions 
${D}${nonarch_base_libdir}/lsb
  
 # create links for LSB test

-   if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
-   install -d ${D}${nonarch_libdir}/lsb
+   if [ -e ${sbindir}/chkconfig ]; then
+   if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
+   install -d ${D}${nonarch_libdir}/lsb
+   fi
+   ln -sf ${sbindir}/chkconfig 
${D}${nonarch_libdir}/lsb/install_initd
+   ln -sf ${sbindir}/chkconfig 
${D}${nonarch_libdir}/lsb/remove_initd
 fi
-   ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/install_initd
-   ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/remove_initd
  
 if [ "${TARGET_ARCH}" = "x86_64" ]; then

 if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then
--
1.9.1





--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] kernel: fitimage: deploy real fit-image

2017-07-17 Thread Gaël PORTAY
Currently, do_deploy installs a standard kernel image as an ITB. This
image is linux.bin and it is prepared by uboot_prep_kimage.

The real kernel fit-image is build under arch/${ARCH}/boot/fitImage.

This patch deploys the real fit-image instead of the one prepared by
u-boot and which is included in the ITB.

Note: this patch only concerns fit-images which are not signed by u-boot
or which do not contains initramfs. Only a kernel image with a
device-tree.

Signed-off-by: Gaël PORTAY 
---
Hi all,

This patch is a modified version of the one I wrote on a meta-arago/morty
build. Thus it is not tested, but it should work.

In the deploy image directory, I had

$ file -L fitImage 
fitImage: Linux kernel ARM boot executable zImage (little-endian)

With the patch, I have

$ file -L fitImage 
fitImage: data

Regards,
Gael

 meta/classes/kernel-fitimage.bbclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 2630b47316..a745e873c1 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -453,9 +453,9 @@ kernel_do_deploy_append() {
its_base_name="fitImage-its-${PV}-${PR}-${MACHINE}-${DATETIME}"
its_symlink_name=fitImage-its-${MACHINE}
install -m 0644 fit-image.its ${DEPLOYDIR}/${its_base_name}.its
-   
linux_bin_base_name="fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
-   linux_bin_symlink_name=fitImage-linux.bin-${MACHINE}
-   install -m 0644 linux.bin 
${DEPLOYDIR}/${linux_bin_base_name}.bin
+   
itb_base_name="fitImage-linux.bin-${PV}-${PR}-${MACHINE}-${DATETIME}"
+   itb_symlink_name=fitImage-linux.bin-${MACHINE}
+   install -m 0644 arch/${ARCH}/boot/fitImage 
${DEPLOYDIR}/${itb_base_name}.bin
 
if [ -n "${INITRAMFS_IMAGE}" ]; then
echo "Copying fit-image-${INITRAMFS_IMAGE}.its source 
file..."
@@ -469,7 +469,7 @@ kernel_do_deploy_append() {
 
cd ${DEPLOYDIR}
ln -sf ${its_base_name}.its ${its_symlink_name}.its
-   ln -sf ${linux_bin_base_name}.bin ${linux_bin_symlink_name}.bin
+   ln -sf ${itb_base_name}.bin ${itb_symlink_name}.bin
 
if [ -n "${INITRAMFS_IMAGE}" ]; then
ln -sf ${its_initramfs_base_name}.its 
${its_initramfs_symlink_name}.its
-- 
2.13.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] gstreamer1.0-python: add new recipe

2017-07-17 Thread Martin Kelly
Previously, we had a gst-python recipe, but it supported only GStreamer
0.1. After GStreamer switched the Python bindings to use GObject
introspection, we were no longer able to build the bindings, and they
were dropped in this patch:

https://patchwork.openembedded.org/patch/93793/

However, at this point, we have a gobject-introspection class, so we can
use the bindings again, this time with GStreamer 1.0.

Signed-off-by: Martin Kelly 
---
 .../gstreamer/gstreamer1.0-python.inc  | 35 ++
 .../gstreamer/gstreamer1.0-python_1.10.4.bb|  7 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
 create mode 100644 
meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.10.4.bb

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
new file mode 100644
index 00..3299b89daa
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python.inc
@@ -0,0 +1,35 @@
+SUMMARY = "Python bindings for GStreamer 1.0"
+HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-python/;
+SECTION = "multimedia"
+LICENSE = "LGPLv2"
+
+DEPENDS = "gstreamer1.0 python3-pygobject"
+RDEPENDS_${PN} += "gstreamer1.0 python3-pygobject"
+
+PNREAL = "gst-python"
+
+SRC_URI = 
"http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz;
+
+S = "${WORKDIR}/${PNREAL}-${PV}"
+
+inherit autotools pkgconfig distutils3-base upstream-version-is-even 
gobject-introspection
+
+do_install_append() {
+# gstpythonplugin hardcodes the location of the libpython from the build
+# workspace and then fails at runtime. We can override it using
+# --with-libpython-dir=${libdir}, but it still fails because it looks for a
+# symlinked library ending in .so instead of the actually library with
+# LIBNAME.so.MAJOR.MINOR. Although we could patch the code to use the path
+# we want, it will break again if the library version ever changes. We need
+# to think about the best way of handling this and possibly consult
+# upstream.
+#
+# Note that this particular find line is taken from the Debian packaging 
for
+# gst-python1.0.
+find "${D}" \
+-name '*.pyc' -o \
+-name '*.pyo' -o \
+-name '*.la' -o \
+-name 'libgstpythonplugin*' \
+-delete
+}
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.10.4.bb 
b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.10.4.bb
new file mode 100644
index 00..1365f7c6dd
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.10.4.bb
@@ -0,0 +1,7 @@
+require gstreamer1.0-python.inc
+
+SRC_URI = 
"http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz;
+SRC_URI[md5sum] = "adcdb74f713e28d0b22a0a1e4f831573"
+SRC_URI[sha256sum] = 
"59508174b8bc86c05290aa9a7c5d480ac556a6f36306ddbc1d0eacf4f7868212"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740"
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for oeqa core and oe-selftest threaded enablement (rev3)

2017-07-17 Thread Patchwork
== Series Details ==

Series: oeqa core and oe-selftest threaded enablement (rev3)
Revision: 3
URL   : https://patchwork.openembedded.org/series/7694/
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[v3, 18/30] oeqa/selftest/cases: Use wrapper methods from 
OESelfTestCase class and enable threaded runs
 Issue Commit shortlog is too long [test_shortlog_length] 
  Suggested fixEdit shortlog so that it is 90 characters or less (currently 
91 characters)

* Issue Series does not apply on top of target branch 
[test_series_merge_on_head] 
  Suggested fixRebase your series on top of targeted branch
  Targeted branch  master (currently at ef68005a8c)

* Issue Series sent to the wrong mailing list or some patches from 
the series correspond to different mailing lists [test_target_mailing_list] 
  Suggested fixSend the series again to the correct mailing list (ML)
  Suggested ML p...@yoctoproject.org 
[http://git.yoctoproject.org/cgit/cgit.cgi/poky/]
  Patch's path:meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) 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

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 26/30] selftest/cases/devtool{, end}: Move update/finish_modify tests to its own module

2017-07-17 Thread Aníbal Limón
This devtool tests are set to run at end because made changes into the
poky repository causing problems (non deteministic meta data) in other
execution threads.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/cases/devtool.py | 545 ++--
 meta/lib/oeqa/selftest/cases/devtool_end.py | 506 ++
 2 files changed, 532 insertions(+), 519 deletions(-)
 create mode 100644 meta/lib/oeqa/selftest/cases/devtool_end.py

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index 3d8d246bb7c..44ba361f16c 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -112,6 +112,32 @@ class DevtoolBase(OESelftestTestCase):
 filelist.append(' '.join(splitline))
 return filelist
 
+def _check_src_repo(self, repo_dir):
+"""Check srctree git repository"""
+self.assertTrue(os.path.isdir(os.path.join(repo_dir, '.git')),
+'git repository for external source tree not found')
+result = self.runCmd('git status --porcelain', cwd=repo_dir)
+self.assertEqual(result.output.strip(), "",
+ 'Created git repo is not clean')
+result = self.runCmd('git symbolic-ref HEAD', cwd=repo_dir)
+self.assertEqual(result.output.strip(), "refs/heads/devtool",
+ 'Wrong branch in git repo')
+
+def _check_repo_status(self, repo_dir, expected_status):
+"""Check the worktree status of a repository"""
+result = self.runCmd('git status . --porcelain',
+cwd=repo_dir)
+for line in result.output.splitlines():
+for ind, (f_status, fn_re) in enumerate(expected_status):
+if re.match(fn_re, line[3:]):
+if f_status != line[:2]:
+self.fail('Unexpected status in line: %s' % line)
+expected_status.pop(ind)
+break
+else:
+self.fail('Unexpected modified file in line: %s' % line)
+if expected_status:
+self.fail('Missing file changes: %s' % expected_status)
 
 class DevtoolCommon(DevtoolBase):
 _use_own_builddir = True
@@ -150,33 +176,6 @@ class DevtoolTests(DevtoolCommon):
 _use_own_builddir = True
 _main_thread = False
 
-def _check_src_repo(self, repo_dir):
-"""Check srctree git repository"""
-self.assertTrue(os.path.isdir(os.path.join(repo_dir, '.git')),
-'git repository for external source tree not found')
-result = self.runCmd('git status --porcelain', cwd=repo_dir)
-self.assertEqual(result.output.strip(), "",
- 'Created git repo is not clean')
-result = self.runCmd('git symbolic-ref HEAD', cwd=repo_dir)
-self.assertEqual(result.output.strip(), "refs/heads/devtool",
- 'Wrong branch in git repo')
-
-def _check_repo_status(self, repo_dir, expected_status):
-"""Check the worktree status of a repository"""
-result = self.runCmd('git status . --porcelain',
-cwd=repo_dir)
-for line in result.output.splitlines():
-for ind, (f_status, fn_re) in enumerate(expected_status):
-if re.match(fn_re, line[3:]):
-if f_status != line[:2]:
-self.fail('Unexpected status in line: %s' % line)
-expected_status.pop(ind)
-break
-else:
-self.fail('Unexpected modified file in line: %s' % line)
-if expected_status:
-self.fail('Missing file changes: %s' % expected_status)
-
 @OETestID(1158)
 def test_create_workspace(self):
 # Check preconditions
@@ -687,417 +686,6 @@ class DevtoolTests(DevtoolCommon):
 self._check_src_repo(tempdir)
 # This is probably sufficient
 
-
-@OETestID(1169)
-def test_devtool_update_recipe(self):
-# Check preconditions
-testrecipe = 'minicom'
-bb_vars = self.get_bb_vars(['FILE', 'SRC_URI'], testrecipe)
-recipefile = bb_vars['FILE']
-src_uri = bb_vars['SRC_URI']
-self.assertNotIn('git://', src_uri, 'This test expects the %s recipe 
to NOT be a git recipe' % testrecipe)
-self._check_repo_status(os.path.dirname(recipefile), [])
-# First, modify a recipe
-tempdir = tempfile.mkdtemp(prefix='devtoolqa')
-self.track_for_cleanup(tempdir)
-self.track_for_cleanup(self.workspacedir)
-self.add_command_to_tearDown('bitbake-layers remove-layer %s' % 
self.workspacedir)
-# (don't bother with cleaning the recipe on teardown, we won't be 
building it)
-# We don't use -x here so that we test the behaviour of devtool modify 
without it
-result = self.runCmd('devtool modify 

[OE-core] [PATCHv3 24/30] oeqa/selftest/cases: recipetool enable for threaded runs

2017-07-17 Thread Aníbal Limón
- Change to use wrappers from OESelfTestCase.
- Move templayer dir creation to RecipetoolBase class because
  now every class has its own build folder.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/cases/recipetool.py | 105 +++--
 1 file changed, 54 insertions(+), 51 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py 
b/meta/lib/oeqa/selftest/cases/recipetool.py
index bdd405f1cc0..59544336578 100644
--- a/meta/lib/oeqa/selftest/cases/recipetool.py
+++ b/meta/lib/oeqa/selftest/cases/recipetool.py
@@ -3,30 +3,30 @@ import shutil
 import tempfile
 import urllib.parse
 
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var
-from oeqa.utils.commands import get_bb_vars, create_temp_layer
-from oeqa.core.decorator.oeid import OETestID
 from oeqa.selftest.cases import devtool
+from oeqa.utils.commands import create_temp_layer
+from oeqa.core.decorator.oeid import OETestID
 
-templayerdir = None
-
-def setUpModule():
-global templayerdir
-templayerdir = tempfile.mkdtemp(prefix='recipetoolqa')
-create_temp_layer(templayerdir, 'selftestrecipetool')
-runCmd('bitbake-layers add-layer %s' % templayerdir)
-
+class RecipetoolBase(devtool.DevtoolBase):
+@classmethod
+def setUpClass(cls):
+super(RecipetoolBase, cls).setUpClass()
 
-def tearDownModule():
-runCmd('bitbake-layers remove-layer %s' % templayerdir, ignore_status=True)
-runCmd('rm -rf %s' % templayerdir)
+cls.templayerdir = tempfile.mkdtemp(prefix='recipetoolqa')
+create_temp_layer(cls.templayerdir, 'selftestrecipetool')
+cls.runCmd('bitbake-layers add-layer %s' % cls.templayerdir)
 
+@classmethod
+def tearDownClass(cls):
+super(RecipetoolBase, cls).tearDownClass()
 
-class RecipetoolBase(devtool.DevtoolBase):
+cls.runCmd('bitbake-layers remove-layer %s' % cls.templayerdir,
+ignore_status=True)
+cls.runCmd('rm -rf %s' % cls.templayerdir)
 
 def setUpLocal(self):
 super(RecipetoolBase, self).setUpLocal()
-self.templayerdir = templayerdir
+
 self.tempdir = tempfile.mkdtemp(prefix='recipetoolqa')
 self.track_for_cleanup(self.tempdir)
 self.testfile = os.path.join(self.tempdir, 'testfile')
@@ -34,15 +34,15 @@ class RecipetoolBase(devtool.DevtoolBase):
 f.write('Test file\n')
 
 def tearDownLocal(self):
-runCmd('rm -rf %s/recipes-*' % self.templayerdir)
+self.runCmd('rm -rf %s/recipes-*' % self.templayerdir)
 super(RecipetoolBase, self).tearDownLocal()
 
 def _try_recipetool_appendcmd(self, cmd, testrecipe, expectedfiles, 
expectedlines=None):
-result = runCmd(cmd)
+result = self.runCmd(cmd)
 self.assertNotIn('Traceback', result.output)
 
 # Check the bbappend was created and applies properly
-recipefile = get_bb_var('FILE', testrecipe)
+recipefile = self.get_bb_var('FILE', testrecipe)
 bbappendfile = self._check_bbappend(testrecipe, recipefile, 
self.templayerdir)
 
 # Check the bbappend contents
@@ -66,14 +66,16 @@ class RecipetoolBase(devtool.DevtoolBase):
 
 
 class RecipetoolTests(RecipetoolBase):
+_use_own_builddir = True
+_main_thread = False
 
 @classmethod
 def setUpClass(cls):
 super(RecipetoolTests, cls).setUpClass()
 # Ensure we have the right data in shlibs/pkgdata
 cls.logger.info('Running bitbake to generate pkgdata')
-bitbake('-c packagedata base-files coreutils busybox 
selftest-recipetool-appendfile')
-bb_vars = get_bb_vars(['COREBASE', 'BBPATH'])
+cls.bitbake('-c packagedata base-files coreutils busybox 
selftest-recipetool-appendfile')
+bb_vars = cls.get_bb_vars(['COREBASE', 'BBPATH'])
 cls.corebase = bb_vars['COREBASE']
 cls.bbpath = bb_vars['BBPATH']
 
@@ -83,7 +85,7 @@ class RecipetoolTests(RecipetoolBase):
 
 def _try_recipetool_appendfile_fail(self, destfile, newfile, checkerror):
 cmd = 'recipetool appendfile %s %s %s' % (self.templayerdir, destfile, 
newfile)
-result = runCmd(cmd, ignore_status=True)
+result = self.runCmd(cmd, ignore_status=True)
 self.assertNotEqual(result.status, 0, 'Command "%s" should have failed 
but didn\'t' % cmd)
 self.assertNotIn('Traceback', result.output)
 for errorstr in checkerror:
@@ -125,7 +127,7 @@ class RecipetoolTests(RecipetoolBase):
 bbappendfile, _ = self._try_recipetool_appendfile('coreutils', 
'/bin/ls', self.testfile, '-r coreutils', expectedlines, [testfile2name])
 # But file should have
 copiedfile = os.path.join(os.path.dirname(bbappendfile), 'coreutils', 
testfile2name)
-result = runCmd('diff -q %s %s' % (testfile2, copiedfile), 
ignore_status=True)
+result = self.runCmd('diff -q %s %s' % (testfile2, copiedfile), 
ignore_status=True)
 

[OE-core] [PATCHv3 25/30] oeqa/selftest/cases: Move devtool deploy test case to own module

2017-07-17 Thread Aníbal Limón
The devtool deploy test case uses runqemu that uses tinfoil so
tinfoil requires to run on the main thread.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/cases/devtool.py| 91 ++---
 meta/lib/oeqa/selftest/cases/devtool_deploy.py | 93 ++
 2 files changed, 97 insertions(+), 87 deletions(-)
 create mode 100644 meta/lib/oeqa/selftest/cases/devtool_deploy.py

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index c66e77a9ace..3d8d246bb7c 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -6,7 +6,7 @@ import glob
 import fnmatch
 
 import oeqa.utils.ftools as ftools
-from oeqa.utils.commands import create_temp_layer, runqemu
+from oeqa.utils.commands import create_temp_layer
 
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.core.decorator.oeid import OETestID
@@ -114,6 +114,9 @@ class DevtoolBase(OESelftestTestCase):
 
 
 class DevtoolCommon(DevtoolBase):
+_use_own_builddir = True
+_main_thread = False
+
 @classmethod
 def setUpClass(cls):
 super(DevtoolCommon, cls).setUpClass()
@@ -1144,92 +1147,6 @@ class DevtoolTests(DevtoolCommon):
 matches2 = glob.glob(stampprefix2 + '*')
 self.assertFalse(matches2, 'Stamp files exist for recipe %s that 
should have been cleaned' % testrecipe2)
 
-@OETestID(1272)
-def test_devtool_deploy_target(self):
-# NOTE: Whilst this test would seemingly be better placed as a runtime 
test,
-# unfortunately the runtime tests run under bitbake and you can't run
-# devtool within bitbake (since devtool needs to run bitbake itself).
-# Additionally we are testing build-time functionality as well, so
-# really this has to be done as an oe-selftest test.
-#
-# Check preconditions
-machine = self.get_bb_var('MACHINE')
-if not machine.startswith('qemu'):
-self.skipTest('This test only works with qemu machines')
-if not os.path.exists('/etc/runqemu-nosudo'):
-self.skipTest('You must set up tap devices with 
scripts/runqemu-gen-tapdevs before running this test')
-result = self.runCmd('PATH="$PATH:/sbin:/usr/sbin" ip tuntap show', 
ignore_status=True)
-if result.status != 0:
-result = self.runCmd('PATH="$PATH:/sbin:/usr/sbin" ifconfig -a', 
ignore_status=True)
-if result.status != 0:
-self.skipTest('Failed to determine if tap devices exist with 
ifconfig or ip: %s' % result.output)
-for line in result.output.splitlines():
-if line.startswith('tap'):
-break
-else:
-self.skipTest('No tap devices found - you must set up tap devices 
with scripts/runqemu-gen-tapdevs before running this test')
-self.assertTrue(not os.path.exists(self.workspacedir), 'This test 
cannot be run with a workspace directory under the build directory')
-# Definitions
-testrecipe = 'mdadm'
-testfile = '/sbin/mdadm'
-testimage = 'oe-selftest-image'
-testcommand = '/sbin/mdadm --help'
-# Build an image to run
-self.bitbake("%s qemu-native qemu-helper-native" % testimage)
-deploy_dir_image = self.get_bb_var('DEPLOY_DIR_IMAGE')
-self.add_command_to_tearDown('bitbake -c clean %s' % testimage)
-self.add_command_to_tearDown('rm -f %s/%s*' % (deploy_dir_image, 
testimage))
-# Clean recipe so the first deploy will fail
-self.bitbake("%s -c clean" % testrecipe)
-# Try devtool modify
-tempdir = tempfile.mkdtemp(prefix='devtoolqa')
-self.track_for_cleanup(tempdir)
-self.track_for_cleanup(self.workspacedir)
-self.add_command_to_tearDown('bitbake-layers remove-layer %s' % 
self.workspacedir)
-self.add_command_to_tearDown('bitbake -c clean %s' % testrecipe)
-result = self.runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
-# Test that deploy-target at this point fails (properly)
-result = self.runCmd('devtool deploy-target -n %s root@localhost' % 
testrecipe, ignore_status=True)
-self.assertNotEqual(result.output, 0, 'devtool deploy-target should 
have failed, output: %s' % result.output)
-self.assertNotIn(result.output, 'Traceback', 'devtool deploy-target 
should have failed with a proper error not a traceback, output: %s' % 
result.output)
-result = self.runCmd('devtool build %s' % testrecipe)
-# First try a dry-run of deploy-target
-result = self.runCmd('devtool deploy-target -n %s root@localhost' % 
testrecipe)
-self.assertIn('  %s' % testfile, result.output)
-# Boot the image
-with runqemu(testimage) as qemu:
-# Now really test deploy-target
-result = self.runCmd('devtool deploy-target -c %s root@%s' % 

[OE-core] [PATCHv3 29/30] oeqa/selftest/context: Enable support for threaded runs

2017-07-17 Thread Aníbal Limón
Add an option to specify how many threads will be used for
execution, default to 1.

Add OE_SELFTEST_THREAD_NUM environment variable for be able
to set thread num into the Yocto Autobuilder and don't need
to figure out the version of oe-selftest script.

If the thread_num are greater than 1 the OESelftestContextThreaded
will be used, this is due to compatibility reasons.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/context.py | 29 +
 1 file changed, 25 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/selftest/context.py 
b/meta/lib/oeqa/selftest/context.py
index 697ea0b4933..daef8823bf5 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -11,11 +11,12 @@ from shutil import copyfile
 import tempfile
 from random import choice
 
-import oeqa
+from argparse_oe import int_positive
 
-from oeqa.core.context import OETestContext, OETestContextExecutor
+import oeqa
+from oeqa.core.context import OETestContext, OETestContextExecutor 
 from oeqa.core.exception import OEQAPreRun
-
+from oeqa.core.threaded import OETestContextThreaded
 from oeqa.utils.commands import runCmd, get_bb_vars, get_test_layer
 
 class OESelftestTestContext(OETestContext):
@@ -38,14 +39,19 @@ class OESelftestTestContext(OETestContext):
 def listTests(self, display_type, machine=None):
 return super(OESelftestTestContext, self).listTests(display_type)
 
+class OESelftestTestContextThreaded(OESelftestTestContext, 
OETestContextThreaded):
+pass
+
 class OESelftestTestContextExecutor(OETestContextExecutor):
-_context_class = OESelftestTestContext
+_context_class = OESelftestTestContextThreaded
 _script_executor = 'oe-selftest'
 
 name = 'oe-selftest'
 help = 'oe-selftest test component'
 description = 'Executes selftest tests'
 
+DEFAULT_THREADS = 1
+
 def register_commands(self, logger, parser):
 group = parser.add_mutually_exclusive_group(required=True)
 
@@ -66,6 +72,11 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
 action="store_true", default=False,
 help='List all available tests.')
 
+parser.add_argument('-t', '--thread-num', required=False, 
action='store',
+dest="thread_num", default=self.DEFAULT_THREADS, 
type=int_positive,
+help='Number of threads to use for execute selftests,'\
+   ' default: %d' % self.DEFAULT_THREADS)
+
 parser.add_argument('--machine', required=False, choices=['random', 
'all'],
 help='Run tests on different machines 
(random/all).')
 
@@ -137,6 +148,11 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
 self.tc_kwargs['init']['config_paths']['base_builddir'] = \
 tempfile.mkdtemp(prefix='build-selftest-', dir=builddir)
 
+self.tc_kwargs['load']['process_num'] = args.thread_num
+if 'OE_SELFTEST_THREAD_NUM' in os.environ:
+self.tc_kwargs['load']['process_num'] = \
+int(os.environ['OE_SELFTEST_THREAD_NUM'])
+
 def _pre_run(self):
 def _check_required_env_variables(vars):
 for var in vars:
@@ -199,6 +215,11 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
 self.module_paths = self._get_cases_paths(
 self.tc_kwargs['init']['td']['BBPATH'].split(':'))
 
+if self.tc_kwargs['load']['process_num'] == 1:
+self._context_class = OESelftestTestContext
+# OESelftestTestContext class doesn't expect process_num
+del self.tc_kwargs['load']['process_num']
+
 self.tc = self._context_class(**self.tc_kwargs['init'])
 self.tc.loadTests(self.module_paths, **self.tc_kwargs['load'])
 
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 28/30] argparse_oe: Add int_positive type

2017-07-17 Thread Aníbal Limón
Sometimes only expect positive values from cmdline so it's better
to filter at parsing cmdline step instead of validate later.

Signed-off-by: Aníbal Limón 
---
 scripts/lib/argparse_oe.py | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/scripts/lib/argparse_oe.py b/scripts/lib/argparse_oe.py
index bf6eb17197b..9bdfc1ceca2 100644
--- a/scripts/lib/argparse_oe.py
+++ b/scripts/lib/argparse_oe.py
@@ -167,3 +167,10 @@ class OeHelpFormatter(argparse.HelpFormatter):
 return '\n'.join(lines)
 else:
 return super(OeHelpFormatter, self)._format_action(action)
+
+def int_positive(value):
+ivalue = int(value)
+if ivalue <= 0:
+raise argparse.ArgumentTypeError(
+"%s is not a positive int value" % value)
+return ivalue
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 30/30] oeqa/selftest/cases: systemd_boot enable threaded runs

2017-07-17 Thread Aníbal Limón
Signed-off-by: Aníbal Limón 
---
 .../lib/oeqa/selftest/cases/systemd_boot.py| 26 --
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py 
b/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py
index dd5eeec1633..0bd52dc6b85 100644
--- a/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py
+++ b/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py
@@ -3,9 +3,11 @@ import os
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.core.decorator.oeid import OETestID
 from oeqa.core.decorator.depends import OETestDepends
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
 
 class Systemdboot(OESelftestTestCase):
+_use_own_builddir = True
+_main_thread = False
+
 def _common_setup(self):
 """
 Common setup for test cases: 1445, 1528
@@ -22,7 +24,7 @@ class Systemdboot(OESelftestTestCase):
 """
 
 # Build a genericx86-64/efi systemdboot image
-bitbake('mtools-native core-image-minimal')
+self.bitbake('mtools-native core-image-minimal')
 
 
 @OETestID(1445)
@@ -38,14 +40,14 @@ class Systemdboot(OESelftestTestCase):
 
 # We'd use DEPLOY_DIR_IMAGE here, except that we need its value for
 # MACHINE="genericx86-64 which is probably not the one configured
-systemdbootfile = os.path.join(get_bb_var('DEPLOY_DIR'), 'images', 
'genericx86-64', 'systemd-bootx64.efi')
+systemdbootfile = os.path.join(self.get_bb_var('DEPLOY_DIR'), 
'images', 'genericx86-64', 'systemd-bootx64.efi')
 
 self._common_setup()
 
 # Ensure we're actually testing that this gets built and not that
 # it was around from an earlier build
-bitbake('-c cleansstate systemd-boot')
-runCmd('rm -f %s' % systemdbootfile)
+self.bitbake('-c cleansstate systemd-boot')
+self.runCmd('rm -f %s' % systemdbootfile)
 
 self._common_build()
 
@@ -71,20 +73,20 @@ class Systemdboot(OESelftestTestCase):
 AutomatedBy:  Jose Perez Carranza 
 """
 
-systemdbootfile = os.path.join(get_bb_var('DEPLOY_DIR'), 'images', 
'genericx86-64',
+systemdbootfile = os.path.join(self.get_bb_var('DEPLOY_DIR'), 
'images', 'genericx86-64',
'systemd-bootx64.efi')
-systemdbootimage = os.path.join(get_bb_var('DEPLOY_DIR'), 'images', 
'genericx86-64',
+systemdbootimage = os.path.join(self.get_bb_var('DEPLOY_DIR'), 
'images', 'genericx86-64',
 
'core-image-minimal-genericx86-64.hddimg')
-imagebootfile = os.path.join(get_bb_var('DEPLOY_DIR'), 'images', 
'genericx86-64',
+imagebootfile = os.path.join(self.get_bb_var('DEPLOY_DIR'), 'images', 
'genericx86-64',
 'bootx64.efi')
-mcopynative = os.path.join(get_bb_var('STAGING_BINDIR_NATIVE'), 
'mcopy')
+mcopynative = os.path.join(self.get_bb_var('STAGING_BINDIR_NATIVE'), 
'mcopy')
 
 #Clean environment before start the test
 if os.path.isfile(imagebootfile):
-runCmd('rm -f %s' % imagebootfile)
+self.runCmd('rm -f %s' % imagebootfile)
 
 #Step 1
-runCmd('%s -i %s ::EFI/BOOT/bootx64.efi %s' % (mcopynative 
,systemdbootimage,
+self.runCmd('%s -i %s ::EFI/BOOT/bootx64.efi %s' % (mcopynative 
,systemdbootimage,
imagebootfile))
 
 #Step 2
@@ -93,6 +95,6 @@ class Systemdboot(OESelftestTestCase):
 % imagebootfile)
 
 #Step 3
-result = runCmd('md5sum %s %s' % (systemdbootfile, imagebootfile))
+result = self.runCmd('md5sum %s %s' % (systemdbootfile, 
imagebootfile))
 self.assertEqual(result.output.split()[0], 
result.output.split()[2],
  '%s was not correclty generated' % imagebootfile)
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 23/30] oeqa/selftest/cases: devtool enable threaded runs

2017-07-17 Thread Aníbal Limón
- Add new class DevtoolCommon to split devtool suite into other modules.
- Change to use wrappers from OESelfTest class (runCmd, bitbake).
- When remove workspacedir using bitbake-layers use full path because
now has it own builddir.
- Add a build of xz-native because some tests needs it to
decompress tarballs and is supposed to be provided, see bug [YOCTO #11474].

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/cases/devtool.py | 644 
 1 file changed, 325 insertions(+), 319 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index 28c84679a17..c66e77a9ace 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -6,13 +6,12 @@ import glob
 import fnmatch
 
 import oeqa.utils.ftools as ftools
+from oeqa.utils.commands import create_temp_layer, runqemu
+
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
-from oeqa.utils.commands import get_bb_vars, runqemu
 from oeqa.core.decorator.oeid import OETestID
 
 class DevtoolBase(OESelftestTestCase):
-
 def _test_recipe_contents(self, recipefile, checkvars, checkinherits):
 with open(recipefile, 'r') as f:
 invar = None
@@ -62,7 +61,7 @@ class DevtoolBase(OESelftestTestCase):
 self.assertIn(inherit, inherits, 'Missing inherit of %s' % inherit)
 
 def _check_bbappend(self, testrecipe, recipefile, appenddir):
-result = runCmd('bitbake-layers show-appends', cwd=self.builddir)
+result = self.runCmd('bitbake-layers show-appends', cwd=self.builddir)
 resultlines = result.output.splitlines()
 inrecipe = False
 bbappends = []
@@ -88,7 +87,7 @@ class DevtoolBase(OESelftestTestCase):
 create_temp_layer(templayerdir, templayername, priority, 
recipepathspec)
 if addlayer:
 self.add_command_to_tearDown('bitbake-layers remove-layer %s || 
true' % templayerdir)
-result = runCmd('bitbake-layers add-layer %s' % templayerdir, 
cwd=self.builddir)
+result = self.runCmd('bitbake-layers add-layer %s' % templayerdir, 
cwd=self.builddir)
 
 def _process_ls_output(self, output):
 """
@@ -114,47 +113,54 @@ class DevtoolBase(OESelftestTestCase):
 return filelist
 
 
-class DevtoolTests(DevtoolBase):
-
+class DevtoolCommon(DevtoolBase):
 @classmethod
 def setUpClass(cls):
-super(DevtoolTests, cls).setUpClass()
-bb_vars = get_bb_vars(['TOPDIR', 'SSTATE_DIR'])
+super(DevtoolCommon, cls).setUpClass()
+bb_vars = cls.get_bb_vars(['TOPDIR', 'SSTATE_DIR'])
 cls.original_sstate = bb_vars['SSTATE_DIR']
 cls.devtool_sstate = os.path.join(bb_vars['TOPDIR'], 'sstate_devtool')
 cls.sstate_conf  = 'SSTATE_DIR = "%s"\n' % cls.devtool_sstate
 cls.sstate_conf += ('SSTATE_MIRRORS += "file://.* file:///%s/PATH"\n'
 % cls.original_sstate)
 
+# XXX: some test cases needs xz-native to unpack like mdadm recipes
+# and it is supposed to be provided
+cls.bitbake("xz-native")
+
 @classmethod
 def tearDownClass(cls):
 cls.logger.debug('Deleting devtool sstate cache on %s' % 
cls.devtool_sstate)
-runCmd('rm -rf %s' % cls.devtool_sstate)
-super(DevtoolTests, cls).tearDownClass()
+cls.runCmd('rm -rf %s' % cls.devtool_sstate)
+super(DevtoolCommon, cls).tearDownClass()
 
 def setUp(self):
 """Test case setup function"""
-super(DevtoolTests, self).setUp()
+super(DevtoolCommon, self).setUp()
 self.workspacedir = os.path.join(self.builddir, 'workspace')
 self.assertTrue(not os.path.exists(self.workspacedir),
 'This test cannot be run with a workspace directory '
 'under the build directory')
 self.append_config(self.sstate_conf)
 
+class DevtoolTests(DevtoolCommon):
+_use_own_builddir = True
+_main_thread = False
+
 def _check_src_repo(self, repo_dir):
 """Check srctree git repository"""
 self.assertTrue(os.path.isdir(os.path.join(repo_dir, '.git')),
 'git repository for external source tree not found')
-result = runCmd('git status --porcelain', cwd=repo_dir)
+result = self.runCmd('git status --porcelain', cwd=repo_dir)
 self.assertEqual(result.output.strip(), "",
  'Created git repo is not clean')
-result = runCmd('git symbolic-ref HEAD', cwd=repo_dir)
+result = self.runCmd('git symbolic-ref HEAD', cwd=repo_dir)
 self.assertEqual(result.output.strip(), "refs/heads/devtool",
  'Wrong branch in git repo')
 
 def _check_repo_status(self, repo_dir, expected_status):
 """Check the worktree status of a 

[OE-core] [PATCHv3 21/30] oeqa/selftest/cases: runtime enable threaded runs

2017-07-17 Thread Aníbal Limón
- Use wrappers from OESelfTestCase for runCmd, bitbake, etc.
- Split into tree modules because runtime_test_export and
runtime_test_postinsts uses runqemu/tinfoil and needs to be
executed into the main thread.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/cases/runtime_test.py   | 225 +
 .../lib/oeqa/selftest/cases/runtime_test_export.py | 104 ++
 .../oeqa/selftest/cases/runtime_test_postinsts.py  | 114 +++
 3 files changed, 226 insertions(+), 217 deletions(-)
 create mode 100644 meta/lib/oeqa/selftest/cases/runtime_test_export.py
 create mode 100644 meta/lib/oeqa/selftest/cases/runtime_test_postinsts.py

diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py 
b/meta/lib/oeqa/selftest/cases/runtime_test.py
index 2a70ae15b81..e45410e0e56 100644
--- a/meta/lib/oeqa/selftest/cases/runtime_test.py
+++ b/meta/lib/oeqa/selftest/cases/runtime_test.py
@@ -1,110 +1,9 @@
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, 
runqemu
 from oeqa.core.decorator.oeid import OETestID
-import os
-import re
-
-class TestExport(OESelftestTestCase):
-
-@classmethod
-def tearDownClass(cls):
-runCmd("rm -rf /tmp/sdk")
-super(TestExport, cls).tearDownClass()
-
-@OETestID(1499)
-def test_testexport_basic(self):
-"""
-Summary: Check basic testexport functionality with only ping test 
enabled.
-Expected: 1. testexport directory must be created.
-  2. runexported.py must run without any error/exception.
-  3. ping test must succeed.
-Product: oe-core
-Author: Mariano Lopez 
-"""
-
-features = 'INHERIT += "testexport"\n'
-# These aren't the actual IP addresses but testexport class needs 
something defined
-features += 'TEST_SERVER_IP = "192.168.7.1"\n'
-features += 'TEST_TARGET_IP = "192.168.7.1"\n'
-features += 'TEST_SUITES = "ping"\n'
-self.write_config(features)
-
-# Build tesexport for core-image-minimal
-bitbake('core-image-minimal')
-bitbake('-c testexport core-image-minimal')
-
-testexport_dir = get_bb_var('TEST_EXPORT_DIR', 'core-image-minimal')
-
-# Verify if TEST_EXPORT_DIR was created
-isdir = os.path.isdir(testexport_dir)
-self.assertEqual(True, isdir, 'Failed to create testexport dir: %s' % 
testexport_dir)
-
-with runqemu('core-image-minimal') as qemu:
-# Attempt to run runexported.py to perform ping test
-test_path = os.path.join(testexport_dir, "oe-test")
-data_file = os.path.join(testexport_dir, 'data', 'testdata.json')
-manifest = os.path.join(testexport_dir, 'data', 'manifest')
-cmd = ("%s runtime --test-data-file %s --packages-manifest %s "
-   "--target-ip %s --server-ip %s --quiet"
-  % (test_path, data_file, manifest, qemu.ip, qemu.server_ip))
-result = runCmd(cmd)
-# Verify ping test was succesful
-self.assertEqual(0, result.status, 'oe-test runtime returned a non 
0 status')
-
-@OETestID(1641)
-def test_testexport_sdk(self):
-"""
-Summary: Check sdk functionality for testexport.
-Expected: 1. testexport directory must be created.
-  2. SDK tarball must exists.
-  3. Uncompressing of tarball must succeed.
-  4. Check if the SDK directory is added to PATH.
-  5. Run tar from the SDK directory.
-Product: oe-core
-Author: Mariano Lopez 
-"""
-
-features = 'INHERIT += "testexport"\n'
-# These aren't the actual IP addresses but testexport class needs 
something defined
-features += 'TEST_SERVER_IP = "192.168.7.1"\n'
-features += 'TEST_TARGET_IP = "192.168.7.1"\n'
-features += 'TEST_SUITES = "ping"\n'
-features += 'TEST_EXPORT_SDK_ENABLED = "1"\n'
-features += 'TEST_EXPORT_SDK_PACKAGES = "nativesdk-tar"\n'
-self.write_config(features)
-
-# Build tesexport for core-image-minimal
-bitbake('core-image-minimal')
-bitbake('-c testexport core-image-minimal')
-
-needed_vars = ['TEST_EXPORT_DIR', 'TEST_EXPORT_SDK_DIR', 
'TEST_EXPORT_SDK_NAME']
-bb_vars = get_bb_vars(needed_vars, 'core-image-minimal')
-testexport_dir = bb_vars['TEST_EXPORT_DIR']
-sdk_dir = bb_vars['TEST_EXPORT_SDK_DIR']
-sdk_name = bb_vars['TEST_EXPORT_SDK_NAME']
-
-# Check for SDK
-tarball_name = "%s.sh" % sdk_name
-tarball_path = os.path.join(testexport_dir, sdk_dir, tarball_name)
-msg = "Couldn't find SDK tarball: %s" % tarball_path
-self.assertEqual(os.path.isfile(tarball_path), True, msg)
-
-# Extract SDK and run 

[OE-core] [PATCHv3 22/30] oeqa/selftest/cases: eSDK enable threaded runs

2017-07-17 Thread Aníbal Limón
- Change some staticmethods to classmethods to be able access
wrappers from OESelfTestCase.
- Remove unused method update_configuration.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/cases/eSDK.py | 64 +---
 1 file changed, 22 insertions(+), 42 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/eSDK.py 
b/meta/lib/oeqa/selftest/cases/eSDK.py
index 60f4e239ab0..fc28e870bec 100644
--- a/meta/lib/oeqa/selftest/cases/eSDK.py
+++ b/meta/lib/oeqa/selftest/cases/eSDK.py
@@ -4,24 +4,25 @@ import os
 import glob
 from oeqa.core.decorator.oeid import OETestID
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
 
 class oeSDKExtSelfTest(OESelftestTestCase):
+_use_own_builddir = True
+_main_thread = False
+
 """
 # Bugzilla Test Plan: 6033
 # This code is planned to be part of the automation for eSDK containig
 # Install libraries and headers, image generation binary feeds, sdk-update.
 """
-
-@staticmethod
-def get_esdk_environment(env_eSDK, tmpdir_eSDKQA):
+@classmethod
+def get_esdk_environment(cls, env_eSDK, tmpdir_eSDKQA):
 # XXX: at this time use the first env need to investigate
 # what environment load oe-selftest, i586, x86_64
 pattern = os.path.join(tmpdir_eSDKQA, 'environment-setup-*')
 return glob.glob(pattern)[0]
 
-@staticmethod
-def run_esdk_cmd(env_eSDK, tmpdir_eSDKQA, cmd, postconfig=None, **options):
+@classmethod
+def run_esdk_cmd(cls, env_eSDK, tmpdir_eSDKQA, cmd, postconfig=None, 
**options):
 if postconfig:
 esdk_conf_file = os.path.join(tmpdir_eSDKQA, 'conf', 'local.conf')
 with open(esdk_conf_file, 'a+') as f:
@@ -31,57 +32,37 @@ class oeSDKExtSelfTest(OESelftestTestCase):
 if not 'shell' in options:
 options['shell'] = True
 
-runCmd("cd %s; . %s; %s" % (tmpdir_eSDKQA, env_eSDK, cmd), **options)
+cls.runCmd("cd %s; . %s; %s" % (tmpdir_eSDKQA, env_eSDK, cmd), 
**options)
 
-@staticmethod
-def generate_eSDK(image):
+@classmethod
+def generate_eSDK(cls, image):
 pn_task = '%s -c populate_sdk_ext' % image
-bitbake(pn_task)
+cls.bitbake(pn_task)
 
-@staticmethod
-def get_eSDK_toolchain(image):
+@classmethod
+def get_eSDK_toolchain(cls, image):
 pn_task = '%s -c populate_sdk_ext' % image
 
-bb_vars = get_bb_vars(['SDK_DEPLOY', 'TOOLCHAINEXT_OUTPUTNAME'], 
pn_task)
+bb_vars = cls.get_bb_vars(['SDK_DEPLOY', 'TOOLCHAINEXT_OUTPUTNAME'], 
pn_task)
 sdk_deploy = bb_vars['SDK_DEPLOY']
 toolchain_name = bb_vars['TOOLCHAINEXT_OUTPUTNAME']
 return os.path.join(sdk_deploy, toolchain_name + '.sh')
 
-@staticmethod
-def update_configuration(cls, image, tmpdir_eSDKQA, env_eSDK, 
ext_sdk_path):
-sstate_dir = os.path.join(cls.builddir, 'sstate-cache')
-
-oeSDKExtSelfTest.generate_eSDK(cls.image)
-
-cls.ext_sdk_path = oeSDKExtSelfTest.get_eSDK_toolchain(cls.image)
-runCmd("%s -y -d \"%s\"" % (cls.ext_sdk_path, cls.tmpdir_eSDKQA))
-
-cls.env_eSDK = oeSDKExtSelfTest.get_esdk_environment('', 
cls.tmpdir_eSDKQA)
-
-sstate_config="""
-SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"
-SSTATE_MIRRORS =  "file://.* file://%s/PATH"
-CORE_IMAGE_EXTRA_INSTALL = "perl"
-""" % sstate_dir
-
-with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') 
as f:
-f.write(sstate_config)
-
 @classmethod
 def setUpClass(cls):
 super(oeSDKExtSelfTest, cls).setUpClass()
 cls.tmpdir_eSDKQA = tempfile.mkdtemp(prefix='eSDKQA')
 
-sstate_dir = get_bb_var('SSTATE_DIR')
+sstate_dir = cls.get_bb_var('SSTATE_DIR')
 
 cls.image = 'core-image-minimal'
-oeSDKExtSelfTest.generate_eSDK(cls.image)
+cls.generate_eSDK(cls.image)
 
 # Install eSDK
-cls.ext_sdk_path = oeSDKExtSelfTest.get_eSDK_toolchain(cls.image)
-runCmd("%s -y -d \"%s\"" % (cls.ext_sdk_path, cls.tmpdir_eSDKQA))
+cls.ext_sdk_path = cls.get_eSDK_toolchain(cls.image)
+cls.runCmd("%s -y -d \"%s\"" % (cls.ext_sdk_path, cls.tmpdir_eSDKQA))
 
-cls.env_eSDK = oeSDKExtSelfTest.get_esdk_environment('', 
cls.tmpdir_eSDKQA)
+cls.env_eSDK = cls.get_esdk_environment('', cls.tmpdir_eSDKQA)
 
 # Configure eSDK to use sstate mirror from poky
 sstate_config="""
@@ -99,13 +80,12 @@ SSTATE_MIRRORS =  "file://.* file://%s/PATH"
 @OETestID(1602)
 def test_install_libraries_headers(self):
 pn_sstate = 'bc'
-bitbake(pn_sstate)
+self.bitbake(pn_sstate)
 cmd = "devtool sdk-install %s " % pn_sstate
-oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
+self.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
 
  

[OE-core] [PATCHv3 20/30] oeqa/selftest/cases: runqemu enable threaded runs

2017-07-17 Thread Aníbal Limón
- Update to use wrappers {bitbake,get_bb_var} from OESelftestTestCase class.
- Run into the main thread because it needs tinfoil to run.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/cases/runqemu.py | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py 
b/meta/lib/oeqa/selftest/cases/runqemu.py
index 4050a4123ba..e30cb24046f 100644
--- a/meta/lib/oeqa/selftest/cases/runqemu.py
+++ b/meta/lib/oeqa/selftest/cases/runqemu.py
@@ -6,12 +6,11 @@ import re
 import logging
 
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import bitbake, runqemu, get_bb_var
+from oeqa.utils.commands import runqemu
 from oeqa.core.decorator.oeid import OETestID
 
 class RunqemuTests(OESelftestTestCase):
 """Runqemu test class"""
-
 image_is_ready = False
 deploy_dir_image = ''
 
@@ -37,8 +36,8 @@ SYSLINUX_TIMEOUT = "10"
 )
 
 if not RunqemuTests.image_is_ready:
-RunqemuTests.deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
-bitbake(self.recipe)
+RunqemuTests.deploy_dir_image = self.get_bb_var('DEPLOY_DIR_IMAGE')
+self.bitbake(self.recipe)
 RunqemuTests.image_is_ready = True
 
 @OETestID(2001)
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 27/30] seltest/cases/devtool: Build dbus on test_devtool_add_git_local

2017-07-17 Thread Aníbal Limón
The dbus-wait recipe has the dependency of dbus, due to now we have
build folder per test class the dependency needs to be build before
run devtool add because without it the DEPENDS field is unset.

The devtool/recipetool uses previously build recipes to figure out
the dependencies.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/cases/devtool.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index 44ba361f16c..c5ca95022bb 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -248,6 +248,8 @@ class DevtoolTests(DevtoolCommon):
 # Test devtool add
 self.track_for_cleanup(self.workspacedir)
 self.add_command_to_tearDown('bitbake-layers remove-layer %s' % 
self.workspacedir)
+# dbus needs to be built because is a dependency of dbus-wait
+self.bitbake('dbus')
 # Don't specify a name since we should be able to auto-detect it
 result = self.runCmd('devtool add %s' % srcdir)
 self.assertExists(os.path.join(self.workspacedir, 'conf', 
'layer.conf'), 'Workspace directory not created')
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 19/30] oeqa/selftest/cases: imagefeatures enable threaded runs

2017-07-17 Thread Aníbal Limón
- Change to use wrapper methos from OESelfTestCase.
- Move tests that use runqemu to its own module because
  it needs tinfoil and run in the main thread.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/cases/imagefeatures.py  | 78 +++---
 meta/lib/oeqa/selftest/cases/imagefeatures_boot.py | 63 +
 2 files changed, 73 insertions(+), 68 deletions(-)
 create mode 100644 meta/lib/oeqa/selftest/cases/imagefeatures_boot.py

diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py 
b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 91d8e9b5017..7a8e00605b1 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -1,69 +1,11 @@
+import os
+
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
 from oeqa.core.decorator.oeid import OETestID
-from oeqa.utils.sshcontrol import SSHControl
-import os
 
 class ImageFeatures(OESelftestTestCase):
-
-test_user = 'tester'
-root_user = 'root'
-
-@OETestID(1107)
-def test_non_root_user_can_connect_via_ssh_without_password(self):
-"""
-Summary: Check if non root user can connect via ssh without password
-Expected: 1. Connection to the image via ssh using root user without 
providing a password should be allowed.
-  2. Connection to the image via ssh using tester user without 
providing a password should be allowed.
-Product: oe-core
-Author: Ionut Chisanovici 
-AutomatedBy: Daniel Istrate 
-"""
-
-features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh 
empty-root-password allow-empty-password"\n'
-features += 'INHERIT += "extrausers"\n'
-features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s 
/bin/sh {};"'.format(self.test_user, self.test_user)
-self.write_config(features)
-
-# Build a core-image-minimal
-bitbake('core-image-minimal')
-
-with runqemu("core-image-minimal") as qemu:
-# Attempt to ssh with each user into qemu with empty password
-for user in [self.root_user, self.test_user]:
-ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user=user)
-status, output = ssh.run("true")
-self.assertEqual(status, 0, 'ssh to user %s failed with %s' % 
(user, output))
-
-@OETestID(1115)
-def test_all_users_can_connect_via_ssh_without_password(self):
-"""
-Summary: Check if all users can connect via ssh without password
-Expected: 1. Connection to the image via ssh using root user without 
providing a password should NOT be allowed.
-  2. Connection to the image via ssh using tester user without 
providing a password should be allowed.
-Product: oe-core
-Author:  Ionut Chisanovici 
-AutomatedBy: Daniel Istrate 
-"""
-
-features = 'EXTRA_IMAGE_FEATURES = "ssh-server-openssh 
allow-empty-password"\n'
-features += 'INHERIT += "extrausers"\n'
-features += 'EXTRA_USERS_PARAMS = "useradd -p \'\' {}; usermod -s 
/bin/sh {};"'.format(self.test_user, self.test_user)
-self.write_config(features)
-
-# Build a core-image-minimal
-bitbake('core-image-minimal')
-
-with runqemu("core-image-minimal") as qemu:
-# Attempt to ssh with each user into qemu with empty password
-for user in [self.root_user, self.test_user]:
-ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user=user)
-status, output = ssh.run("true")
-if user == 'root':
-self.assertNotEqual(status, 0, 'ssh to user root was 
allowed when it should not have been')
-else:
-self.assertEqual(status, 0, 'ssh to user tester failed 
with %s' % output)
-
+_use_own_builddir = True
+_main_thread = False
 
 @OETestID(1116)
 def test_clutter_image_can_be_built(self):
@@ -76,7 +18,7 @@ class ImageFeatures(OESelftestTestCase):
 """
 
 # Build a core-image-clutter
-bitbake('core-image-clutter')
+self.bitbake('core-image-clutter')
 
 @OETestID(1117)
 def test_wayland_support_in_image(self):
@@ -89,12 +31,12 @@ class ImageFeatures(OESelftestTestCase):
 AutomatedBy: Daniel Istrate 
 """
 
-distro_features = get_bb_var('DISTRO_FEATURES')
+distro_features = self.get_bb_var('DISTRO_FEATURES')
 if not ('opengl' in distro_features and 'wayland' in distro_features):
 self.skipTest('neither opengl nor wayland present on 
DISTRO_FEATURES so core-image-weston cannot be built')
 
 # Build a 

[OE-core] [PATCHv3 18/30] oeqa/selftest/cases: Use wrapper methods from OESelfTestCase class and enable threaded runs

2017-07-17 Thread Aníbal Limón
In order to support threaded runs in oe-selftest cases, there is a need
to use wrapper methods that takes into account the current builddir
by Test class.

Signed-off-by: Aníbal Limón 
---
 .../lib/oeqa/selftest/cases/_sstatetests_noauto.py |  16 ++--
 meta/lib/oeqa/selftest/cases/archiver.py   |  21 +++--
 meta/lib/oeqa/selftest/cases/bblayers.py   |  45 -
 meta/lib/oeqa/selftest/cases/bbtests.py| 101 +++--
 meta/lib/oeqa/selftest/cases/buildhistory.py   |   9 +-
 meta/lib/oeqa/selftest/cases/buildoptions.py   |  58 +++-
 meta/lib/oeqa/selftest/cases/containerimage.py |   9 +-
 meta/lib/oeqa/selftest/cases/distrodata.py |   7 +-
 meta/lib/oeqa/selftest/cases/image_typedep.py  |   8 +-
 meta/lib/oeqa/selftest/cases/layerappend.py|  22 ++---
 meta/lib/oeqa/selftest/cases/liboe.py  |  13 +--
 meta/lib/oeqa/selftest/cases/lic_checksum.py   |   8 +-
 meta/lib/oeqa/selftest/cases/manifest.py   |  13 +--
 meta/lib/oeqa/selftest/cases/oelib/buildhistory.py |   7 +-
 meta/lib/oeqa/selftest/cases/oescripts.py  |   5 +-
 meta/lib/oeqa/selftest/cases/package.py|  10 +-
 meta/lib/oeqa/selftest/cases/pkgdata.py|  73 +++
 meta/lib/oeqa/selftest/cases/prservice.py  |  19 ++--
 meta/lib/oeqa/selftest/cases/selftest.py   |   2 +
 meta/lib/oeqa/selftest/cases/signing.py|  40 
 meta/lib/oeqa/selftest/cases/sstate.py |   5 +-
 meta/lib/oeqa/selftest/cases/sstatetests.py|  51 ++-
 22 files changed, 284 insertions(+), 258 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py 
b/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
index 98b8b60f51a..08e71f33526 100644
--- a/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
+++ b/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
@@ -2,19 +2,15 @@ import os
 import shutil
 
 import oeqa.utils.ftools as ftools
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 from oeqa.selftest.cases.sstate import SStateBase
 
-
 class RebuildFromSState(SStateBase):
-
-@classmethod
-def setUpClass(self):
-super(RebuildFromSState, self).setUpClass()
+_use_own_builddir = True
+_main_thread = False
 
 def get_dep_targets(self, primary_targets):
 found_targets = []
-bitbake("-g " + ' '.join(map(str, primary_targets)))
+self.bitbake("-g " + ' '.join(map(str, primary_targets)))
 with open(os.path.join(self.builddir, 'pn-buildlist'), 'r') as pnfile:
 found_targets = pnfile.read().splitlines()
 return found_targets
@@ -59,7 +55,7 @@ class RebuildFromSState(SStateBase):
 rebuild_targets = primary_targets
 
 self.configure_builddir(buildA)
-runCmd((". %s/oe-init-build-env %s && " % (get_bb_var('COREBASE'), 
buildA)) + 'bitbake  ' + ' '.join(map(str, primary_targets)), shell=True, 
executable='/bin/bash')
+self.runCmd((". %s/oe-init-build-env %s && " % 
(self.get_bb_var('COREBASE'), buildA)) + 'bitbake  ' + ' '.join(map(str, 
primary_targets)), shell=True, executable='/bin/bash')
 self.hardlink_tree(os.path.join(buildA, 'sstate-cache'), 
os.path.join(self.builddir, 'sstate-cache-buildA'))
 shutil.rmtree(buildA)
 
@@ -69,13 +65,13 @@ class RebuildFromSState(SStateBase):
 self.configure_builddir(buildB)
 self.hardlink_tree(os.path.join(self.builddir, 
'sstate-cache-buildA'), os.path.join(buildB, 'sstate-cache'))
 
-result_cleansstate = runCmd((". %s/oe-init-build-env %s && " % 
(get_bb_var('COREBASE'), buildB)) + 'bitbake -ccleansstate ' + target, 
ignore_status=True, shell=True, executable='/bin/bash')
+result_cleansstate = self.runCmd((". %s/oe-init-build-env %s && " 
% (self.get_bb_var('COREBASE'), buildB)) + 'bitbake -ccleansstate ' + target, 
ignore_status=True, shell=True, executable='/bin/bash')
 if not result_cleansstate.status == 0:
 failed_cleansstate.append(target)
 shutil.rmtree(buildB)
 continue
 
-result_build = runCmd((". %s/oe-init-build-env %s && " % 
(get_bb_var('COREBASE'), buildB)) + 'bitbake ' + target, ignore_status=True, 
shell=True, executable='/bin/bash')
+result_build = self.runCmd((". %s/oe-init-build-env %s && " % 
(self.get_bb_var('COREBASE'), buildB)) + 'bitbake ' + target, 
ignore_status=True, shell=True, executable='/bin/bash')
 if not result_build.status == 0:
 failed_rebuild.append(target)
 
diff --git a/meta/lib/oeqa/selftest/cases/archiver.py 
b/meta/lib/oeqa/selftest/cases/archiver.py
index 72026d573cc..347d0a8a5f5 100644
--- a/meta/lib/oeqa/selftest/cases/archiver.py
+++ b/meta/lib/oeqa/selftest/cases/archiver.py
@@ -1,10 +1,11 @@
 import os
 import glob
-from oeqa.utils.commands import bitbake, 

[OE-core] [PATCHv3 15/30] oeqa/selftest/case: Support bitbake memres mode in per build directory

2017-07-17 Thread Aníbal Limón
If BBSERVER is set on the environment the bitbake is set to be used
as a memres, so starts an bitbake server per TestClass.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/case.py | 9 +
 1 file changed, 9 insertions(+)

diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index c6f2d184ea3..d98a3760415 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -97,6 +97,12 @@ class OESelftestTestCase(OETestCase):
 cls.runCmd("git init; git add *; git commit -a -m 'initial'",
 cwd=cls.testlayer_path)
 
+if cls._use_own_builddir and 'BBSERVER' in os.environ:
+env = os.environ.copy()
+del env['BBSERVER']
+result = cls.runCmd('bitbake --server-only -t xmlrpc -B 
localhost:-1',
+env=env)
+
 # XXX: sometimes meta-selftest isn't on bblayers at first backup
 try:
 cls.runCmd("bitbake-layers remove-layer %s" % 
cls.orig_testlayer_path)
@@ -119,6 +125,9 @@ class OESelftestTestCase(OETestCase):
 
 @classmethod
 def tearDownClass(cls):
+if cls._use_own_builddir and 'BBSERVER' in os.environ:
+cls.runCmd('bitbake --kill-server')
+
 cls.remove_include()
 cls.remove_inc_files()
 super(OESelftestTestCase, cls).tearDownClass()
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 09/30] oeqa/core/threaded: logSummary add skipped tests info

2017-07-17 Thread Aníbal Limón
Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/core/threaded.py | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/meta/lib/oeqa/core/threaded.py b/meta/lib/oeqa/core/threaded.py
index a7dc0aed401..022c9ac59a2 100644
--- a/meta/lib/oeqa/core/threaded.py
+++ b/meta/lib/oeqa/core/threaded.py
@@ -234,6 +234,14 @@ class OETestResultThreaded(object):
 self._results[tid]['result'].wasSuccessful()
 return wasSuccessful
 
+def getSkippedTests(self):
+skipped = 0
+
+for tid in self._results.keys():
+skipped = skipped + len(self.tc._results[tid]['skipped'])
+
+return skipped
+
 def stop(self):
 for tid in self._results.keys():
 self._results[tid]['result'].stop()
@@ -248,6 +256,9 @@ class OETestResultThreaded(object):
 msg = "%s - OK - All required tests passed" % component
 else:
 msg = "%s - FAIL - Required tests failed" % component
+skipped = self.getSkippedTests()
+if skipped:
+msg += " (skipped=%d)" % skipped
 self.tc.logger.info(msg)
 
 def logDetails(self):
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 16/30] oeqa/selftest/cases: Use testlayer_path instead of call get_test_layer()

2017-07-17 Thread Aníbal Limón
The testlayer_path is set at init of selftest so isn't need to call
every time get_test_layer to get it.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py | 2 +-
 meta/lib/oeqa/selftest/cases/devtool.py | 4 ++--
 meta/lib/oeqa/selftest/cases/oescripts.py   | 2 +-
 meta/lib/oeqa/selftest/cases/sstate.py  | 2 +-
 meta/lib/oeqa/selftest/cases/sstatetests.py | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py 
b/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
index 0e5896234c3..b42aa3638d5 100644
--- a/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
+++ b/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
@@ -2,7 +2,7 @@ import os
 import shutil
 
 import oeqa.utils.ftools as ftools
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 from oeqa.selftest.cases.sstate import SStateBase
 
 
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py 
b/meta/lib/oeqa/selftest/cases/devtool.py
index 88d69724f93..28c84679a17 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -8,7 +8,7 @@ import fnmatch
 import oeqa.utils.ftools as ftools
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, create_temp_layer
-from oeqa.utils.commands import get_bb_vars, runqemu, get_test_layer
+from oeqa.utils.commands import get_bb_vars, runqemu
 from oeqa.core.decorator.oeid import OETestID
 
 class DevtoolBase(OESelftestTestCase):
@@ -1530,7 +1530,7 @@ class DevtoolTests(DevtoolBase):
 # Ensure the recipe is where we think it should be (so that cleanup 
doesn't trash things)
 self.assertIn('/meta/', recipedir)
 relpth = os.path.relpath(recipedir, 
os.path.join(get_bb_var('COREBASE'), 'meta'))
-appenddir = os.path.join(get_test_layer(), relpth)
+appenddir = os.path.join(self.testlayer_path, relpth)
 self.track_for_cleanup(appenddir)
 # Try finish to the original layer
 self.add_command_to_tearDown('rm -rf %s ; cd %s ; git checkout %s' % 
(recipedir, os.path.dirname(recipedir), recipedir))
diff --git a/meta/lib/oeqa/selftest/cases/oescripts.py 
b/meta/lib/oeqa/selftest/cases/oescripts.py
index 1ee753763ec..f7fe200cfac 100644
--- a/meta/lib/oeqa/selftest/cases/oescripts.py
+++ b/meta/lib/oeqa/selftest/cases/oescripts.py
@@ -1,6 +1,6 @@
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.selftest.cases.buildhistory import BuildhistoryBase
-from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, 
get_test_layer
+from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var
 from oeqa.core.decorator.oeid import OETestID
 
 class BuildhistoryDiffTests(BuildhistoryBase):
diff --git a/meta/lib/oeqa/selftest/cases/sstate.py 
b/meta/lib/oeqa/selftest/cases/sstate.py
index bc2fdbd8ccb..b8c2880ad06 100644
--- a/meta/lib/oeqa/selftest/cases/sstate.py
+++ b/meta/lib/oeqa/selftest/cases/sstate.py
@@ -6,7 +6,7 @@ import shutil
 
 import oeqa.utils.ftools as ftools
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_vars, get_test_layer
+from oeqa.utils.commands import runCmd, bitbake, get_bb_vars
 
 
 class SStateBase(OESelftestTestCase):
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py 
b/meta/lib/oeqa/selftest/cases/sstatetests.py
index 07a206824aa..4617d16d212 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -4,7 +4,7 @@ import glob
 import subprocess
 
 from oeqa.selftest.case import OESelftestTestCase
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 from oeqa.selftest.cases.sstate import SStateBase
 from oeqa.core.decorator.oeid import OETestID
 
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 17/30] oeqa/selftest/cases: Use builddir from class instead of get from environment

2017-07-17 Thread Aníbal Limón
Now the build directory is setup by Test class, so the builddir attr
points to the actual BUILDDIR instead of get from environment.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py | 7 +++
 meta/lib/oeqa/selftest/cases/bbtests.py | 4 ++--
 meta/lib/oeqa/selftest/cases/eSDK.py| 2 +-
 meta/lib/oeqa/selftest/cases/signing.py | 2 +-
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py 
b/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
index b42aa3638d5..98b8b60f51a 100644
--- a/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
+++ b/meta/lib/oeqa/selftest/cases/_sstatetests_noauto.py
@@ -11,7 +11,6 @@ class RebuildFromSState(SStateBase):
 @classmethod
 def setUpClass(self):
 super(RebuildFromSState, self).setUpClass()
-self.builddir = os.path.join(os.environ.get('BUILDDIR'))
 
 def get_dep_targets(self, primary_targets):
 found_targets = []
@@ -24,16 +23,16 @@ class RebuildFromSState(SStateBase):
 os.mkdir(builddir)
 self.track_for_cleanup(builddir)
 os.mkdir(os.path.join(builddir, 'conf'))
-shutil.copyfile(os.path.join(os.environ.get('BUILDDIR'), 
'conf/local.conf'), os.path.join(builddir, 'conf/local.conf'))
+shutil.copyfile(self.localconf_path, os.path.join(builddir, 
'conf/local.conf'))
 config = {}
 config['default_sstate_dir'] = "SSTATE_DIR ?= 
\"${TOPDIR}/sstate-cache\""
 config['null_sstate_mirrors'] = "SSTATE_MIRRORS = \"\""
 config['default_tmp_dir'] = "TMPDIR = \"${TOPDIR}/tmp\""
 for key in config:
 ftools.append_file(os.path.join(builddir, 'conf/selftest.inc'), 
config[key])
-shutil.copyfile(os.path.join(os.environ.get('BUILDDIR'), 
'conf/bblayers.conf'), os.path.join(builddir, 'conf/bblayers.conf'))
+shutil.copyfile(self.local_bblayers_path, os.path.join(builddir, 
'conf/bblayers.conf'))
 try:
-shutil.copyfile(os.path.join(os.environ.get('BUILDDIR'), 
'conf/auto.conf'), os.path.join(builddir, 'conf/auto.conf'))
+shutil.copyfile(self.autoconf_path, os.path.join(builddir, 
'conf/auto.conf'))
 except:
 pass
 
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py 
b/meta/lib/oeqa/selftest/cases/bbtests.py
index 4c82049032b..df11a6bc6d0 100644
--- a/meta/lib/oeqa/selftest/cases/bbtests.py
+++ b/meta/lib/oeqa/selftest/cases/bbtests.py
@@ -22,8 +22,8 @@ class BitbakeTests(OESelftestTestCase):
 @OETestID(790)
 def test_run_bitbake_from_dir_2(self):
 my_env = os.environ.copy()
-my_env['BBPATH'] = my_env['BUILDDIR']
-os.chdir(os.path.dirname(os.environ['BUILDDIR']))
+my_env['BBPATH'] = self.builddir
+os.chdir(os.path.dirname(self.builddir))
 self.assertEqual(bitbake('-e', env=my_env).status, 0, msg = "bitbake 
couldn't run from builddir")
 
 @OETestID(806)
diff --git a/meta/lib/oeqa/selftest/cases/eSDK.py 
b/meta/lib/oeqa/selftest/cases/eSDK.py
index f36c3ccd3b4..60f4e239ab0 100644
--- a/meta/lib/oeqa/selftest/cases/eSDK.py
+++ b/meta/lib/oeqa/selftest/cases/eSDK.py
@@ -49,7 +49,7 @@ class oeSDKExtSelfTest(OESelftestTestCase):
 
 @staticmethod
 def update_configuration(cls, image, tmpdir_eSDKQA, env_eSDK, 
ext_sdk_path):
-sstate_dir = os.path.join(os.environ['BUILDDIR'], 'sstate-cache')
+sstate_dir = os.path.join(cls.builddir, 'sstate-cache')
 
 oeSDKExtSelfTest.generate_eSDK(cls.image)
 
diff --git a/meta/lib/oeqa/selftest/cases/signing.py 
b/meta/lib/oeqa/selftest/cases/signing.py
index edb5f653f20..6ef8d8eb5d0 100644
--- a/meta/lib/oeqa/selftest/cases/signing.py
+++ b/meta/lib/oeqa/selftest/cases/signing.py
@@ -105,7 +105,7 @@ class Signing(OESelftestTestCase):
 
 test_recipe = 'ed'
 
-builddir = os.environ.get('BUILDDIR')
+builddir = self.builddir
 sstatedir = os.path.join(builddir, 'test-sstate')
 
 self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 08/30] oeqa/core/threaded: Add support to run into a thread at end of execution

2017-07-17 Thread Aníbal Limón
Some test cases aren't allowed to run into a multi-thread environment so
add the posibility to run those tests at end of execution.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/core/threaded.py | 102 +++--
 1 file changed, 78 insertions(+), 24 deletions(-)

diff --git a/meta/lib/oeqa/core/threaded.py b/meta/lib/oeqa/core/threaded.py
index 34217f1a8b8..a7dc0aed401 100644
--- a/meta/lib/oeqa/core/threaded.py
+++ b/meta/lib/oeqa/core/threaded.py
@@ -30,18 +30,35 @@ class OETestLoaderThreaded(OETestLoader):
 suites = {}
 suites['main'] = self.suiteClass()
 suites['pool'] = []
+suites['end'] = self.suiteClass()
 for _ in range(self.process_num - 1):
 suites['pool'].append(self.suiteClass())
 
+def _add_by_module_or_dep(suite, case, depends):
+"""
+A test case that needs to run into the same thread
+because is on the same module or for dependency
+reasons.
+"""
+
+for c in suite._tests:
+if case.__module__ == c.__module__:
+suite.addTest(case)
+return True
+
+if case.id() in depends:
+case_depends = depends[case.id()]
+for c in suite._tests:
+if c.id() in case_depends:
+suite.addTest(case)
+return True
+
+return False
+
 def _add_to_main_thread(main_suite, case, depends):
 """
 Some test cases needs to be run into the main
-thread for several resons.
-
-A test case that needs to run in the main thread
-can be for specific set via test class _main_thread
-attr or because is on the same module or for a dependency
-reason.
+thread by request.
 """
 
 if hasattr(case.__class__, '_main_thread') and \
@@ -50,19 +67,20 @@ class OETestLoaderThreaded(OETestLoader):
 main_suite.addTest(case)
 return True
 
-for c in main_suite._tests:
-if case.__module__ == c.__module__:
-main_suite.addTest(case)
-return True
+return _add_by_module_or_dep(main_suite, case, depends)
 
-if case.id() in depends:
-case_depends = depends[case.id()]
-for c in main_suite._tests:
-if c.id() in case_depends:
-main_suite.addTest(case)
-return True
+def _add_to_end_thread(end_suite, case, depends):
+"""
+Some test cases needs to be run into at end of
+execution into the main by request.
+"""
+if hasattr(case.__class__, '_end_thread') and \
+case.__class__._end_thread or \
+self.process_num == 1:
+end_suite.addTest(case)
+return True
 
-return False
+return _add_by_module_or_dep(end_suite, case, depends)
 
 def _search_for_module_idx(suites, case):
 """
@@ -112,6 +130,9 @@ class OETestLoaderThreaded(OETestLoader):
 if 'depends' in self.tc._registry:
 depends = self.tc._registry['depends']
 
+if _add_to_end_thread(suites['end'], case, depends):
+continue
+
 if _add_to_main_thread(suites['main'], case, depends):
 continue
 
@@ -135,7 +156,7 @@ class OETestLoaderThreaded(OETestLoader):
 
 # if the main suite doesn't have test cases
 # use the first element of the suites pool
-if not len(suites['main']._tests):
+if not len(suites['main']._tests) and len(suites['pool']):
 suites['main'] = suites['pool'].pop(0)
 
 return suites
@@ -268,6 +289,12 @@ class _ThreadedPool:
 self.tasks = queue.Queue(num_tasks)
 self.workers = []
 
+self.stream = stream
+self.result = result
+
+self.end_task = None
+self.end_worker = None
+
 for _ in range(num_workers):
 worker = _Worker(self.tasks, result, stream)
 self.workers.append(worker)
@@ -280,12 +307,25 @@ class _ThreadedPool:
 """Add a task to the queue"""
 self.tasks.put((func, args, kargs))
 
+def add_end_task(self, func, *args, **kwargs):
+"""Add a task to be executed at end"""
+
+self.end_task = queue.Queue(1)
+self.end_task.put((func, args, kwargs))
+self.end_worker = _Worker(self.end_task, self.result,
+self.stream)
+
 def wait_completion(self):
 """Wait for completion of all the tasks in the queue"""
 self.tasks.join()

[OE-core] [PATCHv3 10/30] oeqa/core/tests: Update test_loader threaded to cover main thread usage

2017-07-17 Thread Aníbal Limón
Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/core/tests/test_loader.py | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/meta/lib/oeqa/core/tests/test_loader.py 
b/meta/lib/oeqa/core/tests/test_loader.py
index e0d917d317d..c4d5eeb462b 100755
--- a/meta/lib/oeqa/core/tests/test_loader.py
+++ b/meta/lib/oeqa/core/tests/test_loader.py
@@ -88,25 +88,28 @@ class TestLoader(TestBase):
 self.cases_path = [os.path.join(self.cases_path, 'loader', 'threaded')]
 
 tc = self._testLoaderThreaded()
-self.assertEqual(len(tc.suites), 3, "Expected to be 3 suites")
+self.assertTrue(len(tc.suites['main']._tests),
+"Expected to have tests in main suite")
+self.assertEqual(len(tc.suites['pool']), 2,
+"Expected to be 2 suites in pool")
 
 case_ids = ['threaded.ThreadedTest.test_threaded_no_depends',
 'threaded.ThreadedTest2.test_threaded_same_module',
 'threaded_depends.ThreadedTest3.test_threaded_depends']
-for case in tc.suites[0]._tests:
+for case in tc.suites['main']._tests:
 self.assertEqual(case.id(),
-case_ids[tc.suites[0]._tests.index(case)])
+case_ids[tc.suites['main']._tests.index(case)])
 
 case_ids = ['threaded_alone.ThreadedTestAlone.test_threaded_alone']
-for case in tc.suites[1]._tests:
+for case in tc.suites['pool'][0]._tests:
 self.assertEqual(case.id(),
-case_ids[tc.suites[1]._tests.index(case)])
+case_ids[tc.suites['pool'][0]._tests.index(case)])
 
 case_ids = ['threaded_module.ThreadedTestModule.test_threaded_module',
 'threaded_module.ThreadedTestModule2.test_threaded_module2']
-for case in tc.suites[2]._tests:
+for case in tc.suites['pool'][1]._tests:
 self.assertEqual(case.id(),
-case_ids[tc.suites[2]._tests.index(case)])
+case_ids[tc.suites['pool'][1]._tests.index(case)])
 
 self.cases_path = cases_path
 
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 00/30] oeqa core and oe-selftest threaded enablement

2017-07-17 Thread Aníbal Limón
This v3 makes changes on tinfoil busy status patch and adds an
environment variable to oe-seltest script to specify number of threads. 
There are patches for bitbake [3] and meta-yocto-bsp [4] that was send
to their specific ML.

The first 6 patches previous enable support of threads in oeqa core
are independent and can be merged first.

The v2 address comments did by Patrick about add better explanation
on the commit messages and some typos.

Other interesting information to add is that with this series we will
able to execute oe-selftest in around half [1] of the original time [2],
(9406.782s vs 17303.014s).

[1] https://bugzilla.yoctoproject.org/attachment.cgi?id=3863
[2] https://bugzilla.yoctoproject.org/attachment.cgi?id=3864
[3] http://lists.openembedded.org/pipermail/bitbake-devel/2017-July/008794.html
[4] https://lists.yoctoproject.org/pipermail/yocto/2017-July/037140.html

This series is to enable oe-selftest threaded runs along some fixes,

* Implementation of main/end thread usage in oeqa threaded
* Adaptation of oe-selftest cases to be able to run in threaded env,
  ** Usage of own build directory by Test class.
  ** Mark the test modules that are enabled to run into a thread.
  ** Split some test modules because aren't support run into a thread
 due to bitbake/tinfoil constraints.

The oe-selftest script now has an cmdline option (-t) to enable threaded
runs, by default is set to 1, this needs to be set manually because 
depending on HW resources available can cause ran out of cpu/memory.

By default the oe-selftest cases runs on the main thread and uses
the main build directory for compatibility purposes.

The following changes since commit a4f2bf37b7eac888f37f11cd4d4606436909c507:

  mpc8315e-rdb: add wic.bmap to IMAGE_FSTYPES (2017-07-17 15:14:27 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib alimon/oe_selftest_threaded
  
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=alimon/oe_selftest_threaded

Aníbal Limón (30):
  oeqa/core/loader: Generate function _make_failed_test dynamically
  selftest/cases/package: Call parent setUpClass method
  oeqa/selftest/{context,case}: Handle KeyboardInterrupt/SIGINT and
SIGTERM
  bb/server/process: Handle EINTR on idle_commands select
  bb/tinfoil: run_command handle busy status in bitbake server
  oe/copy_buildsystem: check_sstate_task_list also pop BBPATH from env
  oeqa/core/threaded: Enable support to use the main thread
  oeqa/core/threaded: Add support to run into a thread at end of
execution
  oeqa/core/threaded: logSummary add skipped tests info
  oeqa/core/tests: Update test_loader threaded to cover main thread
usage
  oeqa/selftest/{case,context}: Add builddir by test class and context
  oeqa/selftest/case: Add wrappers to utils.commands modules
  oeqa/selftest/case: Creates meta-selftest layer per class
  oeqa/selftest/case: tearDown extra commands print what actually fails
  oeqa/selftest/case: Support bitbake memres mode in per build directory
  oeqa/selftest/cases: Use testlayer_path instead of call
get_test_layer()
  oeqa/selftest/cases: Use builddir from class instead of get from
environment
  oeqa/selftest/cases: Use wrapper methods from OESelfTestCase class and
enable threaded runs
  oeqa/selftest/cases: imagefeatures enable threaded runs
  oeqa/selftest/cases: runqemu enable threaded runs
  oeqa/selftest/cases: runtime enable threaded runs
  oeqa/selftest/cases: eSDK enable threaded runs
  oeqa/selftest/cases: devtool enable threaded runs
  oeqa/selftest/cases: recipetool enable for threaded runs
  oeqa/selftest/cases: Move devtool deploy test case to own module
  selftest/cases/devtool{,end}: Move update/finish_modify tests to its
own module
  seltest/cases/devtool: Build dbus on test_devtool_add_git_local
  argparse_oe: Add int_positive type
  oeqa/selftest/context: Enable support for threaded runs
  oeqa/selftest/cases: systemd_boot enable threaded runs

 bitbake/lib/bb/server/process.py   |7 +-
 bitbake/lib/bb/tinfoil.py  |   24 +-
 .../lib/oeqa/selftest/cases/systemd_boot.py|   26 +-
 meta/lib/oe/copy_buildsystem.py|1 +
 meta/lib/oeqa/core/loader.py   |   25 +-
 meta/lib/oeqa/core/tests/test_loader.py|   17 +-
 meta/lib/oeqa/core/threaded.py |  169 +++-
 meta/lib/oeqa/selftest/case.py |  251 -
 .../lib/oeqa/selftest/cases/_sstatetests_noauto.py |   23 +-
 meta/lib/oeqa/selftest/cases/archiver.py   |   21 +-
 meta/lib/oeqa/selftest/cases/bblayers.py   |   45 +-
 meta/lib/oeqa/selftest/cases/bbtests.py|  103 +-
 meta/lib/oeqa/selftest/cases/buildhistory.py   |9 +-
 meta/lib/oeqa/selftest/cases/buildoptions.py   |   58 +-
 meta/lib/oeqa/selftest/cases/containerimage.py |9 +-
 meta/lib/oeqa/selftest/cases/devtool.py| 1014 +---
 

[OE-core] [PATCHv3 14/30] oeqa/selftest/case: tearDown extra commands print what actually fails

2017-07-17 Thread Aníbal Limón
Its better to have the output to see what actually fails in a
command that is aim to execute at end of a test case.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/case.py | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index bbdce4cf9e8..c6f2d184ea3 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -224,13 +224,18 @@ to ensure accurate results.")
 
 def tearDown(self):
 if self._extra_tear_down_commands:
-failed_extra_commands = []
+failed_extra_commands = {}
 for command in self._extra_tear_down_commands:
 result = self.runCmd(command, ignore_status=True)
-if not result.status ==  0:
-failed_extra_commands.append(command)
+if not result.status == 0:
+failed_extra_commands[command] = result
 if failed_extra_commands:
-self.logger.warning("tearDown commands have failed: %s" % ', 
'.join(map(str, failed_extra_commands)))
+self.logger.warning("%s: tearDown commands have failed" % \
+self.id())
+for cmd in failed_extra_commands:
+result = failed_extra_commands[cmd]
+self.logger.warning("%s: %s\n%s" % (self.id(), cmd,
+result.output))
 self.logger.debug("Trying to move on.")
 self._extra_tear_down_commands = []
 
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 11/30] oeqa/selftest/{case, context}: Add builddir by test class and context

2017-07-17 Thread Aníbal Limón
The build directory by Test class will enable to use several instances
of bitbake in parallel to enable oe-selftest threaded runs.

[YOCTO #11429]

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/case.py| 97 ---
 meta/lib/oeqa/selftest/context.py |  4 ++
 2 files changed, 74 insertions(+), 27 deletions(-)

diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index 871009c568b..dd24e366abd 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -13,28 +13,73 @@ from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 from oeqa.core.case import OETestCase
 
 class OESelftestTestCase(OETestCase):
+_use_own_builddir = False
+_main_thread = True
+_end_thread = False
+
 def __init__(self, methodName="runTest"):
 self._extra_tear_down_commands = []
 super(OESelftestTestCase, self).__init__(methodName)
 
 @classmethod
+def _setUpBuildDir(cls):
+if cls._use_own_builddir:
+cls.builddir = os.path.join(cls.tc.config_paths['base_builddir'],
+cls.__module__, cls.__name__)
+
+cls.localconf_path = os.path.join(cls.builddir, "conf/local.conf")
+cls.localconf_backup = os.path.join(cls.builddir,
+"conf/local.conf.bk")
+cls.local_bblayers_path = os.path.join(cls.builddir,
+"conf/bblayers.conf")
+cls.local_bblayers_backup = os.path.join(cls.builddir,
+"conf/bblayers.conf.bk")
+else:
+cls.builddir = cls.tc.config_paths['builddir']
+cls.localconf_path = cls.tc.config_paths['localconf']
+cls.localconf_backup = 
cls.tc.config_paths['localconf_class_backup']
+cls.local_bblayers_path = cls.tc.config_paths['bblayers']
+cls.local_bblayers_backup = \
+cls.tc.config_paths['bblayers_class_backup']
+
+cls.testinc_path = os.path.join(cls.builddir, "conf/selftest.inc")
+cls.testinc_bblayers_path = os.path.join(cls.builddir,
+"conf/bblayers.inc")
+cls.machineinc_path = os.path.join(cls.builddir, "conf/machine.inc")
+
+# creates a custom build directory for every test class
+if not os.path.exists(cls.builddir):
+os.makedirs(cls.builddir)
+
+builddir_conf = os.path.join(cls.builddir, 'conf')
+origdir_conf = os.path.join(cls.tc.config_paths['builddir'], 
'conf')
+shutil.copytree(origdir_conf, builddir_conf)
+
+ftools.append_file(cls.localconf_path, "# added by oe-selftest 
base class")
+
+# shares original sstate_dir across build directories to speed up
+sstate_line = "SSTATE_DIR=\"%s\"" % cls.td['SSTATE_DIR']
+ftools.append_file(cls.localconf_path, sstate_line)
+
+# shares original dl_dir across build directories to avoid 
additional
+# network usage
+dldir_line = "DL_DIR=\"%s\"" % cls.td['DL_DIR']
+ftools.append_file(cls.localconf_path, dldir_line)
+
+# use the same value of threads for BB_NUMBER_THREADS/PARALLEL_MAKE
+# to avoid ran out resources (cpu/memory)
+if hasattr(cls.tc.loader, 'process_num'):
+ftools.append_file(cls.localconf_path, 
"BB_NUMBER_THREADS?=\"%d\"" %
+cls.tc.loader.process_num)
+ftools.append_file(cls.localconf_path, "PARALLEL_MAKE?=\"-j 
%d\"" %
+cls.tc.loader.process_num)
+
+@classmethod
 def setUpClass(cls):
 super(OESelftestTestCase, cls).setUpClass()
 
 cls.testlayer_path = cls.tc.config_paths['testlayer_path']
-cls.builddir = cls.tc.config_paths['builddir']
-
-cls.localconf_path = cls.tc.config_paths['localconf']
-cls.localconf_backup = cls.tc.config_paths['localconf_class_backup']
-cls.local_bblayers_path = cls.tc.config_paths['bblayers']
-cls.local_bblayers_backup = 
cls.tc.config_paths['bblayers_class_backup']
-
-cls.testinc_path = os.path.join(cls.tc.config_paths['builddir'],
-"conf/selftest.inc")
-cls.testinc_bblayers_path = 
os.path.join(cls.tc.config_paths['builddir'],
-"conf/bblayers.inc")
-cls.machineinc_path = os.path.join(cls.tc.config_paths['builddir'],
-"conf/machine.inc")
+cls._setUpBuildDir()
 
 cls._track_for_cleanup = [
 cls.testinc_path, cls.testinc_bblayers_path,
@@ -52,35 +97,31 @@ class OESelftestTestCase(OETestCase):
 @classmethod
 def add_include(cls):
 if "#include added by oe-selftest" \
-not in ftools.read_file(os.path.join(cls.builddir, 
"conf/local.conf")):
-cls.logger.info("Adding: \"include selftest.inc\" in %s" % 
os.path.join(cls.builddir, "conf/local.conf"))
-  

[OE-core] [PATCHv3 07/30] oeqa/core/threaded: Enable support to use the main thread

2017-07-17 Thread Aníbal Limón
Some test cases needs to be executed by the main thread for
several resons, this implmentation enables usage of the main
thread to execute suites.

The rules are if some test case request by test class attr
_main_thread it will be executed, if no tests are scheduled
to be executed into the main thread the algorithm with take
the first suite in the pool, finallay this will avoid
thread usage if only one suite needs to be executed.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/core/threaded.py | 104 -
 1 file changed, 83 insertions(+), 21 deletions(-)

diff --git a/meta/lib/oeqa/core/threaded.py b/meta/lib/oeqa/core/threaded.py
index 2cafe03a212..34217f1a8b8 100644
--- a/meta/lib/oeqa/core/threaded.py
+++ b/meta/lib/oeqa/core/threaded.py
@@ -27,9 +27,42 @@ class OETestLoaderThreaded(OETestLoader):
 self.process_num = min(multiprocessing.cpu_count(),
 len(suite._tests))
 
-suites = []
-for _ in range(self.process_num):
-suites.append(self.suiteClass())
+suites = {}
+suites['main'] = self.suiteClass()
+suites['pool'] = []
+for _ in range(self.process_num - 1):
+suites['pool'].append(self.suiteClass())
+
+def _add_to_main_thread(main_suite, case, depends):
+"""
+Some test cases needs to be run into the main
+thread for several resons.
+
+A test case that needs to run in the main thread
+can be for specific set via test class _main_thread
+attr or because is on the same module or for a dependency
+reason.
+"""
+
+if hasattr(case.__class__, '_main_thread') and \
+case.__class__._main_thread or \
+self.process_num == 1:
+main_suite.addTest(case)
+return True
+
+for c in main_suite._tests:
+if case.__module__ == c.__module__:
+main_suite.addTest(case)
+return True
+
+if case.id() in depends:
+case_depends = depends[case.id()]
+for c in main_suite._tests:
+if c.id() in case_depends:
+main_suite.addTest(case)
+return True
+
+return False
 
 def _search_for_module_idx(suites, case):
 """
@@ -37,8 +70,7 @@ class OETestLoaderThreaded(OETestLoader):
 in the same thread because PyUnit keeps track
 of setUp{Module, Class,} and tearDown{Module, Class,}.
 """
-
-for idx in range(self.process_num):
+for idx in range(self.process_num - 1):
 suite = suites[idx]
 for c in suite._tests:
 if case.__module__ == c.__module__:
@@ -53,7 +85,7 @@ class OETestLoaderThreaded(OETestLoader):
 of dependant test to figure out if skip or not.
 """
 
-for idx in range(self.process_num):
+for idx in range(self.process_num - 1):
 suite = suites[idx]
 
 for case in suite._tests:
@@ -62,6 +94,11 @@ class OETestLoaderThreaded(OETestLoader):
 return -1
 
 def _get_best_idx(suites):
+"""
+The best index is selected to the suite that has
+minor test cases to run.
+"""
+
 sizes = [len(suite._tests) for suite in suites]
 return sizes.index(min(sizes))
 
@@ -71,27 +108,35 @@ class OETestLoaderThreaded(OETestLoader):
 if isinstance(case, TestSuite):
 _fill_suites(case)
 else:
-idx = _search_for_module_idx(suites, case)
-
 depends = {}
 if 'depends' in self.tc._registry:
 depends = self.tc._registry['depends']
 
+if _add_to_main_thread(suites['main'], case, depends):
+continue
+
+# Get the best index in the suite pool to add the case
+idx = _search_for_module_idx(suites['pool'], case)
 if idx == -1 and case.id() in depends:
 case_depends = depends[case.id()] 
-idx = _search_for_depend_idx(suites, case_depends)
-
+idx = _search_for_depend_idx(suites['pool'], 
case_depends)
 if idx == -1:
-idx = _get_best_idx(suites)
+idx = _get_best_idx(suites['pool'])
+suites['pool'][idx].addTest(case)
 
-suites[idx].addTest(case)
 _fill_suites(suite)
 
-suites_tmp = suites
-suites = []
+# clean suites in pool without test cases
+

[OE-core] [PATCHv3 05/30] bb/tinfoil: run_command handle busy status in bitbake server

2017-07-17 Thread Aníbal Limón
When tinfoil request a command to bitbake is handled in async
manner [1], sometimes is this ends on return a Busy status.

This is a workaround a needs to be fixed in proper manner
inside bitbake code.

For example when running clientComplete and buildFile is on progress,

  ERROR: Function failed: base_do_unpack
  Traceback (most recent call last):
File "/home/alimon/repos/poky/scripts/lib/devtool/standard.py", line
  797, in modify
  initial_rev = _extract_source(srctree, args.keep_temp, args.branch,
  False, rd, tinfoil)
File "/home/alimon/repos/poky/scripts/lib/devtool/standard.py", line
  562, in _extract_source
  runtask(fn, 'unpack')
File "/home/alimon/repos/poky/scripts/lib/devtool/standard.py", line
  552, in runtask
  raise DevtoolError('Task do_%s failed' % task)
  devtool.DevtoolError: Task do_unpack failed

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
File "/home/alimon/repos/poky/scripts/devtool", line 351, in 
  ret = main()
File "/home/alimon/repos/poky/scripts/devtool", line 338, in main
  ret = args.func(args, config, basepath, workspace)
File "/home/alimon/repos/poky/scripts/lib/devtool/standard.py", line
  864, in modify
  tinfoil.shutdown()
File "/home/alimon/repos/poky/bitbake/lib/bb/tinfoil.py", line 427, in
  shutdown
  self.run_command('clientComplete')
File "/home/alimon/repos/poky/bitbake/lib/bb/tinfoil.py", line 320, in
  run_command
  raise TinfoilCommandFailed(result[1])
  bb.tinfoil.TinfoilCommandFailed: Busy (buildFile in progress)

Signed-off-by: Aníbal Limón 
---
 bitbake/lib/bb/tinfoil.py | 24 +++-
 1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index fb0da622433..7f7809ea41c 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -21,6 +21,7 @@ import os
 import sys
 import atexit
 import re
+import time
 from collections import OrderedDict, defaultdict
 
 import bb.cache
@@ -298,7 +299,7 @@ class Tinfoil:
 config_params = TinfoilConfigParameters(config_only=False)
 self.run_actions(config_params)
 
-def run_command(self, command, *params):
+def run_command(self, command, *params, ntries=0):
 """
 Run a command on the server (as implemented in bb.command).
 Note that there are two types of command - synchronous and
@@ -315,9 +316,22 @@ class Tinfoil:
 commandline = [command]
 if params:
 commandline.extend(params)
-result = self.server_connection.connection.runCommand(commandline)
-if result[1]:
-raise TinfoilCommandFailed(result[1])
+
+# XXX: Tinfoil commands are run by Cooker in async mode so gives
+# some time to get done.
+result = None
+while True:
+result = self.server_connection.connection.runCommand(commandline)
+if not result[1]:
+break
+
+if ntries == 0:
+raise TinfoilCommandFailed(result[1])
+elif 'Busy' in result[1]:
+ntries = ntries - 1
+time.sleep(1)
+continue
+
 return result[0]
 
 def set_event_mask(self, eventlist):
@@ -424,7 +438,7 @@ class Tinfoil:
 
 def shutdown(self):
 if self.server_connection:
-self.run_command('clientComplete')
+self.run_command('clientComplete', ntries=1)
 _server_connections.remove(self.server_connection)
 bb.event.ui_queue = []
 self.server_connection.terminate()
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 13/30] oeqa/selftest/case: Creates meta-selftest layer per class

2017-07-17 Thread Aníbal Limón
The meta-selftest layer is used by test cases to modify
meta data but in a threaded environment two test cases can
modify the meta data causing errors because the signatures
will change.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/case.py | 34 +++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index 3998aeac5c4..bbdce4cf9e8 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -7,6 +7,7 @@ import shutil
 import glob
 import errno
 import re
+import subprocess
 from unittest.util import safe_repr
 
 import oeqa.utils.ftools as ftools
@@ -24,6 +25,8 @@ class OESelftestTestCase(OETestCase):
 
 @classmethod
 def _setUpBuildDir(cls):
+cls.orig_testlayer_path = cls.tc.config_paths['testlayer_path']
+
 if cls._use_own_builddir:
 cls.builddir = os.path.join(cls.tc.config_paths['base_builddir'],
 cls.__module__, cls.__name__)
@@ -35,14 +38,23 @@ class OESelftestTestCase(OETestCase):
 "conf/bblayers.conf")
 cls.local_bblayers_backup = os.path.join(cls.builddir,
 "conf/bblayers.conf.bk")
+
+cls.base_testlayer_path = os.path.join(cls.builddir,
+'layers')
+cls.testlayer_path = os.path.join(cls.base_testlayer_path,
+os.path.basename(cls.orig_testlayer_path))
 else:
 cls.builddir = cls.tc.config_paths['builddir']
+
 cls.localconf_path = cls.tc.config_paths['localconf']
 cls.localconf_backup = 
cls.tc.config_paths['localconf_class_backup']
 cls.local_bblayers_path = cls.tc.config_paths['bblayers']
 cls.local_bblayers_backup = \
 cls.tc.config_paths['bblayers_class_backup']
 
+cls.base_testlayer_path = os.path.dirname(cls.orig_testlayer_path)
+cls.testlayer_path = cls.orig_testlayer_path
+
 cls.testinc_path = os.path.join(cls.builddir, "conf/selftest.inc")
 cls.testinc_bblayers_path = os.path.join(cls.builddir,
 "conf/bblayers.inc")
@@ -53,8 +65,11 @@ class OESelftestTestCase(OETestCase):
 os.makedirs(cls.builddir)
 
 builddir_conf = os.path.join(cls.builddir, 'conf')
-origdir_conf = os.path.join(cls.tc.config_paths['builddir'], 
'conf')
-shutil.copytree(origdir_conf, builddir_conf)
+os.makedirs(builddir_conf)
+shutil.copyfile(cls.tc.config_paths['localconf_backup'],
+os.path.join(builddir_conf, 'local.conf'))
+shutil.copyfile(cls.tc.config_paths['bblayers_backup'],
+os.path.join(builddir_conf, 'bblayers.conf'))
 
 ftools.append_file(cls.localconf_path, "# added by oe-selftest 
base class")
 
@@ -75,11 +90,24 @@ class OESelftestTestCase(OETestCase):
 ftools.append_file(cls.localconf_path, "PARALLEL_MAKE?=\"-j 
%d\"" %
 cls.tc.loader.process_num)
 
+# copy meta-selftest per class to avoid races when changing 
meta-data
+# and init git repository because some tests review the repo status
+os.makedirs(cls.base_testlayer_path)
+shutil.copytree(cls.orig_testlayer_path, cls.testlayer_path)
+cls.runCmd("git init; git add *; git commit -a -m 'initial'",
+cwd=cls.testlayer_path)
+
+# XXX: sometimes meta-selftest isn't on bblayers at first backup
+try:
+cls.runCmd("bitbake-layers remove-layer %s" % 
cls.orig_testlayer_path)
+except:
+pass
+cls.runCmd("bitbake-layers add-layer %s" % cls.testlayer_path)
+
 @classmethod
 def setUpClass(cls):
 super(OESelftestTestCase, cls).setUpClass()
 
-cls.testlayer_path = cls.tc.config_paths['testlayer_path']
 cls._setUpBuildDir()
 
 cls._track_for_cleanup = [
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 12/30] oeqa/selftest/case: Add wrappers to utils.commands modules

2017-07-17 Thread Aníbal Limón
This wrappers are for be able to use a custom build directory
per Test class, there is a function to modify the environment
setting BUILDDIR, BBPATH and CWD.

The oeqa.utils.commands module could be removed when other selftests
(refkit, etc) are adapted to use this wrappers methods (get_bb_var{,s},
bitbake, runCmd).

The remaining command (oeqa.utils) to provide a wrapper is runqemu, this
has other issue because bitbake/tinfoil are expected to run into the
main thread (signal handling, etc).

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/case.py | 96 +-
 1 file changed, 94 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index dd24e366abd..3998aeac5c4 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -6,10 +6,11 @@ import os
 import shutil
 import glob
 import errno
+import re
 from unittest.util import safe_repr
 
 import oeqa.utils.ftools as ftools
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+from oeqa.utils.commands import runCmd, bitbake, get_bb_env, get_bb_var, 
get_bb_vars
 from oeqa.core.case import OETestCase
 
 class OESelftestTestCase(OETestCase):
@@ -197,7 +198,7 @@ to ensure accurate results.")
 if self._extra_tear_down_commands:
 failed_extra_commands = []
 for command in self._extra_tear_down_commands:
-result = runCmd(command, ignore_status=True)
+result = self.runCmd(command, ignore_status=True)
 if not result.status ==  0:
 failed_extra_commands.append(command)
 if failed_extra_commands:
@@ -313,3 +314,94 @@ to ensure accurate results.")
 msg = self._formatMessage(msg, "%s exists when it should not" % 
safe_repr(expr))
 
 raise self.failureException(msg)
+
+# utils commands to run on it's on builddir
+@classmethod 
+def _env_own_builddir(cls, **kwargs):
+env = None
+
+if 'env' in kwargs:
+env = kwargs['env']
+
+if not 'BUILDDIR' in env:
+env['BUILDDIR'] = cls.builddir
+if not 'BBPATH' in env:
+env['BBPATH'] = cls.builddir
+
+else:
+env = os.environ.copy()
+env['BUILDDIR'] = cls.builddir
+env['BBPATH'] = cls.builddir
+
+kwargs['env'] = env
+
+# XXX: tinfoil doesn't honor BBPATH bblayers and tinfoil test
+# modules uses it
+if not 'cwd' in kwargs:
+kwargs['cwd'] = cls.builddir
+
+# XXX: uncomment for debugging purposes
+#kwargs['output_log'] = cls.logger
+
+return kwargs
+
+@classmethod
+def runCmd(cls, *args, **kwargs):
+kwargs = cls._env_own_builddir(**kwargs)
+return runCmd(*args, **kwargs)
+
+@classmethod
+def bitbake(cls, *args, **kwargs):
+kwargs = cls._env_own_builddir(**kwargs)
+return bitbake(*args, **kwargs)
+
+@classmethod
+def get_bb_env(cls, target=None, postconfig=None):
+if target:
+return cls.bitbake("-e %s" % target, postconfig=postconfig).output
+else:
+return cls.bitbake("-e", postconfig=postconfig).output
+
+@classmethod
+def get_bb_vars(cls, variables=None, target=None, postconfig=None):
+"""Get values of multiple bitbake variables"""
+bbenv = cls.get_bb_env(target, postconfig=postconfig)
+
+if variables is not None:
+variables = variables.copy()
+var_re = re.compile(r'^(export )?(?P\w+(_.*)?)="(?P.*)"$')
+unset_re = re.compile(r'^unset (?P\w+)$')
+lastline = None
+values = {}
+for line in bbenv.splitlines():
+match = var_re.match(line)
+val = None
+if match:
+val = match.group('value')
+else:
+match = unset_re.match(line)
+if match:
+# Handle [unexport] variables
+if lastline.startswith('#   "'):
+val = lastline.split('"')[1]
+if val:
+var = match.group('var')
+if variables is None:
+values[var] = val
+else:
+if var in variables:
+values[var] = val
+variables.remove(var)
+# Stop after all required variables have been found
+if not variables:
+break
+lastline = line
+if variables:
+# Fill in missing values
+for var in variables:
+values[var] = None
+return values
+
+@classmethod 
+def get_bb_var(cls, var, target=None, postconfig=None):
+return cls.get_bb_vars([var], target, postconfig)[var]
-- 
2.11.0

-- 

[OE-core] [PATCHv3 06/30] oe/copy_buildsystem: check_sstate_task_list also pop BBPATH from env

2017-07-17 Thread Aníbal Limón
The BBPATH environment could be set and can make a failure when try
to build an extensible sdk because it will look the bitbake.lock
file in the original build folder.

Example:

$ export BBPATH=`pwd`
$ bitbake core-image-minimal -c populate_sdk_ext

ERROR: bitbake failed:
ERROR: Only one copy of bitbake should be run against a build directory
ERROR: core-image-minimal-1.0-r0 do_populate_sdk_ext: Function failed:
copy_buildsystem

Signed-off-by: Aníbal Limón 
---
 meta/lib/oe/copy_buildsystem.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py
index a3729041835..dd506a39e6c 100644
--- a/meta/lib/oe/copy_buildsystem.py
+++ b/meta/lib/oe/copy_buildsystem.py
@@ -239,6 +239,7 @@ def check_sstate_task_list(d, targets, filteroutfile, 
cmdprefix='', cwd=None, lo
 cmd = "%sBB_SETSCENE_ENFORCE=1 PSEUDO_DISABLED=1 oe-check-sstate %s -s -o 
%s %s" % (cmdprefix, targets, filteroutfile, logparam)
 env = dict(d.getVar('BB_ORIGENV', False))
 env.pop('BUILDDIR', '')
+env.pop('BBPATH', '')
 pathitems = env['PATH'].split(':')
 env['PATH'] = ':'.join([item for item in pathitems if not 
item.endswith('/bitbake/bin')])
 bb.process.run(cmd, stderr=subprocess.STDOUT, env=env, cwd=cwd, 
executable='/bin/bash')
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 03/30] oeqa/selftest/{context, case}: Handle KeyboardInterrupt/SIGINT and SIGTERM

2017-07-17 Thread Aníbal Limón
In order to avoid corrupt local.conf and bblayers.conf adds
signal handler for SIGTERM and use try/finally (KeyboardIntrrupt) block
to restore previously backuped configuration.

[YOCTO #11650]

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/case.py|  36 +++--
 meta/lib/oeqa/selftest/context.py | 107 +++---
 2 files changed, 97 insertions(+), 46 deletions(-)

diff --git a/meta/lib/oeqa/selftest/case.py b/meta/lib/oeqa/selftest/case.py
index 31a11fddda9..871009c568b 100644
--- a/meta/lib/oeqa/selftest/case.py
+++ b/meta/lib/oeqa/selftest/case.py
@@ -13,28 +13,34 @@ from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 from oeqa.core.case import OETestCase
 
 class OESelftestTestCase(OETestCase):
-builddir = os.environ.get("BUILDDIR") or ""
-localconf_path = os.path.join(builddir, "conf/local.conf")
-localconf_backup = os.path.join(builddir, "conf/local.bk")
-testinc_path = os.path.join(builddir, "conf/selftest.inc")
-local_bblayers_path = os.path.join(builddir, "conf/bblayers.conf")
-local_bblayers_backup = os.path.join(builddir, "conf/bblayers.bk")
-testinc_bblayers_path = os.path.join(builddir, "conf/bblayers.inc")
-machineinc_path = os.path.join(builddir, "conf/machine.inc")
-
 def __init__(self, methodName="runTest"):
 self._extra_tear_down_commands = []
-self._track_for_cleanup = [
-self.testinc_path, self.testinc_bblayers_path,
-self.machineinc_path, self.localconf_backup,
-self.local_bblayers_backup]
-
 super(OESelftestTestCase, self).__init__(methodName)
 
 @classmethod
 def setUpClass(cls):
 super(OESelftestTestCase, cls).setUpClass()
-cls.testlayer_path = cls.tc.testlayer_path
+
+cls.testlayer_path = cls.tc.config_paths['testlayer_path']
+cls.builddir = cls.tc.config_paths['builddir']
+
+cls.localconf_path = cls.tc.config_paths['localconf']
+cls.localconf_backup = cls.tc.config_paths['localconf_class_backup']
+cls.local_bblayers_path = cls.tc.config_paths['bblayers']
+cls.local_bblayers_backup = 
cls.tc.config_paths['bblayers_class_backup']
+
+cls.testinc_path = os.path.join(cls.tc.config_paths['builddir'],
+"conf/selftest.inc")
+cls.testinc_bblayers_path = 
os.path.join(cls.tc.config_paths['builddir'],
+"conf/bblayers.inc")
+cls.machineinc_path = os.path.join(cls.tc.config_paths['builddir'],
+"conf/machine.inc")
+
+cls._track_for_cleanup = [
+cls.testinc_path, cls.testinc_bblayers_path,
+cls.machineinc_path, cls.localconf_backup,
+cls.local_bblayers_backup]
+
 cls.add_include()
 
 @classmethod
diff --git a/meta/lib/oeqa/selftest/context.py 
b/meta/lib/oeqa/selftest/context.py
index ca87398224c..4575a0537fb 100644
--- a/meta/lib/oeqa/selftest/context.py
+++ b/meta/lib/oeqa/selftest/context.py
@@ -6,6 +6,8 @@ import time
 import glob
 import sys
 import imp
+import signal
+from shutil import copyfile
 from random import choice
 
 import oeqa
@@ -16,13 +18,12 @@ from oeqa.core.exception import OEQAPreRun
 from oeqa.utils.commands import runCmd, get_bb_vars, get_test_layer
 
 class OESelftestTestContext(OETestContext):
-def __init__(self, td=None, logger=None, machines=None, 
testlayer_path=None):
+def __init__(self, td=None, logger=None, machines=None, config_paths=None):
 super(OESelftestTestContext, self).__init__(td, logger)
 
 self.machines = machines
 self.custommachine = None
-
-self.testlayer_path = testlayer_path
+self.config_paths = config_paths
 
 def runTests(self, machine=None):
 if machine:
@@ -108,7 +109,29 @@ class OESelftestTestContextExecutor(OETestContextExecutor):
 
 self.tc_kwargs['init']['td'] = get_bb_vars()
 self.tc_kwargs['init']['machines'] = self._get_available_machines()
-self.tc_kwargs['init']['testlayer_path'] = get_test_layer()
+
+builddir = os.environ.get("BUILDDIR")
+self.tc_kwargs['init']['config_paths'] = {}
+self.tc_kwargs['init']['config_paths']['testlayer_path'] = \
+get_test_layer()
+self.tc_kwargs['init']['config_paths']['builddir'] = builddir
+self.tc_kwargs['init']['config_paths']['localconf'] = \
+os.path.join(builddir, "conf/local.conf")
+self.tc_kwargs['init']['config_paths']['localconf_backup'] = \
+os.path.join(builddir, "conf/local.conf.orig")
+self.tc_kwargs['init']['config_paths']['localconf_class_backup'] = \
+os.path.join(builddir, "conf/local.conf.bk")
+self.tc_kwargs['init']['config_paths']['bblayers'] = \
+os.path.join(builddir, "conf/bblayers.conf")
+self.tc_kwargs['init']['config_paths']['bblayers_backup'] = \
+

[OE-core] [PATCHv3 04/30] bb/server/process: Handle EINTR on idle_commands select

2017-07-17 Thread Aníbal Limón
If a signal is sent like SIGWINCH the select could be interrupted
so ignore the InterruptError like in XMLRPC server [1].

[1]
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib/bb/server/xmlrpc.py#n307

Signed-off-by: Aníbal Limón 
---
 bitbake/lib/bb/server/process.py | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index f8d67678558..a8ba4681c64 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -186,7 +186,12 @@ class ProcessServer(Process, BaseImplServer):
 nextsleep = self.next_heartbeat - now
 
 if nextsleep is not None:
-select.select(fds,[],[],nextsleep)
+try:
+select.select(fds,[],[],nextsleep)
+except InterruptedError:
+# ignore EINTR error, nextsleep only used for wait
+# certain time
+pass
 
 def runCommand(self, command):
 """
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 02/30] selftest/cases/package: Call parent setUpClass method

2017-07-17 Thread Aníbal Limón
Since config paths are now passed in Test context the setUpClass
method is expected to be call.

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/selftest/cases/package.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/package.py 
b/meta/lib/oeqa/selftest/cases/package.py
index 5b9a6d15851..169698f780d 100644
--- a/meta/lib/oeqa/selftest/cases/package.py
+++ b/meta/lib/oeqa/selftest/cases/package.py
@@ -17,6 +17,8 @@ class VersionOrdering(OESelftestTestCase):
 
 @classmethod
 def setUpClass(cls):
+super().setUpClass()
+
 # Build the tools we need and populate a sysroot
 bitbake("dpkg-native opkg-native rpm-native python3-native")
 bitbake("build-sysroots -c build_native_sysroot")
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv3 01/30] oeqa/core/loader: Generate function _make_failed_test dynamically

2017-07-17 Thread Aníbal Limón
Python versions has different features from branches 3.4.x, 3.5.x and
3.6.x, i expected in wrong mode that was incremental for example changes
in 3.4.4 be in 3.5.x but that's not true.

The _make_failed_test internal method differs and is only available in
certain versions >= 3.4.4 and in 3.5.x and 3.6.x branches but not
realeses have been made including it.

So to avoid futher problems inspect the _make_failed_test and generates
function definition according what parameters are needed, the unique
supossition is that exception argument is always passed.

Related to,
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d8380d098a290510b442a7abd2dd5a50cabf5844

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/core/loader.py | 25 -
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py
index 80e3d2800cd..e4c218b57f0 100644
--- a/meta/lib/oeqa/core/loader.py
+++ b/meta/lib/oeqa/core/loader.py
@@ -4,6 +4,7 @@
 import os
 import sys
 import unittest
+import inspect
 
 from oeqa.core.utils.path import findFile
 from oeqa.core.utils.test import getSuiteModules, getCaseID
@@ -12,19 +13,17 @@ from oeqa.core.case import OETestCase
 from oeqa.core.decorator import decoratorClasses, OETestDecorator, \
 OETestFilter, OETestDiscover
 
-if sys.version_info >= (3,4,4):
-def _make_failed_test(classname, methodname, exception, suiteClass):
-"""
-When loading tests, the unittest framework stores any exceptions 
and
-displays them only when the 'run' method is called.
-
-For our purposes, it is better to raise the exceptions in the 
loading
-step rather than waiting to run the test suite.
-"""
-raise exception
-else:
-def _make_failed_test(classname, exception, suiteClass):
-raise exception
+# When loading tests, the unittest framework stores any exceptions and
+# displays them only when the run method is called.
+#
+# For our purposes, it is better to raise the exceptions in the loading
+# step rather than waiting to run the test suite.
+#
+# Generate the function definition because this differ across python versions
+# Python >= 3.4.4 uses tree parameters instead four but for example Python 
3.5.3
+# ueses four parameters so isn't incremental.
+_failed_test_args = inspect.getargspec(unittest.loader._make_failed_test).args
+exec("""def _make_failed_test(%s): raise exception""" % ', 
'.join(_failed_test_args))
 unittest.loader._make_failed_test = _make_failed_test
 
 def _find_duplicated_modules(suite, directory):
-- 
2.11.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v4] kernel: Add support for multiple kernel packages

2017-07-17 Thread Wold, Saul
On Wed, 2017-07-05 at 12:33 -0500, Haris Okanovic wrote:
> Some distros may want to provide alternate kernel "flavors" via feeds
> or
> within bootable images. For example, readily available builds which
> provide certain diagnostic features can enable developers and testers
> to
> more quickly resolve issues by avoiding lengthy kernel builds.
> 
> This change allows for building multiple flavors of the kernel and
> module packages by templatizing kernel package names via a new
> KERNEL_PACKAGE_NAME variable in kernel.bbclass. It defaults to the
> old
> name of "kernel", but can be overridden by certain recipes providing
> alternate kernel flavors.
> 
> To maintain compatibility, recipes providing alternate kernel flavors
> cannot be the "preferred provider" for virtual/kernel. This is
> because
> OE puts the preferred provider's build and source at
> "tmp-glibc/work-shared/$MACHINE/kernel-build-artifacts/" and
> "tmp-glibc/work-shared/$MACHINE/kernel-source/" instead of
> "tmp-glibc/work/*/$PN/" like other recipes. Therefore, recipes using
> the
> default KERNEL_PACKAGE_NAME="kernel" follows the old semantics --
> build
> in the old location and may be preferred provider -- while recipes
> using
> all other KERNEL_PACKAGE_NAME's build from the normal WORKDIR and
> don't
> provide "virtual/kernel".
> 
> Testing:
>  1. Prepended `KERNEL_PACKAGE_NAME = "tiny-linux"` to
> linux-yocto-tiny_4.9.bb so that it may build alongside
> the main kernel.
>  2. `bitbake linux-yocto linux-yocto-tiny` to build both kernel
> flavors.
>  3. Verified image and modules IPKs exist for both:
> tmp-glibc/deploy/ipk/qemux86/kernel-* for linux-yocto
> tmp-glibc/deploy/ipk/qemux86/tiny-linux* for linux-yocto-tiny
>  4. Verified linux-yocto is the "preferred provider", and was built
> in
> shared directory: tmp-glibc/work-shared/qemux86/kernel-*
>  5. Appended `CORE_IMAGE_BASE_INSTALL += "tiny-linux"` to
> core-image-base.bb to include both kernel flavors.
>  6. `bitbake core-image-base` to build an image.
>  7. Verified image contains two bzImage's under /boot/, with
> "yocto-standard" selected to boot via symlink.
> 
> Discussion thread:
> http://lists.openembedded.org/pipermail/openembedded-core/2015-Decemb
> er/thread.html#114122
> 
> Signed-off-by: Ioan-Adrian Ratiu 
> Signed-off-by: Gratian Crisan 
> Signed-off-by: Haris Okanovic 
> Coauthored-by: Gratian Crisan 
> Coauthored-by: Haris Okanovic 
> Coauthored-by: Josh Hernstrom 
> ---
> [PATCH v2] Change STAGING_KERNEL_DIR and STAGING_KERNEL_BUILDDIR to
> the
> "work" directory in alternate kernel builds, instead of "work-
> shared",
> so
> that the two builds don't clobber each other.
> 
> [PATCH v3] An updated version of this change rebased onto the current
> OE-core master. Changes:
>  * Remove PREFERRED_PROVIDER check in linux-yocto.inc in alternate
>    kernel builds, since alternate kernels aren't the
>    PREFERRED_PROVIDER for virtual/kernel by definition.
>  * Remove "virtual/kernel" from PROVIDES in alternate kernel builds.
> 
> [PATCH v4] Another rebase onto master; no functional change.
> Improved description and testing steps.

So I finally had a chance to get back to this and test build with it, I
saw the following WARNING, which lead to the ERROR:

WARNING: Variable key FILES_${PN}-dev (${includedir} ${FILES_SOLIBSDEV}
${libdir}/*.la ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig
${datadir}/aclocal ${base_libdir}/*.o ${libdir}/${BPN}/*.la
${base_libdir}/*.la) replaces original key FILES_linux-yocto-dev
(/boot/System.map* /boot/Module.symvers* /boot/config*
${KERNEL_SRC_PATH}
${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build).
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: QA Issue: linux-yocto: Files/directories were installed but
not shipped in any package:
  /boot/System.map-4.10.17-yocto-standard
  /boot/Module.symvers-4.10.17-yocto-standard
  /boot/config-4.10.17-yocto-standard
Please set FILES such that these items are packaged. Alternatively if
they are unneeded, avoid installing them or delete them within
do_install.
linux-yocto: 3 installed and not shipped files. [installed-vs-shipped]
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: Fatal QA errors found, failing task.
ERROR: linux-yocto-4.10.17+gitAUTOINC+e92bd55409_6648a34e00-r0
do_package: Function failed: do_package

Something seems to be causing the FILES_linux-yocto-dev info to be
overridden, I have not tracked down the culprit yet.

Sau!

> ---
>  meta/classes/kernel-module-split.bbclass  |  9 ++--
>  meta/classes/kernel.bbclass   | 85 ++---
> --
>  meta/conf/documentation.conf  |  1 +
>  meta/recipes-kernel/linux/linux-dtb.inc   |  2 +-
>  meta/recipes-kernel/linux/linux-yocto.inc |  2 +-
>  5 files changed, 59 

Re: [OE-core] [PATCH 01/30] oeqa/core/loader: Switch method definition for _make_failed_test

2017-07-17 Thread Patrick Ohly
On Mon, 2017-07-17 at 14:41 -0500, Aníbal Limón wrote:
> 
> On 07/17/2017 02:14 PM, Patrick Ohly wrote:
> > On Fri, 2017-07-14 at 10:27 -0500, Aníbal Limón wrote:
> >>
> >> On 07/14/2017 04:52 AM, Patrick Ohly wrote:
> >>> On Tue, 2017-07-11 at 15:23 -0500, Aníbal Limón wrote:
>  This was a mistake of me to define wrong what methods needs
>  to be defined by certain python version.
> 
>  See rev d8380d098a290510b442a7abd2dd5a50cabf5844.
> >>>
> >>> This will fix this error that we see in Refkit with current OE-core
> >>> master, right?
> >>>
> >>> 00:07:10.313 Traceback (most recent call last):
> >>> 00:07:10.313   File 
> >>> "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/scripts/oe-selftest",
> >>>  line 70, in 
> >>> 00:07:10.313 ret = main()
> >>> 00:07:10.313   File 
> >>> "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/scripts/oe-selftest",
> >>>  line 57, in main
> >>> 00:07:10.313 results = args.func(logger, args)
> >>> 00:07:10.313   File 
> >>> "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/selftest/context.py",
> >>>  line 215, in run
> >>> 00:07:10.313 rc = self._internal_run(logger, args)
> >>> 00:07:10.313   File 
> >>> "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/selftest/context.py",
> >>>  line 176, in _internal_run
> >>> 00:07:10.313 self.tc.loadTests(self.module_paths, 
> >>> **self.tc_kwargs['load'])
> >>> 00:07:10.313   File 
> >>> "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/core/context.py",
> >>>  line 51, in loadTests
> >>> 00:07:10.313 self.suites = self.loader.discover()
> >>> 00:07:10.313   File 
> >>> "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/core/loader.py",
> >>>  line 286, in discover
> >>> 00:07:10.313 pattern='*.py', top_level_dir=path)
> >>> 00:07:10.313   File "/usr/lib64/python3.4/unittest/loader.py", line 275, 
> >>> in discover
> >>> 00:07:10.313 tests = list(self._find_tests(start_dir, pattern))
> >>> 00:07:10.313   File "/usr/lib64/python3.4/unittest/loader.py", line 327, 
> >>> in _find_tests
> >>> 00:07:10.313 yield _make_failed_import_test(name, self.suiteClass)
> >>> 00:07:10.313   File "/usr/lib64/python3.4/unittest/loader.py", line 39, 
> >>> in _make_failed_import_test
> >>> 00:07:10.313 return _make_failed_test(name, ImportError(message), 
> >>> suiteClass)
> >>> 00:07:10.313 TypeError: _make_failed_test() missing 1 required positional 
> >>> argument: 'suiteClass'
> >>>
> >>> Can this particular patch please be merged into OE-core master
> >>> independently from the patch series? It's not really related to it
> >>> anyway.
> >>
> >> Yes this will fix that error, showing the error into the case.
> > 
> > The fix doesn't work for me:
> > 
> >   File "/usr/lib/python3.5/unittest/loader.py", line 41, in 
> > _make_failed_import_test
> > return _make_failed_test(name, ImportError(message), suiteClass, 
> > message)
> > TypeError: _make_failed_test() takes 3 positional arguments but 4 were given
> > 
> > You need to mimic the exact same signature as in Python itself, and
> > Python 3.5 seems to be different again:
> > 
> > /usr/lib/python3.5/unittest/loader.py:def _make_failed_test(methodname, 
> > exception, suiteClass, message):
> 
> This is strange, i tested on a python 3.5.x and python 3.4.3 versions.
> I don't know why isn't working on your machine.

Have you tested with a test case that fails?

python3.5 = 3.5.3 definitely has four parameters, as quoted above.

I don't know which version has "def _make_failed_test(classname,
exception, suiteClass)".

The actual error in refkit is:

ImportError: Failed to import test module: refkit_ostree
Traceback (most recent call last):
  File "/usr/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
  File "/usr/lib/python3.5/unittest/loader.py", line 369, in 
_get_module_from_name
__import__(name)
  File 
"/fast/work/intel-iot-refkit-pr/meta-refkit-core/lib/oeqa/selftest/cases/refkit_ostree.py",
 line 12, in 
class RefkitOSTreeUpdateBase(SystemUpdateBase):
  File 
"/fast/work/intel-iot-refkit-pr/meta-refkit-core/lib/oeqa/selftest/cases/refkit_ostree.py",
 line 35, in RefkitOSTreeUpdateBase
'socat-native')
  File 
"/fast/work/intel-iot-refkit-pr/openembedded-core/meta/lib/oeqa/utils/commands.py",
 line 227, in get_bb_vars
bbenv = get_bb_env(target, postconfig=postconfig)
  File 
"/fast/work/intel-iot-refkit-pr/openembedded-core/meta/lib/oeqa/utils/commands.py",
 line 221, in get_bb_env
return bitbake("-e %s" % target, postconfig=postconfig).output
  File 
"/fast/work/intel-iot-refkit-pr/openembedded-core/meta/lib/oeqa/utils/commands.py",
 line 213, in bitbake
return runCmd(cmd, ignore_status, timeout, output_log=output_log, **options)
  File 

Re: [OE-core] [PATCH 01/30] oeqa/core/loader: Switch method definition for _make_failed_test

2017-07-17 Thread Aníbal Limón


On 07/17/2017 02:14 PM, Patrick Ohly wrote:
> On Fri, 2017-07-14 at 10:27 -0500, Aníbal Limón wrote:
>>
>> On 07/14/2017 04:52 AM, Patrick Ohly wrote:
>>> On Tue, 2017-07-11 at 15:23 -0500, Aníbal Limón wrote:
 This was a mistake of me to define wrong what methods needs
 to be defined by certain python version.

 See rev d8380d098a290510b442a7abd2dd5a50cabf5844.
>>>
>>> This will fix this error that we see in Refkit with current OE-core
>>> master, right?
>>>
>>> 00:07:10.313 Traceback (most recent call last):
>>> 00:07:10.313   File 
>>> "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/scripts/oe-selftest",
>>>  line 70, in 
>>> 00:07:10.313 ret = main()
>>> 00:07:10.313   File 
>>> "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/scripts/oe-selftest",
>>>  line 57, in main
>>> 00:07:10.313 results = args.func(logger, args)
>>> 00:07:10.313   File 
>>> "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/selftest/context.py",
>>>  line 215, in run
>>> 00:07:10.313 rc = self._internal_run(logger, args)
>>> 00:07:10.313   File 
>>> "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/selftest/context.py",
>>>  line 176, in _internal_run
>>> 00:07:10.313 self.tc.loadTests(self.module_paths, 
>>> **self.tc_kwargs['load'])
>>> 00:07:10.313   File 
>>> "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/core/context.py",
>>>  line 51, in loadTests
>>> 00:07:10.313 self.suites = self.loader.discover()
>>> 00:07:10.313   File 
>>> "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/core/loader.py",
>>>  line 286, in discover
>>> 00:07:10.313 pattern='*.py', top_level_dir=path)
>>> 00:07:10.313   File "/usr/lib64/python3.4/unittest/loader.py", line 275, in 
>>> discover
>>> 00:07:10.313 tests = list(self._find_tests(start_dir, pattern))
>>> 00:07:10.313   File "/usr/lib64/python3.4/unittest/loader.py", line 327, in 
>>> _find_tests
>>> 00:07:10.313 yield _make_failed_import_test(name, self.suiteClass)
>>> 00:07:10.313   File "/usr/lib64/python3.4/unittest/loader.py", line 39, in 
>>> _make_failed_import_test
>>> 00:07:10.313 return _make_failed_test(name, ImportError(message), 
>>> suiteClass)
>>> 00:07:10.313 TypeError: _make_failed_test() missing 1 required positional 
>>> argument: 'suiteClass'
>>>
>>> Can this particular patch please be merged into OE-core master
>>> independently from the patch series? It's not really related to it
>>> anyway.
>>
>> Yes this will fix that error, showing the error into the case.
> 
> The fix doesn't work for me:
> 
>   File "/usr/lib/python3.5/unittest/loader.py", line 41, in 
> _make_failed_import_test
> return _make_failed_test(name, ImportError(message), suiteClass, message)
> TypeError: _make_failed_test() takes 3 positional arguments but 4 were given
> 
> You need to mimic the exact same signature as in Python itself, and
> Python 3.5 seems to be different again:
> 
> /usr/lib/python3.5/unittest/loader.py:def _make_failed_test(methodname, 
> exception, suiteClass, message):

This is strange, i tested on a python 3.5.x and python 3.4.3 versions.
I don't know why isn't working on your machine.

Cheers,
Anibal

> 
> You can probably get away with
> 
> if sys.version_info >= (3,4,4):
> def _make_failed_test(classname, exception, suiteClass, message=None):
> 
> The actual problem in refkit is that we are hitting this
> _make_failed_test() at all. After fixing meta/lib/oeqa/core/loader.py, I
> am getting a more useful exception and know what to do about the actual
> problem.
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 01/30] oeqa/core/loader: Switch method definition for _make_failed_test

2017-07-17 Thread Patrick Ohly
On Fri, 2017-07-14 at 10:27 -0500, Aníbal Limón wrote:
> 
> On 07/14/2017 04:52 AM, Patrick Ohly wrote:
> > On Tue, 2017-07-11 at 15:23 -0500, Aníbal Limón wrote:
> >> This was a mistake of me to define wrong what methods needs
> >> to be defined by certain python version.
> >>
> >> See rev d8380d098a290510b442a7abd2dd5a50cabf5844.
> > 
> > This will fix this error that we see in Refkit with current OE-core
> > master, right?
> > 
> > 00:07:10.313 Traceback (most recent call last):
> > 00:07:10.313   File 
> > "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/scripts/oe-selftest",
> >  line 70, in 
> > 00:07:10.313 ret = main()
> > 00:07:10.313   File 
> > "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/scripts/oe-selftest",
> >  line 57, in main
> > 00:07:10.313 results = args.func(logger, args)
> > 00:07:10.313   File 
> > "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/selftest/context.py",
> >  line 215, in run
> > 00:07:10.313 rc = self._internal_run(logger, args)
> > 00:07:10.313   File 
> > "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/selftest/context.py",
> >  line 176, in _internal_run
> > 00:07:10.313 self.tc.loadTests(self.module_paths, 
> > **self.tc_kwargs['load'])
> > 00:07:10.313   File 
> > "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/core/context.py",
> >  line 51, in loadTests
> > 00:07:10.313 self.suites = self.loader.discover()
> > 00:07:10.313   File 
> > "/srv/jenkins/workspace/ci-2017-07-14_01-48-19-build-2315/openembedded-core/meta/lib/oeqa/core/loader.py",
> >  line 286, in discover
> > 00:07:10.313 pattern='*.py', top_level_dir=path)
> > 00:07:10.313   File "/usr/lib64/python3.4/unittest/loader.py", line 275, in 
> > discover
> > 00:07:10.313 tests = list(self._find_tests(start_dir, pattern))
> > 00:07:10.313   File "/usr/lib64/python3.4/unittest/loader.py", line 327, in 
> > _find_tests
> > 00:07:10.313 yield _make_failed_import_test(name, self.suiteClass)
> > 00:07:10.313   File "/usr/lib64/python3.4/unittest/loader.py", line 39, in 
> > _make_failed_import_test
> > 00:07:10.313 return _make_failed_test(name, ImportError(message), 
> > suiteClass)
> > 00:07:10.313 TypeError: _make_failed_test() missing 1 required positional 
> > argument: 'suiteClass'
> > 
> > Can this particular patch please be merged into OE-core master
> > independently from the patch series? It's not really related to it
> > anyway.
> 
> Yes this will fix that error, showing the error into the case.

The fix doesn't work for me:

  File "/usr/lib/python3.5/unittest/loader.py", line 41, in 
_make_failed_import_test
return _make_failed_test(name, ImportError(message), suiteClass, message)
TypeError: _make_failed_test() takes 3 positional arguments but 4 were given

You need to mimic the exact same signature as in Python itself, and
Python 3.5 seems to be different again:

/usr/lib/python3.5/unittest/loader.py:def _make_failed_test(methodname, 
exception, suiteClass, message):

You can probably get away with

if sys.version_info >= (3,4,4):
def _make_failed_test(classname, exception, suiteClass, message=None):

The actual problem in refkit is that we are hitting this
_make_failed_test() at all. After fixing meta/lib/oeqa/core/loader.py, I
am getting a more useful exception and know what to do about the actual
problem.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] licenses.conf: enable CDDLv1 license

2017-07-17 Thread Burton, Ross
Merged into my staging branch this morning, thanks.

Ross

On 17 July 2017 at 18:10, Martin Kelly  wrote:

> (ping)
>
>
> On 07/10/2017 03:18 PM, Martin Kelly wrote:
>
>> The CDDL license is now used by open-vm-tools in meta-openembedded, so
>> we need to add it in order to prevent warnings.
>>
>> Signed-off-by: Martin Kelly 
>> ---
>>  meta/conf/licenses.conf | 4 
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/meta/conf/licenses.conf b/meta/conf/licenses.conf
>> index d210a0e940..3e2d2589ab 100644
>> --- a/meta/conf/licenses.conf
>> +++ b/meta/conf/licenses.conf
>> @@ -105,6 +105,10 @@ SPDXLICENSEMAP[AFL-1] = "AFL-1.2"
>>  SPDXLICENSEMAP[AFLv2] = "AFL-2.0"
>>  SPDXLICENSEMAP[AFLv1] = "AFL-1.2"
>>
>> +#CDDL variations
>> +SPDXLICENSEMAP[CDDLv1] = "CDDL-1.0"
>> +SPDXLICENSEMAP[CDDL-1] = "CDDL-1.0"
>> +
>>  #Other variations
>>  SPDXLICENSEMAP[EPLv1.0] = "EPL-1.0"
>>
>>
>>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 1/1] initramfs-framework: include install-efi module in recipe for installation

2017-07-17 Thread Otavio Salvador
On Sun, Jul 16, 2017 at 4:29 PM,   wrote:
> From: "Ng, Wei Tee" 
>
> Utilized the existing init-install-efi.sh script and renamed it to
> install-efi.sh to manage the installation process of images in
> initramfs-framework model. This script will be executed when
> "install" option is being chosen in the grub menu and install
> the image on the target platform. A new install-efi module is
> being added in the recipe to handle the installation process
> using initramfs-framework.
>
> [YOCTO #10989]
>
> Signed-off-by: Ng, Wei Tee 

Fine now ;-)


-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] mesa: Upgrade to 17.1.5 release

2017-07-17 Thread Otavio Salvador
This is a stable bugfix release. Following upstream bugs were fixed:

Bug 100242 - radeon buffer allocation failure during startup of Factorio
Bug 101657 - strtod.c:32:10: fatal error: xlocale.h: No such file or directory
Bug 101666 - bitfieldExtract is marked as a built-in function on OpenGL ES 3.0, 
but was added in OpenGL ES 3.1
Bug 101703 - No stencil buffer allocated when requested by GLUT

Also, the following patches were included in this release and as such
deleted:

- etnaviv_fix-shader-miscompilation.patch

Signed-off-by: Otavio Salvador 
---

 .../files/etnaviv_fix-shader-miscompilation.patch  | 220 -
 .../mesa/{mesa-gl_17.1.4.bb => mesa-gl_17.1.5.bb}  |   0
 .../mesa/{mesa_17.1.4.bb => mesa_17.1.5.bb}|   6 +-
 3 files changed, 2 insertions(+), 224 deletions(-)
 delete mode 100644 
meta/recipes-graphics/mesa/files/etnaviv_fix-shader-miscompilation.patch
 rename meta/recipes-graphics/mesa/{mesa-gl_17.1.4.bb => mesa-gl_17.1.5.bb} 
(100%)
 rename meta/recipes-graphics/mesa/{mesa_17.1.4.bb => mesa_17.1.5.bb} (80%)

diff --git 
a/meta/recipes-graphics/mesa/files/etnaviv_fix-shader-miscompilation.patch 
b/meta/recipes-graphics/mesa/files/etnaviv_fix-shader-miscompilation.patch
deleted file mode 100644
index 0354e2a57f..00
--- a/meta/recipes-graphics/mesa/files/etnaviv_fix-shader-miscompilation.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-From ec43605189907fa327a4a7f457aa3c822cfdea5d Mon Sep 17 00:00:00 2001
-From: Lucas Stach 
-Date: Mon, 26 Jun 2017 18:24:31 +0200
-Subject: etnaviv: fix shader miscompilation with more than 16 labels
-
-The labels array may change its virtual address on a reallocation, so
-it is invalid to cache pointers into the array. Rather than using the
-pointer directly, remember the array index.
-
-Fixes miscompilation of shaders in glmark2 ideas, leading to GPU hangs.
-
-Fixes: c9e8b49b (etnaviv: gallium driver for Vivante GPUs)
-Cc: mesa-sta...@lists.freedesktop.org
-Signed-off-by: Lucas Stach 
-Reviewed-by: Christian Gmeiner 
-
-Upstream-Status: Backport [17.1.5]
-
-diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler.c 
b/src/gallium/drivers/etnaviv/etnaviv_compiler.c
-index eafb511..af0f76b 100644
 a/src/gallium/drivers/etnaviv/etnaviv_compiler.c
-+++ b/src/gallium/drivers/etnaviv/etnaviv_compiler.c
-@@ -119,10 +119,10 @@ enum etna_compile_frame_type {
-  */
- struct etna_compile_frame {
-enum etna_compile_frame_type type;
--   struct etna_compile_label *lbl_else;
--   struct etna_compile_label *lbl_endif;
--   struct etna_compile_label *lbl_loop_bgn;
--   struct etna_compile_label *lbl_loop_end;
-+   int lbl_else_idx;
-+   int lbl_endif_idx;
-+   int lbl_loop_bgn_idx;
-+   int lbl_loop_end_idx;
- };
- 
- struct etna_compile_file {
-@@ -178,7 +178,7 @@ struct etna_compile {
-/* Fields for handling nested conditionals */
-struct etna_compile_frame frame_stack[ETNA_MAX_DEPTH];
-int frame_sp;
--   struct etna_compile_label *lbl_usage[ETNA_MAX_INSTRUCTIONS];
-+   int lbl_usage[ETNA_MAX_INSTRUCTIONS];
- 
-unsigned labels_count, labels_sz;
-struct etna_compile_label *labels;
-@@ -990,7 +990,7 @@ etna_src_uniforms_conflict(struct etna_inst_src a, struct 
etna_inst_src b)
- }
- 
- /* create a new label */
--static struct etna_compile_label *
-+static unsigned int
- alloc_new_label(struct etna_compile *c)
- {
-struct etna_compile_label label = {
-@@ -999,7 +999,7 @@ alloc_new_label(struct etna_compile *c)
- 
-array_insert(c->labels, label);
- 
--   return >labels[c->labels_count - 1];
-+   return c->labels_count - 1;
- }
- 
- /* place label at current instruction pointer */
-@@ -1015,10 +1015,10 @@ label_place(struct etna_compile *c, struct 
etna_compile_label *label)
-  * as the value becomes known.
-  */
- static void
--label_mark_use(struct etna_compile *c, struct etna_compile_label *label)
-+label_mark_use(struct etna_compile *c, int lbl_idx)
- {
-assert(c->inst_ptr < ETNA_MAX_INSTRUCTIONS);
--   c->lbl_usage[c->inst_ptr] = label;
-+   c->lbl_usage[c->inst_ptr] = lbl_idx;
- }
- 
- /* walk the frame stack and return first frame with matching type */
-@@ -1099,8 +1099,8 @@ trans_if(const struct instr_translater *t, struct 
etna_compile *c,
-/* push IF to stack */
-f->type = ETNA_COMPILE_FRAME_IF;
-/* create "else" label */
--   f->lbl_else = alloc_new_label(c);
--   f->lbl_endif = NULL;
-+   f->lbl_else_idx = alloc_new_label(c);
-+   f->lbl_endif_idx = -1;
- 
-/* We need to avoid the emit_inst() below becoming two instructions */
-if (etna_src_uniforms_conflict(src[0], imm_0))
-@@ -1108,7 +1108,7 @@ trans_if(const struct instr_translater *t, struct 
etna_compile *c,
- 
-/* mark position in instruction stream of label reference so that it can be
- * filled in in next pass */
--   label_mark_use(c, f->lbl_else);
-+   label_mark_use(c, f->lbl_else_idx);
- 
-/* create 

Re: [OE-core] [PATCH] licenses.conf: enable CDDLv1 license

2017-07-17 Thread Martin Kelly

(ping)

On 07/10/2017 03:18 PM, Martin Kelly wrote:

The CDDL license is now used by open-vm-tools in meta-openembedded, so
we need to add it in order to prevent warnings.

Signed-off-by: Martin Kelly 
---
 meta/conf/licenses.conf | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/conf/licenses.conf b/meta/conf/licenses.conf
index d210a0e940..3e2d2589ab 100644
--- a/meta/conf/licenses.conf
+++ b/meta/conf/licenses.conf
@@ -105,6 +105,10 @@ SPDXLICENSEMAP[AFL-1] = "AFL-1.2"
 SPDXLICENSEMAP[AFLv2] = "AFL-2.0"
 SPDXLICENSEMAP[AFLv1] = "AFL-1.2"

+#CDDL variations
+SPDXLICENSEMAP[CDDLv1] = "CDDL-1.0"
+SPDXLICENSEMAP[CDDL-1] = "CDDL-1.0"
+
 #Other variations
 SPDXLICENSEMAP[EPLv1.0] = "EPL-1.0"



--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] icecc in OE (Was: [PATCH] icecc.bbclass: prevent nativesdk builds depending on target specific KERNEL_CC)

2017-07-17 Thread Tomas Novotny
Hi Martin,

On Mon, 17 Jul 2017 17:35:46 +0200
Martin Jansa  wrote:

> Hi Tomas,
> 
> last time we were more actively using 1.0.1-1 (with Ubuntu 12.04), but
> nowadays icecc.bbclass is mostly just historic relic for us, we still
> inherit it in our DISTROs (with 99.% builds running with ICECC_DISABLED
> = "1"), so that if someone enables icecc again he will get the same sstate
> signatures as our jenkins builds - to reuse already prepopulated
> sstate-cache.

so it looks like that there is only a few active users of icecc in oe...

> We also use own version of icecc-create-env, still the same as long time
> ago in:
> https://github.com/openwebos/meta-webos/tree/master/recipes-upstreamable/icecc-create-env

yes, I found it during my initial tests, but I was not sure if it used
(because of age).

Thanks for the information,

Tomas

> Regards,
> 
> On Mon, Jul 17, 2017 at 5:18 PM, Tomas Novotny  wrote:
> 
> > Hi Martin,
> >
> > which version of icecc are you using?
> >
> > We were trying 1.1rc2, but we had to patch icecc-create-env script in oe.
> >
> > Tomas
> >
> > On Mon, 17 Jul 2017 16:04:50 +0200
> > Martin Jansa  wrote:
> >  
> > > * without this we cause nativesdk-linux-libc-headers to depend
> > >   on target specific KERNEL_CC (through icecc_get_tool ->
> > >   icecc_is_kernel -> KERNEL_CC -> HOST_CC_KERNEL_ARCH ->
> > >   TARGET_CC_KERNEL_ARCH -> TUNE_FEATURES(thumb) as shown by
> > >   bitbake-diffsigs:
> > >
> > >   OE qemux86@ ~/build/oe-core $ ls /OE/build/oe-core/tmp-glibc/  
> > sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata*  
> > >   /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/  
> > qemuarm/x86_64-nativesdk-oesdk-linux/nativesdk-linux-
> > libc-headers/4.10-r0.do_configure.sigdata.3a9a423878d56524e0ee8e42eba1804f  
> > >   /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/  
> > qemux86/x86_64-nativesdk-oesdk-linux/nativesdk-linux-
> > libc-headers/4.10-r0.do_configure.sigdata.401071dbaa88903ece37d35a47965ff2  
> > >
> > >   OE qemux86@ ~/build/oe-core $ bitbake-diffsigs  
> > /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*
> > sdk*/*/*do_configure.sigdata*  
> > >   basehash changed from 39774238b66763c598153132e87a2c1a to  
> > aa2d66e770bf533e312536eb0a401c4c  
> > >   Variable TARGET_CC_KERNEL_ARCH value changed from  
> > '${@bb.utils.contains('TUNE_FEATURES', 'thumb',
> > '-mno-thumb-interwork-marm', '', d)} TUNE_FEATURES{thumb} = Set' to ''  
> > >
> > > Signed-off-by: Martin Jansa 
> > > ---
> > >  meta/classes/icecc.bbclass | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
> > > index 8a3308bdda..1cc1c4ddb0 100644
> > > --- a/meta/classes/icecc.bbclass
> > > +++ b/meta/classes/icecc.bbclass
> > > @@ -42,6 +42,7 @@ def icecc_dep_prepend(d):
> > >
> > >  DEPENDS_prepend += "${@icecc_dep_prepend(d)} "
> > >
> > > +get_cross_kernel_cc[vardepsexclude] += "KERNEL_CC"
> > >  def get_cross_kernel_cc(bb,d):
> > >  kernel_cc = d.getVar('KERNEL_CC', False)
> > >  
> >  
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] do_package: sources are packaged separately from debug.

2017-07-17 Thread juan . m . cruz . alcaraz
From: Juan M Cruz Alcaraz 

The configuration variable PACKAGE_DBG_SPLIT_SRC instructs the system
to remove the source files from the debug package but include them in
a separate package with a "-src" suffix in the name.

[YOCTO #9998]

Signed-off-by: Juan M Cruz Alcaraz 
---
 meta/classes/package.bbclass | 24 +---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index cc466bd1b2..7ce739bf30 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -886,6 +886,10 @@ python split_and_strip_files () {
 debuglibdir = ""
 debugsrcdir = "/usr/src/debug"
 
+if d.getVar('PACKAGE_DBG_SPLIT_SRC') == '1':
+   # Set sources into an specific package
+debugsrcdir  = "/usr/src/debug"
+
 sourcefile = d.expand("${WORKDIR}/debugsources.list")
 bb.utils.remove(sourcefile)
 
@@ -1092,6 +1096,15 @@ python populate_packages () {
 
 autodebug = not (d.getVar("NOAUTOPACKAGEDEBUG") or False)
 
+split_source_package =  d.getVar('PACKAGE_DBG_SPLIT_SRC') or False
+
+# If PACKAGE_DBG_SPLIT_SRC is enabled then the src package is added
+# into the package list and the source directory as its main content
+if split_source_package:
+src_package_name = ('%s-src' % d.getVar('PN'))
+packages += (' ' + src_package_name)
+d.setVar('FILES_%s' % src_package_name, '/usr/src/debug')
+
 # Sanity check PACKAGES for duplicates
 # Sanity should be moved to sanity.bbclass once we have the infrastucture
 package_list = []
@@ -1100,7 +1113,12 @@ python populate_packages () {
 if pkg in package_list:
 msg = "%s is listed in PACKAGES multiple times, this leads to 
packaging errors." % pkg
 package_qa_handle_error("packages-list", msg, d)
-elif autodebug and pkg.endswith("-dbg"):
+# If PACKAGE_DBG_SPLIT_SRC is enabled then the src package will have
+# priority over dbg package when assigning the files.
+# This allows src package to include source files and remove them from 
dbg.
+elif split_source_package and pkg.endswith("-src"):
+package_list.insert(0, pkg)
+elif autodebug and pkg.endswith("-dbg") and not split_source_package:
 package_list.insert(0, pkg)
 else:
 package_list.append(pkg)
@@ -1460,7 +1478,7 @@ python package_do_filedeps() {
 for pkg in packages.split():
 if d.getVar('SKIP_FILEDEPS_' + pkg) == '1':
 continue
-if pkg.endswith('-dbg') or pkg.endswith('-doc') or 
pkg.find('-locale-') != -1 or pkg.find('-localedata-') != -1 or 
pkg.find('-gconv-') != -1 or pkg.find('-charmap-') != -1 or 
pkg.startswith('kernel-module-'):
+if pkg.endswith('-dbg') or pkg.endswith('-doc') or 
pkg.find('-locale-') != -1 or pkg.find('-localedata-') != -1 or 
pkg.find('-gconv-') != -1 or pkg.find('-charmap-') != -1 or 
pkg.startswith('kernel-module-') or pkg.endswith('-src'):
 continue
 for files in chunks(pkgfiles[pkg], 100):
 pkglist.append((pkg, files, rpmdeps, pkgdest, magic))
@@ -1578,7 +1596,7 @@ python package_do_shlibs() {
 combos.append("-".join(options[0:i]))
 return combos
 
-if (file.endswith('.dylib') or file.endswith('.so')) and not 
pkg.endswith('-dev') and not pkg.endswith('-dbg'):
+if (file.endswith('.dylib') or file.endswith('.so')) and not 
pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-src'):
 # Drop suffix
 name = os.path.basename(file).rsplit(".",1)[0]
 # Find all combinations
-- 
2.12.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2 v4] pkgconfig: allow kernel to be build with esdk

2017-07-17 Thread Saul Wold
When the kernel's menuconfig target is called while using the esdk or an
esdk-based container, the pkg-config info that is found is not correct.
The pkg-config info is for the target, but we need the eSDK's information
in order to build the host based menuconfig.

The new pkg-config-esdk script checks both that it's in SDK and being
called from the check-lxdialog script in order to limit the scope of when
the pkg-config automagically switches to pkg-config-native.

The pkg-config-esdk is only installed as pkg-config inside the eSDK, which
is why we use the sstate post install script and check for if we are in the
esdk environment using the WITHIN_EXT_SDK

[YOCTO #11155]

Signed-off-by: Saul Wold 
---
 .../pkgconfig/pkgconfig/pkg-config-esdk.in | 24 ++
 meta/recipes-devtools/pkgconfig/pkgconfig_git.bb   | 16 +++
 2 files changed, 40 insertions(+)
 create mode 100644 meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in

diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in 
b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in
new file mode 100644
index 000..4fc9b0a
--- /dev/null
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-esdk.in
@@ -0,0 +1,24 @@
+#! /bin/sh
+
+# Orignal pkg-config-native action when called as pkg-config-native
+# NO Change here
+if [ "pkg-config-native" = "`basename $0`" ] ; then
+   PKG_CONFIG_PATH="@PATH_NATIVE@"
+   PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+   unset PKG_CONFIG_SYSROOT_DIR
+else
+   # in this case check if we are in the esdk
+   if [ "$OE_SKIP_SDK_CHECK" = "1" ] ; then
+   parentpid=`ps -o ppid= -p $$`
+   parentpid_info=`ps -wo comm= -o args= -p $parentpid`
+
+   # check if we are being called from  the kernel's make 
menuconfig
+   if ( echo $parentpid_info | grep -q check-lxdialog ) ; then
+   PKG_CONFIG_PATH="@PATH_NATIVE@"
+   PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
+   unset PKG_CONFIG_SYSROOT_DIR
+   fi
+   fi
+fi
+
+pkg-config.real "$@"
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb 
b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
index e634021..52ef2a9 100644
--- a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
@@ -12,6 +12,7 @@ SRCREV = "edf8e6f0ea77ede073f07bff0d2ae1fc7a38103b"
 PV = "0.29.2+git${SRCPV}"
 
 SRC_URI = "git://anongit.freedesktop.org/pkg-config \
+   file://pkg-config-esdk.in \
file://pkg-config-native.in \
file://fix-glib-configure-libtool-usage.patch \

file://0001-glib-gettext.m4-Update-AM_GLIB_GNU_GETTEXT-to-match-.patch \
@@ -54,4 +55,19 @@ do_install_append_class-native () {
 -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
 < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
 install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
+sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+-e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
+< ${WORKDIR}/pkg-config-esdk.in > ${B}/pkg-config-esdk
+install -m755 ${B}/pkg-config-esdk ${D}${bindir}/pkg-config-esdk
 }
+
+pkgconfig_sstate_fixup_esdk () {
+   if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" -a 
"${WITHIN_EXT_SDK}" = "1" ] ; then
+   
pkgconfdir="${SSTATE_INSTDIR}/recipe-sysroot-native/${bindir_native}"
+   mv $pkgconfdir/pkg-config $pkgconfdir/pkg-config.real
+   lnr $pkgconfdir/pkg-config-esdk $pkgconfdir/pkg-config
+   sed -i -e "s|^pkg-config|pkg-config.real|" 
$pkgconfdir/pkg-config-native
+   fi
+}
+
+SSTATEPOSTUNPACKFUNCS_append_class-native = " pkgconfig_sstate_fixup_esdk"
-- 
2.7.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] populate_sdk_ext: Add variable to indicate running in eSDK

2017-07-17 Thread Saul Wold
This allows for other scripts to know that they are being executed in
the context of the eSDK in order to provide different behaviour as
needed.

[YOCTO #11155]

Signed-off-by: Saul Wold 
---
 meta/classes/populate_sdk_ext.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes/populate_sdk_ext.bbclass 
b/meta/classes/populate_sdk_ext.bbclass
index 4791d74..c70c435 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -352,6 +352,9 @@ python copy_buildsystem () {
 # Hide the config information from bitbake output (since it's 
fixed within the SDK)
 f.write('BUILDCFG_HEADER = ""\n\n')
 
+f.write('# Provide a flag to indicate we are in the EXT_SDK 
Context\n')
+f.write('WITHIN_EXT_SDK = "1"\n\n')
+
 # Map gcc-dependent uninative sstate cache for installer usage
 f.write('SSTATE_MIRRORS += " file://universal/(.*) 
file://universal-4.9/\\1 file://universal-4.9/(.*) 
file://universal-4.8/\\1"\n\n')
 
-- 
2.7.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] State of bitbake world, Failed tasks 2017-07-16

2017-07-17 Thread Martin Jansa
The v2s of those patches really helped:

http://www.openembedded.org/wiki/Bitbake_World_Status

== Number of issues - stats ==
{| class='wikitable'
!|Date   !!colspan='3'|Failed tasks 
!!|Signatures   
!!colspan='14'|QA !!Comment
|-
||  ||qemuarm   ||qemux86   ||qemux86_64||all
||already-stripped  ||libdir||textrel   ||build-deps
||file-rdeps||version-going-backwards   ||host-user-contaminated
||installed-vs-shipped  ||unknown-configure-option  ||symlink-to-sysroot
||invalid-pkgconfig ||pkgname   ||ldflags   ||compile-host-path 
||
|-
||2017-07-17||5 ||4 ||4 ||0 ||0 ||0 
||0 ||0 ||0 ||0 ||0 
||0 ||0 ||0 ||0 ||0 
||0 ||0 ||
|}

== Failed tasks 2017-07-17 ==

INFO: jenkins-job.sh-1.8.25 Complete log available at
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.report.20170717_054804.log

=== common (4) ===
* meta-browser/recipes-mozilla/firefox/firefox_45.9.0esr.bb:do_compile
* 
meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb:do_compile
* meta-webos-ports/meta-luneui/recipes-webos/pmloglib/pmloglib.bb:do_compile
* 
openembedded-core/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb:do_compile

=== common-x86 (0) ===

=== qemuarm (1) ===
* 
meta-openembedded/meta-oe/recipes-support/mysql/mariadb_5.5.55.bb:do_compile

=== qemux86 (0) ===

=== qemux86_64 (0) ===

=== Number of failed tasks (13) ===
{| class=wikitable
|-
|| qemuarm  || 5 ||
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.world.qemuarm.20170717_011149.log/
|| http://errors.yoctoproject.org/Errors/Build/41271/
|-
|| qemux86  || 4 ||
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.world.qemux86.20170717_011149.log/
|| http://errors.yoctoproject.org/Errors/Build/41272/
|-
|| qemux86_64   || 4 ||
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.world.qemux86-64.20170717_031905.log/
|| http://errors.yoctoproject.org/Errors/Build/41273/
|}

=== PNBLACKLISTs (14) ===

=== QA issues (0) ===
{| class=wikitable
!| Count||Issue
|-
||0 ||already-stripped
|-
||0 ||build-deps
|-
||0 ||compile-host-path
|-
||0 ||file-rdeps
|-
||0 ||host-user-contaminated
|-
||0 ||installed-vs-shipped
|-
||0 ||invalid-pkgconfig
|-
||0 ||ldflags
|-
||0 ||libdir
|-
||0 ||pkgname
|-
||0 ||symlink-to-sysroot
|-
||0 ||textrel
|-
||0 ||unknown-configure-option
|-
||0 ||version-going-backwards
|}



=== Incorrect PACKAGE_ARCH or sstate signatures (0) ===

Complete log: 
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.signatures.20170717_031354.log/

No issues detected


PNBLACKLISTs:
openembedded-core/:
meta-browser:
meta-openembedded:
meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb:PNBLACKLIST[lksctp-tools]
?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "BROKEN:
fails to link against sctp_connectx symbol", '', d)}"
meta-oe/recipes-connectivity/bluez/bluez-hcidump_2.5.bb:PNBLACKLIST[bluez-hcidump]
?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5
conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '',
d)}"
meta-oe/recipes-connectivity/bluez/bluez4_4.101.bb:PNBLACKLIST[bluez4]
?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5
conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '',
d)}"
meta-oe/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb:PNBLACKLIST[gst-plugin-bluetooth]
?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5
conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '',
d)}"
meta-oe/recipes-graphics/libsexy/libsexy_0.1.11.bb:PNBLACKLIST[libsexy]
?= "Fails to build with RSS
http://errors.yoctoproject.org/Errors/Details/130607/ - the recipe
will be removed on 2017-09-01 unless the issue is fixed"
meta-oe/recipes-graphics/xorg-driver/xf86-video-geode_2.11.16.bb:PNBLACKLIST[xf86-video-geode]
?= "BROKEN, fails to build - the recipe will be removed on 2017-09-01
unless the issue is fixed"
meta-oe/recipes-navigation/foxtrotgps/foxtrotgps_1.1.1.bb:PNBLACKLIST[foxtrotgps]
?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5
conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '',
d)}"
meta-oe/recipes-navigation/gypsy/gypsy.inc:PNBLACKLIST[gypsy] ?=
"${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts
with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-oe/recipes-navigation/navit/navit.inc:PNBLACKLIST[navit] ?=
"${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts
with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"

Re: [OE-core] icecc in OE (Was: [PATCH] icecc.bbclass: prevent nativesdk builds depending on target specific KERNEL_CC)

2017-07-17 Thread Martin Jansa
Hi Tomas,

last time we were more actively using 1.0.1-1 (with Ubuntu 12.04), but
nowadays icecc.bbclass is mostly just historic relic for us, we still
inherit it in our DISTROs (with 99.% builds running with ICECC_DISABLED
= "1"), so that if someone enables icecc again he will get the same sstate
signatures as our jenkins builds - to reuse already prepopulated
sstate-cache.

We also use own version of icecc-create-env, still the same as long time
ago in:
https://github.com/openwebos/meta-webos/tree/master/recipes-upstreamable/icecc-create-env

Regards,

On Mon, Jul 17, 2017 at 5:18 PM, Tomas Novotny  wrote:

> Hi Martin,
>
> which version of icecc are you using?
>
> We were trying 1.1rc2, but we had to patch icecc-create-env script in oe.
>
> Tomas
>
> On Mon, 17 Jul 2017 16:04:50 +0200
> Martin Jansa  wrote:
>
> > * without this we cause nativesdk-linux-libc-headers to depend
> >   on target specific KERNEL_CC (through icecc_get_tool ->
> >   icecc_is_kernel -> KERNEL_CC -> HOST_CC_KERNEL_ARCH ->
> >   TARGET_CC_KERNEL_ARCH -> TUNE_FEATURES(thumb) as shown by
> >   bitbake-diffsigs:
> >
> >   OE qemux86@ ~/build/oe-core $ ls /OE/build/oe-core/tmp-glibc/
> sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata*
> >   /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/
> qemuarm/x86_64-nativesdk-oesdk-linux/nativesdk-linux-
> libc-headers/4.10-r0.do_configure.sigdata.3a9a423878d56524e0ee8e42eba1804f
> >   /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/
> qemux86/x86_64-nativesdk-oesdk-linux/nativesdk-linux-
> libc-headers/4.10-r0.do_configure.sigdata.401071dbaa88903ece37d35a47965ff2
> >
> >   OE qemux86@ ~/build/oe-core $ bitbake-diffsigs
> /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*
> sdk*/*/*do_configure.sigdata*
> >   basehash changed from 39774238b66763c598153132e87a2c1a to
> aa2d66e770bf533e312536eb0a401c4c
> >   Variable TARGET_CC_KERNEL_ARCH value changed from
> '${@bb.utils.contains('TUNE_FEATURES', 'thumb',
> '-mno-thumb-interwork-marm', '', d)} TUNE_FEATURES{thumb} = Set' to ''
> >
> > Signed-off-by: Martin Jansa 
> > ---
> >  meta/classes/icecc.bbclass | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
> > index 8a3308bdda..1cc1c4ddb0 100644
> > --- a/meta/classes/icecc.bbclass
> > +++ b/meta/classes/icecc.bbclass
> > @@ -42,6 +42,7 @@ def icecc_dep_prepend(d):
> >
> >  DEPENDS_prepend += "${@icecc_dep_prepend(d)} "
> >
> > +get_cross_kernel_cc[vardepsexclude] += "KERNEL_CC"
> >  def get_cross_kernel_cc(bb,d):
> >  kernel_cc = d.getVar('KERNEL_CC', False)
> >
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] icecc in OE (Was: [PATCH] icecc.bbclass: prevent nativesdk builds depending on target specific KERNEL_CC)

2017-07-17 Thread Tomas Novotny
Hi Martin,

which version of icecc are you using?

We were trying 1.1rc2, but we had to patch icecc-create-env script in oe.

Tomas

On Mon, 17 Jul 2017 16:04:50 +0200
Martin Jansa  wrote:

> * without this we cause nativesdk-linux-libc-headers to depend
>   on target specific KERNEL_CC (through icecc_get_tool ->
>   icecc_is_kernel -> KERNEL_CC -> HOST_CC_KERNEL_ARCH ->
>   TARGET_CC_KERNEL_ARCH -> TUNE_FEATURES(thumb) as shown by
>   bitbake-diffsigs:
> 
>   OE qemux86@ ~/build/oe-core $ ls 
> /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata*
>   
> /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemuarm/x86_64-nativesdk-oesdk-linux/nativesdk-linux-libc-headers/4.10-r0.do_configure.sigdata.3a9a423878d56524e0ee8e42eba1804f
>   
> /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemux86/x86_64-nativesdk-oesdk-linux/nativesdk-linux-libc-headers/4.10-r0.do_configure.sigdata.401071dbaa88903ece37d35a47965ff2
> 
>   OE qemux86@ ~/build/oe-core $ bitbake-diffsigs 
> /OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata*
>   basehash changed from 39774238b66763c598153132e87a2c1a to 
> aa2d66e770bf533e312536eb0a401c4c
>   Variable TARGET_CC_KERNEL_ARCH value changed from 
> '${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork-marm', 
> '', d)} TUNE_FEATURES{thumb} = Set' to ''
> 
> Signed-off-by: Martin Jansa 
> ---
>  meta/classes/icecc.bbclass | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
> index 8a3308bdda..1cc1c4ddb0 100644
> --- a/meta/classes/icecc.bbclass
> +++ b/meta/classes/icecc.bbclass
> @@ -42,6 +42,7 @@ def icecc_dep_prepend(d):
>  
>  DEPENDS_prepend += "${@icecc_dep_prepend(d)} "
>  
> +get_cross_kernel_cc[vardepsexclude] += "KERNEL_CC"
>  def get_cross_kernel_cc(bb,d):
>  kernel_cc = d.getVar('KERNEL_CC', False)
>  
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] Yocto Project Status WW29’17

2017-07-17 Thread Jolley, Stephen K
Current Dev Position: Preparing for YP 2.4 M2

Next Deadline: YP 2.4 M2 Cut off is July 17, 2017


SWAT team rotation: Cal -> Joshua on July 14, 2017.

SWAT team rotation: Joshua -> Armin on July 21, 2017.

https://wiki.yoctoproject.org/wiki/Yocto_Build_Failure_Swat_Team


Key Status/Updates:

·YP 2.3.1 rc2 (pyro) is in QA at this time.  See status at: 
https://wiki.yoctoproject.org/wiki/2.3_QA_Status#Summary_Report

·2.4 M2 freeze is today, patches are being merged and a build should be 
in QA this week. The main dilemma with M2 is whether to include the bitbake 
server changes which effectively promote us to ‘memres’ bitbake (see below).

·There are some patches in progress to rework the bitbake server 
backend to improve the code, make ‘memres’ the default operation mode (with a 0 
timeout so the server always unloads) and to drop “xmlrpc” as a different 
transport mode and allow xmlrpc clients to optionally connect to the bitbake 
process server for remote UIs. Patches are currently in -next but have not been 
posted for review as yet. It allows a massive code simplification and 
simplifies the bitbake process handling and removes various race and zombie 
process issues that have plagued us for a while. Currently this code works, 
except for tinfoil under some circumstances for reasons as yet unknown. This is 
a significant change and we like to get it into the release early for wider 
testing but it’s not ready yet. The question is therefore whether to push this 
into M2, making M2 a little risky and late but testing a high value feature or 
to delay it until M3.


Planned upcoming dot releases:

YP 2.2.2 Cut off June 5, 2017 - Not ready to do an rc2 yet.

YP 2.2.2 Release by June, 16 2017

YP 2.3.1 Cut off May 30, 2017 - In QA at this time.

YP 2.3.1 Release by June 9, 2017

YP 2.3.2 Cut off Aug 7, 2017

YP 2.3.2 Release by Aug. 18, 2017


Key YP 2.4 Dates are:

YP 2.4 M2 Cut off is July 17, 2017

YP 2.4 M2 Release by July 28, 2017

YP 2.4 M3 Cut off is Aug. 21, 2017

YP 2.4 M3 Release by Sept. 1, 2017

YP 2.4 M4 (Final) Cut off is Sept. 18, 2017

YP 2.4 M4 (Final) Release by Oct. 20, 2017


Tracking Metrics:

WDD 2495 (last week 2508)

(https://wiki.yoctoproject.org/charts/combo.html)


Key Status Links for YP:

https://wiki.yoctoproject.org/wiki/Yocto_Project_v2.4_Status

https://wiki.yoctoproject.org/wiki/Yocto_2.4_Schedule

https://wiki.yoctoproject.org/wiki/Yocto_2.4_Features


[If anyone has suggestions for other information you’d like to see on this 
weekly status update, let us know!]

Thanks,

Stephen K. Jolley
Yocto Project Program Manager
INTEL, MS JF1-255, 2111 N.E. 25th Avenue, Hillsboro, OR 97124
•   Work Telephone:(503) 712-0534
•Cell:   (208) 244-4460
• Email:  stephen.k.jol...@intel.com

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] icecc.bbclass: prevent nativesdk builds depending on target specific KERNEL_CC

2017-07-17 Thread Martin Jansa
* without this we cause nativesdk-linux-libc-headers to depend
  on target specific KERNEL_CC (through icecc_get_tool ->
  icecc_is_kernel -> KERNEL_CC -> HOST_CC_KERNEL_ARCH ->
  TARGET_CC_KERNEL_ARCH -> TUNE_FEATURES(thumb) as shown by
  bitbake-diffsigs:

  OE qemux86@ ~/build/oe-core $ ls 
/OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata*
  
/OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemuarm/x86_64-nativesdk-oesdk-linux/nativesdk-linux-libc-headers/4.10-r0.do_configure.sigdata.3a9a423878d56524e0ee8e42eba1804f
  
/OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemux86/x86_64-nativesdk-oesdk-linux/nativesdk-linux-libc-headers/4.10-r0.do_configure.sigdata.401071dbaa88903ece37d35a47965ff2

  OE qemux86@ ~/build/oe-core $ bitbake-diffsigs 
/OE/build/oe-core/tmp-glibc/sstate-diff/1499859497/qemu*/*sdk*/*/*do_configure.sigdata*
  basehash changed from 39774238b66763c598153132e87a2c1a to 
aa2d66e770bf533e312536eb0a401c4c
  Variable TARGET_CC_KERNEL_ARCH value changed from 
'${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork-marm', 
'', d)} TUNE_FEATURES{thumb} = Set' to ''

Signed-off-by: Martin Jansa 
---
 meta/classes/icecc.bbclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 8a3308bdda..1cc1c4ddb0 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -42,6 +42,7 @@ def icecc_dep_prepend(d):
 
 DEPENDS_prepend += "${@icecc_dep_prepend(d)} "
 
+get_cross_kernel_cc[vardepsexclude] += "KERNEL_CC"
 def get_cross_kernel_cc(bb,d):
 kernel_cc = d.getVar('KERNEL_CC', False)
 
-- 
2.13.3

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] lsb: add checking for chkconfig existence when creating the symbolic

2017-07-17 Thread Leonardo Sandoval
On Mon, 2017-07-17 at 17:13 +0800, Zhenbo Gao wrote:
> remove_initd and remove_initd will be created as the symbolic file

I believe you mean 'install_initd and remove_initd'...

> of chkconfig, which will be not existed when systemd is configured,
> so adding the check for the existence of chkconfig before creating
> the symbolic.
> 
> Signed-off-by: Zhenbo Gao 
> ---
>  meta/recipes-extended/lsb/lsb_4.1.bb | 10 ++
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb 
> b/meta/recipes-extended/lsb/lsb_4.1.bb
> index cedf39e..c8db1a8 100644
> --- a/meta/recipes-extended/lsb/lsb_4.1.bb
> +++ b/meta/recipes-extended/lsb/lsb_4.1.bb
> @@ -90,11 +90,13 @@ do_install_append() {
> install -m 0755 ${WORKDIR}/init-functions 
> ${D}${nonarch_base_libdir}/lsb
>  
> # create links for LSB test
> -   if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
> -   install -d ${D}${nonarch_libdir}/lsb
> +   if [ -e ${sbindir}/chkconfig ]; then
> +   if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
> +   install -d ${D}${nonarch_libdir}/lsb
> +   fi
> +   ln -sf ${sbindir}/chkconfig 
> ${D}${nonarch_libdir}/lsb/install_initd
> +   ln -sf ${sbindir}/chkconfig 
> ${D}${nonarch_libdir}/lsb/remove_initd
> fi
> -   ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/install_initd
> -   ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/remove_initd
>  
> if [ "${TARGET_ARCH}" = "x86_64" ]; then
> if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then
> -- 
> 1.9.1
> 


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 0/1] bind: 9.10..3-P3 -> 9.10.5-P3

2017-07-17 Thread Alexander Kanavin

On 07/12/2017 11:40 AM, Kang Kai wrote:

Kai Kang (1):
   bind: 9.10..3-P3 -> 9.10.5-P3


Why not 9.11.1?

Alex
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 0/2] Introduce a distro feature openssl-no-weak-ciphers

2017-07-17 Thread Alexander Kanavin

On 07/05/2017 10:58 AM, kai.k...@windriver.com wrote:


Introduce a distro feature openssl-no-weak-ciphers to make openssl disable weak
ciphers support, including:

* des
* ec
* ecdh
* ecdsa
* md2
* mdc2


How are those handled in openssl 1.1? If they are disabled by default, 
then maybe the whole distro feature is not needed when 1.1 is in oe-core.


Alex


Alex
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] GUI based images

2017-07-17 Thread Jussi Kukkonen
I had a look at b2qt earlier and Alex asked me to share on list as well so
I'll resurrect this thread from May...

On 10 May 2017 at 14:09, Alexander Kanavin <
alexander.kana...@linux.intel.com> wrote:

> On 05/10/2017 01:55 PM, Paul Eggleton wrote:
>
>> I make no secret of it - I am a Qt supporter. I'm willing to be convinced
>> that's not the right answer, though, if there are solid arguments.
>> However, if
>> you'll excuse my paraphrasing, "it's not in OE-Core and can't be,
>> therefore we
>> should just ignore it" isn't a case against it, it's a logistical issue.
>> We
>> could easily get past that by bringing meta-qt5 into poky as we do with
>> OE-
>> Core, or even just adding it to the build configuration as needed.
>>
>
> That's not what I'm saying. I'm saying that for people who want a
> 'reference UI for real products' and have no problem with Qt, we should
> officially endorse meta-b2qt.
>
> Seriosuly. They have a wayland compositor, and an app launcher, and a set
> of embedded-specific demos, and it's written and tested by specialists with
> an explicit target of making it easy to make products. And it's open source
> with optional commercial support. In that light, there is no sense
> whatsoever in solving the same problem in oe-core, poorly.


My verdict after a bit of testing and some light digging at the sources:
Very cool demo, vastly better than Sato for "Trade show demo unit" use case
(although the current content is naturally just Qt marketing). It does not
seem useful as Sato-the-QA-platform replacement and I would be wary of
suggesting it for any product use without caveats: my worry is the
maintenance status of the DE components.

Some details:
* Some of the "Desktop Environment" components are possibly not meant for
production use: e.g. the wayland compositor/WM does not seem completely
finished, either from feature or polish POV. It's even called
"democompositor". The last real code change in the relevant repo was in Feb
2016. For a single app use case this might not matter.
* It wouldn't work as a generic desktop (needs launcher specific files per
application)
* That wouldn't be so bad but the only app they include is the browser, the
rest are ads or demos (browser admittedly is very nice)

Jussi
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2] opkg.py Adds tests for ipk/opkg

2017-07-17 Thread Burton, Ross
On 10 July 2017 at 21:22,  wrote:

> +class opkgBasicTest(opkgTest):
> +@skipIfNotFeature('package-management', 'Test requires
> package-management to be in IMAGE_FEATURES')
> +@skipIfNotDataVar('IMAGE_PKGTYPE','ipk', 'IPK is not the primary
> package manager')
> +@OEHasPackage(['opkg'])
> +
> +@OETestDepends(['ssh.SSHTest.test_ssh'])
> +@OETestID(1841)
> +def test_opkg_list(self):
> +   self.opkg('list')
> +
> +@OETestID(1842)
> +def test_opkg_list_installed(self):
> +   self.opkg('list-installed')
> +
> +@OETestID(1843)
> +def test_opkg_depends(self):
> +   self.opkg('depends opkg')
> +
> +@OETestID(1837)
> +def test_opkg_whatdepends(self):
> +  self.opkg('whatdepends opkg')
> +
> +@OETestID(1838)
> +def test_opkg_status(self):
> +  self.opkg('status')
> +
> +@OETestID(1839)
> +def test_opkg_info(self):
> +self.opkg('info opkg')
> +
> +@OETestID(1840)
> +def test_opkg_print_architecture(self):
> +self.opkg('print-architecture')
>

I'd feel a lot happier that this was a selftest if it was exercising more
than "opkg doesn't crash".  If opkg is replaced by a script that does "echo
haha; exit 0" this test case would pass, so can it verify the output too.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] State of bitbake world, Failed tasks 2017-07-16

2017-07-17 Thread Martin Jansa
This time with conf/distro/include/security_flags.inc included as
requested by Khem

systemd-bootchart is broken since glibc upgrade, Khem already suggested
the fix, hopefully Chen Qi or someone else will fix it soon.

nmon is broken even without security_flags.inc but v2 from Khem looks
like it should fix it.

There is also v2 for metacity and monkey in master-next now, so hopefully
next build will be a bit better again.

http://www.openembedded.org/wiki/Bitbake_World_Status

== Number of issues - stats ==
{| class='wikitable'
!|Date   !!colspan='3'|Failed tasks 
!!|Signatures !!colspan='14'|QA !!Comment
|-
||  ||qemuarm   ||qemux86   ||qemux86_64||all   
||already-stripped  ||libdir||textrel   ||build-deps
||file-rdeps||version-going-backwards   ||host-user-contaminated
||installed-vs-shipped  ||unknown-configure-option  ||symlink-to-sysroot
||invalid-pkgconfig ||pkgname   ||ldflags   ||compile-host-path 
||  
|-
||2017-07-16||8 ||6 ||7 ||0 ||0 ||1 
||4 ||0 ||0 ||0 ||0 
||0 ||0 ||0 ||0 ||0 
||0 ||0 ||  
|}

== Failed tasks 2017-07-16 ==

INFO: jenkins-job.sh-1.8.25 Complete log available at 
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.report.20170717_002720.log

=== common (6) ===
* meta-browser/recipes-mozilla/firefox/firefox_45.9.0esr.bb:do_compile
* 
meta-openembedded/meta-gnome/recipes-gnome/metacity/metacity_2.34.13.bb:do_compile
* 
meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb:do_compile
* 
meta-openembedded/meta-webserver/recipes-httpd/monkey/monkey_1.5.6.bb:do_compile
* meta-webos-ports/meta-luneui/recipes-webos/pmloglib/pmloglib.bb:do_compile
* 
openembedded-core/meta/recipes-devtools/systemd-bootchart/systemd-bootchart_231.bb:do_compile

=== common-x86 (0) ===

=== qemuarm (2) ===
* 
meta-openembedded/meta-oe/recipes-support/mysql/mariadb_5.5.55.bb:do_compile
* meta-openembedded/meta-oe/recipes-support/nmon/nmon_16g.bb:do_compile

=== qemux86 (0) ===

=== qemux86_64 (0) ===

=== Number of failed tasks (21) ===
{| class=wikitable
|-
|| qemuarm  || 8 || 
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.world.qemuarm.20170714_122654.log/
 || http://errors.yoctoproject.org/Errors/Build/41265/
|-
|| qemux86  || 6 || 
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.world.qemux86.20170714_122654.log/
 || http://errors.yoctoproject.org/Errors/Build/41266/
|-
|| qemux86_64   || 7 || 
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.world.qemux86-64.20170716_100826.log/
 || http://errors.yoctoproject.org/Errors/Build/41270/
|}

=== PNBLACKLISTs (14) ===

=== QA issues (5) ===
{| class=wikitable
!| Count||Issue
|-
||0 ||already-stripped
|-
||0 ||build-deps
|-
||0 ||compile-host-path
|-
||0 ||file-rdeps
|-
||0 ||host-user-contaminated
|-
||0 ||installed-vs-shipped
|-
||0 ||invalid-pkgconfig
|-
||0 ||ldflags
|-
||0 ||pkgname
|-
||0 ||symlink-to-sysroot
|-
||0 ||unknown-configure-option
|-
||0 ||version-going-backwards
|-
||1 ||libdir
|-
||4 ||textrel
|}



=== Incorrect PACKAGE_ARCH or sstate signatures (0) ===

Complete log: 
http://logs.nslu2-linux.org/buildlogs/oe/world/rocko/log.signatures.20170715_102407.log/

No issues detected


PNBLACKLISTs:
openembedded-core/:
meta-browser:
meta-openembedded:
meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb:PNBLACKLIST[lksctp-tools]
 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "BROKEN: fails to 
link against sctp_connectx symbol", '', d)}"
meta-oe/recipes-connectivity/bluez/bluez-hcidump_2.5.bb:PNBLACKLIST[bluez-hcidump]
 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with 
bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-oe/recipes-connectivity/bluez/bluez4_4.101.bb:PNBLACKLIST[bluez4] ?= 
"${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with 
bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-oe/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb:PNBLACKLIST[gst-plugin-bluetooth]
 ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with 
bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-oe/recipes-graphics/libsexy/libsexy_0.1.11.bb:PNBLACKLIST[libsexy] ?= 
"Fails to build with RSS http://errors.yoctoproject.org/Errors/Details/130607/ 
- the recipe will be removed on 2017-09-01 unless the issue is fixed"
meta-oe/recipes-graphics/xorg-driver/xf86-video-geode_2.11.16.bb:PNBLACKLIST[xf86-video-geode]
 ?= "BROKEN, fails to build - the recipe will be removed on 2017-09-01 unless 
the issue is fixed"

Re: [OE-core] [PATCH 0/3] Enhancement on devtool edit-recipe

2017-07-17 Thread Burton, Ross
On 17 July 2017 at 10:43, Paul Eggleton 
wrote:

> I've looked at these already, in case that's a concern.
>
> Acked-by: Paul Eggleton 
>

Just merged these (and the other devtool) series to staging.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 0/3] Enhancement on devtool edit-recipe

2017-07-17 Thread Paul Eggleton
I've looked at these already, in case that's a concern.

Acked-by: Paul Eggleton 

Cheers,
Paul

On Tuesday, 11 July 2017 2:50:44 AM BST Chang, Rebecca Swee Fun wrote:
> Ping in case maintainer has missed this series.
> Please let me know if there are any concern to merge this enhancement on
> devtool edit-recipe and I would rework it asap for 2.4M2.
> Thank you very much.
> 
> Rebecca
> 
> > -Original Message-
> > From: Chang, Rebecca Swee Fun
> > Sent: Wednesday, June 28, 2017 9:59 AM
> > To: OpenEmbedded Core Mailing List  > c...@lists.openembedded.org>
> > Cc: Chang, Rebecca Swee Fun 
> > Subject: [PATCH 0/3] Enhancement on devtool edit-recipe
> > 
> > Hi,
> > 
> > The patches in this series are to enhance devtool edit-recipe as a request 
> > from
> > Bugzilla #11434.
> > 
> > This first enhancement I did was to ensure devtool edit-recipe not to print 
> > out
> > ugly tracebacks that is not informative by catching the exception.
> > 
> > However, this has introduced new tracebacks where python complaints about
> > NameError: name 'logger' is not defined in run_editor definition. We could 
> > pass
> > in logger as a parameter from run_editor function call. This was fixed in 
> > the
> > second patch in this series.
> > 
> > Lastly, I have enable additional subcommand 'find-recipe' for devtool. This 
> > will
> > help users to find the path to the recipes in workspace and it can be 
> > extended
> > to find recipe outside of workspace using '-a/--any-recipe' option.
> > 
> > Regards,
> > Rebecca
> > 
> > Chang Rebecca Swee Fun (3):
> >   scriptutils: exit politely when no text editor available
> >   scriptutils: pass in logger as parameter
> >   devtool: find-recipe: enable new subcommand for devtool
> > 
> >  scripts/lib/devtool/utilcmds.py | 18 ++
> >  scripts/lib/recipetool/newappend.py |  2 +-
> >  scripts/lib/scriptutils.py  |  6 +++---
> >  3 files changed, 18 insertions(+), 8 deletions(-)
> > 
> > --
> > 2.7.4
> 
> 


-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] lsb: add checking for chkconfig existence when creating the symbolic

2017-07-17 Thread Zhenbo Gao
remove_initd and remove_initd will be created as the symbolic file
of chkconfig, which will be not existed when systemd is configured,
so adding the check for the existence of chkconfig before creating
the symbolic.

Signed-off-by: Zhenbo Gao 
---
 meta/recipes-extended/lsb/lsb_4.1.bb | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb 
b/meta/recipes-extended/lsb/lsb_4.1.bb
index cedf39e..c8db1a8 100644
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -90,11 +90,13 @@ do_install_append() {
install -m 0755 ${WORKDIR}/init-functions ${D}${nonarch_base_libdir}/lsb
 
# create links for LSB test
-   if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
-   install -d ${D}${nonarch_libdir}/lsb
+   if [ -e ${sbindir}/chkconfig ]; then
+   if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ] ; then
+   install -d ${D}${nonarch_libdir}/lsb
+   fi
+   ln -sf ${sbindir}/chkconfig 
${D}${nonarch_libdir}/lsb/install_initd
+   ln -sf ${sbindir}/chkconfig 
${D}${nonarch_libdir}/lsb/remove_initd
fi
-   ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/install_initd
-   ln -sf ${sbindir}/chkconfig ${D}${nonarch_libdir}/lsb/remove_initd
 
if [ "${TARGET_ARCH}" = "x86_64" ]; then
if [ "${base_libdir}" != "${base_prefix}/lib64" ]; then
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] image_types: use initrd from pre-sstate directory

2017-07-17 Thread Ed Bartosh
mkelfImage was failing trying to use initrd from ${DEPLOY_DIR_IMAGE}:
DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_image_elf
| Cannot open `tmp/deploy/images/qemux86/core-image-minimal-qemux86.cpio.gz':
No such file or directory

As the images have only one deploy point it's not possible to reference
something the images themselves are deploying. They need to reference it
in the "pre-sstate" directory ${IMGDEPLOYDIR}, not the post sstate one
${DEPLOY_DIR_IMAGE}.

Fixed by using ${IMGDEPLOYDIR} instead of ${DEPLOY_DIR_IMAGE} in
mkelfImage command line.

[YOCTO #11767]

Signed-off-by: Ed Bartosh 
---
 meta/classes/image_types.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index df34c7c..f97870b 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -146,7 +146,7 @@ ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw 
console="
 
 IMAGE_CMD_elf () {
test -f ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf && rm -f 
${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf
-   mkelfImage --kernel=${ELF_KERNEL} 
--initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.cpio.gz 
--output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf 
--append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
+   mkelfImage --kernel=${ELF_KERNEL} 
--initrd=${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.cpio.gz 
--output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf 
--append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
 }
 
 IMAGE_TYPEDEP_elf = "cpio.gz"
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/1] ghostscript: remove legacy patch png_mak.patch

2017-07-17 Thread kai.kang
From: Kai Kang 

png_mak.patch was created for ghostscript 9.16 and causes make circular
dependency now. Check source code base/png.mak after apply png_mak.patch:

Line 77: $(MAKEDIRS) : $(pnglibconf_h)
Line 83: $(pnglibconf_h) : $(PNGSRC)scripts$(D)pnglibconf.h.prebuilt 
$(TOP_MAKEFILES) $(MAKEDIRS)

So remove png_mak.patch.

Signed-off-by: Kai Kang 
---
 .../ghostscript/ghostscript/png_mak.patch  | 32 --
 .../ghostscript/ghostscript_9.21.bb|  1 -
 2 files changed, 33 deletions(-)
 delete mode 100644 meta/recipes-extended/ghostscript/ghostscript/png_mak.patch

diff --git a/meta/recipes-extended/ghostscript/ghostscript/png_mak.patch 
b/meta/recipes-extended/ghostscript/ghostscript/png_mak.patch
deleted file mode 100644
index 8b84986..000
--- a/meta/recipes-extended/ghostscript/ghostscript/png_mak.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-ghostscript: add dependency for pnglibconf.h
-
-When using parallel make jobs, we need to be sure that
-pnglibconf.h is created before we try to reference it,
-so add a rule to png.mak.
-
-Upstream-Status: Pending
-
-Signed-off-by: Joe Slater 
-
-Rebase to 9.19
-Signed-off-by: Hongxu Jia 

- base/png.mak | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/base/png.mak b/base/png.mak
-index fe5c6e2..8abb53a 100644
 a/base/png.mak
-+++ b/base/png.mak
-@@ -74,6 +74,8 @@ png.clean-not-config-clean :
- 
- pnglibconf_h=$(PNGGENDIR)$(D)pnglibconf.h
- 
-+$(MAKEDIRS) : $(pnglibconf_h)
-+
- png.config-clean :
-   $(RM_) $(pnglibconf_h)
-   $(RM_) $(PNGGEN)lpg*.dev
--- 
-2.8.1
-
diff --git a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb 
b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
index fb36a13..adad9fd 100644
--- a/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
+++ b/meta/recipes-extended/ghostscript/ghostscript_9.21.bb
@@ -22,7 +22,6 @@ UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)\.tar"
 SRC_URI_BASE = 
"https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs921/${BPN}-${PV}.tar.gz
 \
 file://ghostscript-9.15-parallel-make.patch \
 file://ghostscript-9.16-Werror-return-type.patch \
-file://png_mak.patch \
 file://do-not-check-local-libpng-source.patch \
 file://avoid-host-contamination.patch \
 file://mkdir-p.patch \
-- 
2.10.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/1] ghostscript: remove legacy patch png_mak.patch

2017-07-17 Thread kai.kang
From: Kai Kang 

The following changes since commit 81498aac9560fbeaeb58eaada32ce80e0ea51628:

  yocto-project-qs: Updated Next Steps list (2017-07-12 00:28:16 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib kangkai/misc
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/misc

Kai Kang (1):
  ghostscript: remove legacy patch png_mak.patch

 .../ghostscript/ghostscript/png_mak.patch  | 32 --
 .../ghostscript/ghostscript_9.21.bb|  1 -
 2 files changed, 33 deletions(-)
 delete mode 100644 meta/recipes-extended/ghostscript/ghostscript/png_mak.patch

-- 
2.10.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [morty][PATCH] wic: fix calculation of partition number

2017-07-17 Thread Ed Bartosh
Total number of partitions should be taken into account when calculating
real partition number for msdos partition table. The number can be
different for the 4th partition: it can be 4 if there are 4 partitions in
the table and 5 if there are more than 4 partitions in the table. In the
latter case number 4 is occupied by extended partition.

[YOCTO #11790]

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/imager/direct.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index edf5e5d..4c547e0 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -108,7 +108,7 @@ class DirectImageCreator(BaseImageCreator):
 if pnum == num:
 if  part.no_table:
 return 0
-if self.ptable_format == 'msdos' and realnum > 3:
+if self.ptable_format == 'msdos' and realnum > 3 and 
len(parts) > 4:
 # account for logical partition numbering, ex. sda5..
 return realnum + 1
 return realnum
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [pyro][PATCH] wic: fix calculation of partition number

2017-07-17 Thread Ed Bartosh
Total number of partitions should be taken into account when calculating
real partition number for msdos partition table. The number can be
different for the 4th partition: it can be 4 if there are 4 partitions in
the table and 5 if there are more than 4 partitions in the table. In the
latter case number 4 is occupied by extended partition.

[YOCTO #11790]

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index f2e6127..31d07ba 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -312,7 +312,7 @@ class PartitionedImage():
 part.realnum = 0
 else:
 realnum += 1
-if self.ptable_format == 'msdos' and realnum > 3:
+if self.ptable_format == 'msdos' and realnum > 3 and 
len(partitions) > 4:
 part.realnum = realnum + 1
 continue
 part.realnum = realnum
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] wic: fix calculation of partition number

2017-07-17 Thread Ed Bartosh
Total number of partitions should be taken into account when calculating
real partition number for msdos partition table. The number can be
different for the 4th partition: it can be 4 if there are 4 partitions in
the table and 5 if there are more than 4 partitions in the table. In the
latter case number 4 is occupied by extended partition.

[YOCTO #11790]

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index 9254388..e4f39d6 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -317,7 +317,7 @@ class PartitionedImage():
 part.realnum = 0
 else:
 realnum += 1
-if self.ptable_format == 'msdos' and realnum > 3:
+if self.ptable_format == 'msdos' and realnum > 3 and 
len(partitions) > 4:
 part.realnum = realnum + 1
 continue
 part.realnum = realnum
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/1] systemd: workaround login failure on qemumips64 when 'pam' is enabled

2017-07-17 Thread Chen Qi
Append " -fno-tree-switch-conversion -fno-tree-tail-merge" to
FULL_OPTIMIZATION to workaround login problem on qemumips64. Otherwise,
user cannot login onto the target even username and password are
provided.

Signed-off-by: Chen Qi 
---
 meta/recipes-core/systemd/systemd_232.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_232.bb 
b/meta/recipes-core/systemd/systemd_232.bb
index e8292ab..1cb8ff7 100644
--- a/meta/recipes-core/systemd/systemd_232.bb
+++ b/meta/recipes-core/systemd/systemd_232.bb
@@ -158,6 +158,9 @@ CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 
'valgrind', ' -DVALGRIND=1', ''
 # disable problematic GCC 5.2 optimizations [YOCTO #8291]
 FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
 
+# Avoid login failure on qemumips64 when pam is enabled
+FULL_OPTIMIZATION_append_mips64 = " -fno-tree-switch-conversion 
-fno-tree-tail-merge"
+
 COMPILER_NM ?= "${HOST_PREFIX}gcc-nm"
 COMPILER_AR ?= "${HOST_PREFIX}gcc-ar"
 COMPILER_RANLIB ?= "${HOST_PREFIX}gcc-ranlib"
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/1] systemd: workaround login failure on qemumips64 when 'pam' is enabled

2017-07-17 Thread Chen Qi
The following changes since commit 81498aac9560fbeaeb58eaada32ce80e0ea51628:

  yocto-project-qs: Updated Next Steps list (2017-07-12 00:28:16 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/systemd_qemumips64_login
  
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/systemd_qemumips64_login

Chen Qi (1):
  systemd: workaround login failure on qemumips64 when 'pam' is enabled

 meta/recipes-core/systemd/systemd_232.bb | 3 +++
 1 file changed, 3 insertions(+)

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core