Re: [OE-core] [PATCH] libgpg-error: Bump to version 1.35

2019-01-29 Thread Randy MacLeod

On 1/29/19 5:55 PM, Alistair Francis wrote:

Signed-off-by: Alistair Francis 
---
  .../{libgpg-error_1.33.bb => libgpg-error_1.35.bb}  | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
  rename meta/recipes-support/libgpg-error/{libgpg-error_1.33.bb => 
libgpg-error_1.35.bb} (92%)

diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.33.bb 
b/meta/recipes-support/libgpg-error/libgpg-error_1.35.bb
similarity index 92%
rename from meta/recipes-support/libgpg-error/libgpg-error_1.33.bb
rename to meta/recipes-support/libgpg-error/libgpg-error_1.35.bb
index 325529d149..9a822add32 100644
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.33.bb
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.35.bb
@@ -5,7 +5,7 @@ BUGTRACKER = "https://bugs.g10code.com/gnupg/index;
  LICENSE = "GPLv2+ & LGPLv2.1+"
  LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
  file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-
file://src/gpg-error.h.in;beginline=2;endline=18;md5=524d4e810c4dcdc38e4fa28e70a13bf8
 \
+
file://src/gpg-error.h.in;beginline=2;endline=18;md5=cd91e3ad1265a0c268efad541a39345e
 \



Please explain why the license checksum change in the commit log to save 
others from having to check.


../Randy


  
file://src/init.c;beginline=2;endline=17;md5=f01cdfcf747af5380590cfd9bbfeaaf7"
  
  
@@ -16,8 +16,8 @@ SRC_URI = "${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \

 file://pkgconfig.patch \
  "
  
-SRC_URI[md5sum] = "680495572d5d4c700ea73a2f793ce531"

-SRC_URI[sha256sum] = 
"5d38826656e746c936e7742d9cde072b50baa3c4c49daa168a56813612bf03ff"
+SRC_URI[md5sum] = "2808a9e044f883f7554c5ba6a380b711"
+SRC_URI[sha256sum] = 
"cbd5ee62a8a8c88d48c158fff4fc9ead4132aacd1b4a56eb791f9f997d07e067"
  
  BINCONFIG = "${bindir}/gpg-error-config"
  



--
# Randy MacLeod
# Wind River Linux

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


Re: [OE-core] [PATCH v2] ltp: Remove admin_tools test

2019-01-29 Thread He Zhe



On 1/28/19 10:09 PM, Richard Purdie wrote:
> On Mon, 2019-01-14 at 18:47 -0800, He Zhe wrote:
>> admin_tools test group has been removed from upstream. Backport to
>> fix the
>> following failures.
>>
>> at_deny01 1 TFAIL : ltpapicmd.c:188: At denyed user to execute test
>> job
>> at_allow01 1 TFAIL : ltpapicmd.c:188: At did not allow user to
>> execute job
>>
>> Signed-off-by: He Zhe 
>> ---
>> v2: Add missing SOB and upstream status.
> Rather than add the huge patch could we upgrade please?
>
> I believe Petr sent a patch but it had some issues so perhaps you could
> help fix those?

OK. I'll go check what I can help.

Zhe

>
> Cheers,
>
> Richard
>
>

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


[OE-core] [PATCH 1/1] pkgdata.py: avoid target-sdk-dummy-provides to mess things up

2019-01-29 Thread Chen Qi
Sometimes we meet the following failure for the test_lookup_recipe
test case.

  AssertionError: 'zlib\nbusybox is in the RPROVIDES of target-sdk-provid[32 
chars]ummy' != 'zlib\nbusybox'
zlib
  + busybox- busybox is in the RPROVIDES of target-sdk-provides-dummy:
  - target-sdk-provides-dummy

This is because target-sdk-provides-dummy rprovides busybox.

So clean things up to avoid failure.

Signed-off-by: Chen Qi 
---
 meta/lib/oeqa/selftest/cases/pkgdata.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py 
b/meta/lib/oeqa/selftest/cases/pkgdata.py
index 0b4caf1..9911765 100644
--- a/meta/lib/oeqa/selftest/cases/pkgdata.py
+++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
@@ -13,6 +13,7 @@ class OePkgdataUtilTests(OESelftestTestCase):
 super(OePkgdataUtilTests, cls).setUpClass()
 # Ensure we have the right data in pkgdata
 cls.logger.info('Running bitbake to generate pkgdata')
+bitbake('target-sdk-provides-dummy -c clean')
 bitbake('busybox zlib m4')
 
 @OETestID(1203)
-- 
1.9.1

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


[OE-core] [PATCH V2 0/1] pkgdata.py: avoid target-sdk-dummy-provides to mess things up

2019-01-29 Thread Chen Qi
Changes in V2:
* Use 'clean' instead of 'cleansstate'

The following changes since commit ecfe26834922861ab69602b8c1aa404080f0fb0c:

  libtool: Fix ignoring compiler-rt libs (2019-01-27 13:05:17 +)

are available in the git repository at:

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

Chen Qi (1):
  pkgdata.py: avoid target-sdk-dummy-provides to mess things up

 meta/lib/oeqa/selftest/cases/pkgdata.py | 1 +
 1 file changed, 1 insertion(+)

-- 
1.9.1

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


Re: [OE-core] [PATCH] Support kmeta directory usage with devtool modify/finish

2019-01-29 Thread Jaewon Lee
ping

-Original Message-
From: Jaewon Lee [mailto:jaewon@xilinx.com] 
Sent: Friday, December 14, 2018 4:39 PM
To: openembedded-core@lists.openembedded.org
Cc: Jaewon Lee ; Alejandro Enedino Hernandez Samaniego 

Subject: [OE-core][PATCH] Support kmeta directory usage with devtool 
modify/finish

When using Kmeta directories, devtool finish will add every single file in the 
directory to the bbappend. This is because in the current implementation, the 
get_recipe_local_files function treats the kmeta directory like a file. 
Modifying the function to loop through the provided directories and return all 
included files instead of just the top level directory. This will enable 
correct file to file comparison when determing which files are new/changed and 
need to be added to the bbappend.

Adding an extra check in devtool-source.bbclass to not copy the cfg file if its 
already included somewhere in the kmeta directory

Also during 'modify', when moving necessary files in the kmeta directory from 
the workdir to oe-local-files, the dangling parent directories are left behind. 
 This in itself is not an issue as the temporary devtool workspace is 
automatically deleted, but this causes an incorrect include directory to be 
added in kernel-yocto.bbclass.  Changing the order of the if statements to 
catch the correct conditional. This is safe to do as when not in the devtool 
context, there will be no oe-local-files directory.

Signed-off-by: Jaewon Lee 
Signed-off-by: Alejandro Enedino Hernandez Samaniego 
---
 meta/classes/devtool-source.bbclass | 6 --
 meta/classes/kernel-yocto.bbclass   | 4 ++--
 meta/lib/oe/recipeutils.py  | 9 -
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/meta/classes/devtool-source.bbclass 
b/meta/classes/devtool-source.bbclass
index 1372e32..a811000 100644
--- a/meta/classes/devtool-source.bbclass
+++ b/meta/classes/devtool-source.bbclass
@@ -103,8 +103,10 @@ python devtool_post_unpack() {
 for l in sccfile:
 line = l.split()
 if line and line[0] in ('kconf', 'patch'):
-local_files[line[-1]] = 
os.path.join(os.path.dirname(local_files[key]), line[-1])
-
shutil.copy2(os.path.join(os.path.dirname(local_files[key]), line[-1]), workdir)
+cfg = os.path.join(os.path.dirname(local_files[key]), 
line[-1])
+if not cfg in local_files.values():
+local_files[line[-1]] = cfg
+shutil.copy2(cfg, workdir)
 sccfile.close()
 
 # Ignore local files with subdir={BP} diff --git 
a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 496c8a7..2f556ca 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -138,10 +138,10 @@ do_kernel_metadata() {
for f in ${feat_dirs}; do
if [ -d "${WORKDIR}/$f/meta" ]; then
includes="$includes -I${WORKDIR}/$f/kernel-meta"
-   elif [ -d "${WORKDIR}/$f" ]; then
-   includes="$includes -I${WORKDIR}/$f"
elif [ -d "${WORKDIR}/../oe-local-files/$f" ]; then
includes="$includes -I${WORKDIR}/../oe-local-files/$f"
+   elif [ -d "${WORKDIR}/$f" ]; then
+   includes="$includes -I${WORKDIR}/$f"
fi
done
for s in ${sccs} ${patches}; do
diff --git a/meta/lib/oe/recipeutils.py b/meta/lib/oe/recipeutils.py index 
9c99164..e63f7ae 100644
--- a/meta/lib/oe/recipeutils.py
+++ b/meta/lib/oe/recipeutils.py
@@ -480,7 +480,14 @@ def get_recipe_local_files(d, patches=False, 
archives=False):
 unpack = fetch.ud[uri].parm.get('unpack', True)
 if unpack:
 continue
-ret[fname] = localpath
+if os.path.isdir(localpath):
+for root, dirs, files in os.walk(localpath):
+for fname in files:
+fileabspath = os.path.join(root,fname)
+srcdir = os.path.dirname(localpath)
+ret[os.path.relpath(fileabspath,srcdir)] = fileabspath
+else:
+ret[fname] = localpath
 return ret
 
 
--
2.7.5

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


[OE-core] [PATCH v3] libusb1: Add udev support

2019-01-29 Thread Alistair Francis
I don't see circular dependencies anymore between libusb1 and udev, so
enable udev support for libusb1.

Signed-off-by: Alistair Francis 
---
v3:
 - Don't build for native SDK

 meta/recipes-support/libusb/libusb1_1.0.22.bb | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-support/libusb/libusb1_1.0.22.bb 
b/meta/recipes-support/libusb/libusb1_1.0.22.bb
index 0c6e116dd7..1d9d772575 100644
--- a/meta/recipes-support/libusb/libusb1_1.0.22.bb
+++ b/meta/recipes-support/libusb/libusb1_1.0.22.bb
@@ -20,9 +20,10 @@ S = "${WORKDIR}/libusb-${PV}"
 
 inherit autotools pkgconfig ptest
 
-# Don't configure udev by default since it will cause a circular
-# dependecy with udev package, which depends on libusb
-EXTRA_OECONF = "--libdir=${base_libdir} --disable-udev"
+PACKAGECONFIG_class-target ??= "udev"
+PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev"
+
+EXTRA_OECONF = "--libdir=${base_libdir}"
 
 do_install_append() {
install -d ${D}${libdir}
-- 
2.20.1

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


Re: [OE-core] [PATCH v2] lubusb1: Add udev support

2019-01-29 Thread Alistair Francis
On Sun, Jan 27, 2019 at 4:07 AM Richard Purdie
 wrote:
>
> On Sat, 2019-01-26 at 23:15 -0800, Alistair Francis wrote:
> > On Sat, Jan 26, 2019 at 5:11 PM Khem Raj  wrote:
> > > On Sat, Jan 26, 2019 at 3:27 PM Richard Purdie
> > >  wrote:
> > > > On Thu, 2019-01-24 at 22:35 +, Alistair Francis wrote:
> > > > > I don't see circular dependencies anymore between libusb1 and
> > > > > udev,
> > > > > so
> > > > > enable udev support for libusb1.
> > > > >
> > > > > Signed-off-by: Alistair Francis 
> > > > > ---
> > > > >  meta/recipes-support/libusb/libusb1_1.0.22.bb | 7 ---
> > > > >  1 file changed, 4 insertions(+), 3 deletions(-)
> > > > >
> > > > > diff --git a/meta/recipes-support/libusb/libusb1_1.0.22.bb
> > > > > b/meta/recipes-support/libusb/libusb1_1.0.22.bb
> > > > > index 0c6e116dd7..35c1d705b6 100644
> > > > > --- a/meta/recipes-support/libusb/libusb1_1.0.22.bb
> > > > > +++ b/meta/recipes-support/libusb/libusb1_1.0.22.bb
> > > > > @@ -20,9 +20,10 @@ S = "${WORKDIR}/libusb-${PV}"
> > > > >
> > > > >  inherit autotools pkgconfig ptest
> > > > >
> > > > > -# Don't configure udev by default since it will cause a
> > > > > circular
> > > > > -# dependecy with udev package, which depends on libusb
> > > > > -EXTRA_OECONF = "--libdir=${base_libdir} --disable-udev"
> > > > > +PACKAGECONFIG ??= "udev"
> > > > > +PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev"
> > > > > +
> > > > > +EXTRA_OECONF = "--libdir=${base_libdir}"
> > > >
> > > > Fails in testing with:
> > > >
> > > > WARNING: Nothing PROVIDES 'nativesdk-udev' (but
> > > > virtual:nativesdk:/home/pokybuild/yocto-worker/a-
> > > > quick/build/meta/recipes-support/libusb/libusb1_1.0.22.bb DEPENDS
> > > > on or otherwise requires it). Close matches:
> > > > WARNING: Nothing PROVIDES 'udev-native' (but
> > > > virtual:native:/home/pokybuild/yocto-worker/a-
> > > > quick/build/meta/recipes-support/libusb/libusb1_1.0.22.bb DEPENDS
> > > > on or otherwise requires it). Close matches:
> > > > WARNING: Nothing RPROVIDES 'nativesdk-libusb1-dev' (but
> > > > virtual:nativesdk:/home/pokybuild/yocto-worker/a-
> > > > quick/build/meta/recipes-support/libusb/libusb1_1.0.22.bb
> > > > RDEPENDS on or otherwise requires it)
> > > > WARNING: Nothing RPROVIDES 'nativesdk-libusb1' (but
> > > > virtual:nativesdk:/home/pokybuild/yocto-worker/a-
> > > > quick/build/meta/recipes-support/libusb/libusb1_1.0.22.bb
> > > > RDEPENDS on or otherwise requires it)
> > > >
> > >
> > > I am seeing these fails too
> > >
> > > > Before someone sends a patch creating a nativesdk-udev please
> > > > think
> > > > very carefully about whether a nativesdk-udev makes sense and
> > > > what it
> > > > may need to look like.
> >
> > What about just disabling the packageconfig for nativesdk? Would that
> > be a better option?
>
> Probably easier but what functionality are we missing out on in libusb
> and do we need it? This might limit the functionality of tools in the
> SDK?
>
> That said, we've been without this so far so you have to wonder how
> useful it is even on target...

It helped me with some debugging, but in the end I don't think (I
haven't checked) that I actually need it. Still it does seem useful to
have.

Alistair

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


[OE-core] [PATCH] libgpg-error: Bump to version 1.35

2019-01-29 Thread Alistair Francis
Signed-off-by: Alistair Francis 
---
 .../{libgpg-error_1.33.bb => libgpg-error_1.35.bb}  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-support/libgpg-error/{libgpg-error_1.33.bb => 
libgpg-error_1.35.bb} (92%)

diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.33.bb 
b/meta/recipes-support/libgpg-error/libgpg-error_1.35.bb
similarity index 92%
rename from meta/recipes-support/libgpg-error/libgpg-error_1.33.bb
rename to meta/recipes-support/libgpg-error/libgpg-error_1.35.bb
index 325529d149..9a822add32 100644
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.33.bb
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.35.bb
@@ -5,7 +5,7 @@ BUGTRACKER = "https://bugs.g10code.com/gnupg/index;
 LICENSE = "GPLv2+ & LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-
file://src/gpg-error.h.in;beginline=2;endline=18;md5=524d4e810c4dcdc38e4fa28e70a13bf8
 \
+
file://src/gpg-error.h.in;beginline=2;endline=18;md5=cd91e3ad1265a0c268efad541a39345e
 \
 
file://src/init.c;beginline=2;endline=17;md5=f01cdfcf747af5380590cfd9bbfeaaf7"
 
 
@@ -16,8 +16,8 @@ SRC_URI = 
"${GNUPG_MIRROR}/libgpg-error/libgpg-error-${PV}.tar.bz2 \
file://pkgconfig.patch \
  "
 
-SRC_URI[md5sum] = "680495572d5d4c700ea73a2f793ce531"
-SRC_URI[sha256sum] = 
"5d38826656e746c936e7742d9cde072b50baa3c4c49daa168a56813612bf03ff"
+SRC_URI[md5sum] = "2808a9e044f883f7554c5ba6a380b711"
+SRC_URI[sha256sum] = 
"cbd5ee62a8a8c88d48c158fff4fc9ead4132aacd1b4a56eb791f9f997d07e067"
 
 BINCONFIG = "${bindir}/gpg-error-config"
 
-- 
2.20.1

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


[OE-core] [PATCH] bitbake.conf: Add seq to HOSTTOOLS

2019-01-29 Thread Jacob Kroon
This fixes detecting available signals when configuring perl.
(cnf/configure_sigs.sh)

Without this, running aclocal prints warnings about missing signals,
which can be further demonstraded by running

  perl -le 'print for keys %SIG'

Signed-off-by: Jacob Kroon 
---
 meta/conf/bitbake.conf | 2 +-
 meta/conf/site.conf.sample | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index ab00ac2f06..8e6dab908a 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -483,7 +483,7 @@ HOSTTOOLS += " \
 fgrep file find flock g++ gawk gcc getconf getopt git grep gunzip gzip \
 head hostname id install ld ldd ln ls make makeinfo md5sum mkdir mknod \
 mktemp mv nm objcopy objdump od patch perl pod2man pr printf pwd python2 \
-python2.7 python3 ranlib readelf readlink rm rmdir rpcgen sed sh sha256sum 
\
+python2.7 python3 ranlib readelf readlink rm rmdir rpcgen sed seq sh 
sha256sum \
 sleep sort split stat strings strip tail tar tee test touch tr true uname \
 uniq wc wget which xargs \
 "
diff --git a/meta/conf/site.conf.sample b/meta/conf/site.conf.sample
index a4c2f9feed..5164fedf63 100644
--- a/meta/conf/site.conf.sample
+++ b/meta/conf/site.conf.sample
@@ -26,7 +26,7 @@ SCONF_VERSION = "1"
 # If you wish to use certain hosts without the proxy, specify them in NO_PROXY.
 # See the script for details on syntax. The script oe-git-proxy uses some tools
 # that may not be included on HOSTTOOLS, thus  add them manually through
-# HOSTTOOLS += "getent seq"
+# HOSTTOOLS += "getent"
 
 # Uncomment this to use a shared download directory
 #DL_DIR = "/some/shared/download/directory/"
-- 
2.20.1

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


[OE-core] Always install initramfs-framework-base in case of linux-yocto & INITRAMFS_IMAGE_BUNDLE=1

2019-01-29 Thread Alexey Brodkin
Hello,

I'd like to get more educated opinions before sending silly patches.

I'm building a uImage with built-in initramfs.
If I build any vanilla kernel (i.e. with no OE/Yocto patches)
all work well but if I switch to linux-yocto I'm getting a panic
saying:
--->8--
/dev/console is missing or not a character device!
Please ensure your rootfs is properly configured
--->8--

This panic comes from linux-yocto patch [1].
And the fix is simple - just add "initramfs-framework-base" to the image
so that "/dev/console" will be explicitly created on host thanks to
Patrick's fix [2].

What I don't like here is that developer has to keep in mind that
not super obvious dependency [especially since vanilla kernels just work].
So how that could be automated?

1. Use "core-image-minimal-initramfs"
   And that's what I did in the first place... but that probably work for x86
   because of COMPATIBLE_HOST = "(i.86|x86_64).*-linux".
   I tried to add "arc|" there so it becomes suitable for poor ARC users and 
faced
   COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
   in initramfs-module-install.
   That said not sure now if "core-image-minimal-initramfs" is really any
   "general purpose" image or not. Is there a point in trying to make it usable
   for all?

2. Just automatically add "initramfs-framework-base" to the image whenever
   both linux-yocto and INITRAMFS_IMAGE_BUNDLE=1 are used. But then what is
   the best place to do that check?
   Is "meta/recipes-kernel/linux/linux-yocto.inc" the right place?

[1] 
http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-cache/tree/patches/boot/check-console-device-file-on-fs-when-booting.patch
[2] 
https://github.com/openembedded/openembedded-core/commit/0352841cd92f6316bcac092e2fff9d28c352b36b

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


Re: [OE-core] [PATCH] gcc-cross-canadian: Do not create symlink to real-ld

2019-01-29 Thread Khem Raj
On Mon, Jan 28, 2019 at 11:19 PM Samuli Piippo  wrote:
>
> real-ld is always used if that is found, which means you cannot
> switch between bfd and gold linkers using -fuse-ld=gold.
>
> Signed-off-by: Samuli Piippo 
> ---
>  meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc 
> b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> index e7c08d3a61..ececec4965 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> @@ -137,8 +137,6 @@ do_install () {
>
> ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t$suffix $dest$t$suffix
> done
> -   t=real-ld
> -   ln -sf ${BINRELPATH}/${TARGET_PREFIX}ld$suffix $dest$t$suffix
>

this patch is essentially, reverting
https://git.openembedded.org/openembedded-core/commit/?id=cdd86896c8d29135f937968e9aa07f919cf543d3

so lets do a revert instead to keep the context clear

secondly, please test with the mips/mips64 as those were primary drivers for
the patch in first place.  Richard might add more context if he remembers.


> # libquadmath headers need to  be available in the gcc libexec dir
> install -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
> --
> 2.17.1
>
> --
> ___
> 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] [PATCH 6/7] oeqa/logparser: Improve results handling

2019-01-29 Thread Richard Purdie
Merge the results handling into the ptest log parser as a seperate
method.

Drop the weird "pass.skip.fail." prefix to the results filename, its
just bizarre.

Drop the code turning a list into a regex then searching the regex for
an item, "x in y" is perfectly capable.

Use a dict, sort the keys as needed and drop the list sorting code.

Signed-off-by: Richard Purdie 
---
 meta/lib/oeqa/runtime/cases/ptest.py | 14 +
 meta/lib/oeqa/utils/logparser.py | 45 +++-
 2 files changed, 19 insertions(+), 40 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/ptest.py 
b/meta/lib/oeqa/runtime/cases/ptest.py
index 3cfd7af7e2e..2843953b38c 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -49,8 +49,9 @@ class PtestRunnerTest(OERuntimeTestCase):
 extras['ptestresult.rawlogs'] = {'log': output}
 
 # Parse and save results
-parse_result, sections = PtestParser().parse(ptest_runner_log)
-parse_result.log_as_files(ptest_log_dir, test_status = ['pass','fail', 
'skip'])
+parser = PtestParser()
+results, sections = parser.parse(ptest_runner_log)
+parser.results_as_files(ptest_log_dir, test_status = ['pass','fail', 
'skip'])
 if os.path.exists(ptest_log_dir_link):
 # Remove the old link to create a new one
 os.remove(ptest_log_dir_link)
@@ -60,14 +61,15 @@ class PtestRunnerTest(OERuntimeTestCase):
 
 trans = str.maketrans("()", "__")
 resmap = {'pass': 'PASSED', 'skip': 'SKIPPED', 'fail': 'FAILED'}
-for section in parse_result.result_dict:
-for test, result in parse_result.result_dict[section]:
+for section in results:
+for test in results[section]:
+result = results[section][test]
 testname = "ptestresult." + (section or "No-section") + "." + 
"_".join(test.translate(trans).split())
 extras[testname] = {'status': resmap[result]}
 
 failed_tests = {}
-for section in parse_result.result_dict:
-failed_testcases = [ "_".join(test.translate(trans).split()) for 
test, result in parse_result.result_dict[section] if result == 'fail' ]
+for section in results:
+failed_testcases = [ "_".join(test.translate(trans).split()) for 
test in results[section] if results[section][test] == 'fail' ]
 if failed_testcases:
 failed_tests[section] = failed_testcases
 
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
index dddea14fc98..8585c195c44 100644
--- a/meta/lib/oeqa/utils/logparser.py
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -8,7 +8,7 @@ from . import ftools
 # A parser that can be used to identify weather a line is a test result or a 
section statement.
 class PtestParser(object):
 def __init__(self):
-self.results = Result()
+self.results = {}
 self.sections = {}
 
 def parse(self, logfile):
@@ -65,52 +65,29 @@ class PtestParser(object):
 for t in test_regex:
 result = test_regex[t].search(line)
 if result:
-self.results.store(current_section['name'], 
result.group(1), t)
+if current_section['name'] not in self.results:
+self.results[current_section['name']] = {}
+self.results[current_section['name']][result.group(1)] 
= t
 
-self.results.sort_tests()
 return self.results, self.sections
 
-class Result(object):
-
-def __init__(self):
-self.result_dict = {}
-
-def store(self, section, test, status):
-if not section in self.result_dict:
-self.result_dict[section] = []
-
-self.result_dict[section].append((test, status))
-
-# sort tests by the test name(the first element of the tuple), for each 
section. This can be helpful when using git to diff for changes by making sure 
they are always in the same order.
-def sort_tests(self):
-for package in self.result_dict:
-sorted_results = sorted(self.result_dict[package], key=lambda tup: 
tup[0])
-self.result_dict[package] = sorted_results
-
 # Log the results as files. The file name is the section name and the 
contents are the tests in that section.
-def log_as_files(self, target_dir, test_status):
-status_regex = re.compile('|'.join(map(str, test_status)))
+def results_as_files(self, target_dir, test_status):
 if not type(test_status) == type([]):
 raise Exception("test_status should be a list. Got " + 
str(test_status) + " instead.")
 if not os.path.exists(target_dir):
 raise Exception("Target directory does not exist: %s" % target_dir)
 
-for section, test_results in self.result_dict.items():
-prefix = ''
-for x in test_status:
-

[OE-core] [PATCH 7/7] oeqa/logparser: Various misc cleanups

2019-01-29 Thread Richard Purdie
Get rid of further unneeded code complications:

* value mappings we could just direct use
* ftools when we can write files easily ourself
* test result status filtering we don't use
* variable overwriting module imports

Signed-off-by: Richard Purdie 
---
 meta/lib/oeqa/runtime/cases/ptest.py | 13 +
 meta/lib/oeqa/utils/logparser.py | 21 -
 2 files changed, 13 insertions(+), 21 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/ptest.py 
b/meta/lib/oeqa/runtime/cases/ptest.py
index 2843953b38c..6ae951356d8 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -1,6 +1,6 @@
 import unittest
 import pprint
-import re
+import datetime
 
 from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
@@ -21,8 +21,6 @@ class PtestRunnerTest(OERuntimeTestCase):
 if status != 0:
 self.skipTest("No -ptest packages are installed in the image")
 
-import datetime
-
 test_log_dir = self.td.get('TEST_LOG_DIR', '')
 # The TEST_LOG_DIR maybe NULL when testimage is added after
 # testdata.json is generated.
@@ -30,9 +28,9 @@ class PtestRunnerTest(OERuntimeTestCase):
 test_log_dir = os.path.join(self.td.get('WORKDIR', ''), 
'testimage')
 # Don't use self.td.get('DATETIME'), it's from testdata.json, not
 # up-to-date, and may cause "File exists" when re-reun.
-datetime = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
+timestamp = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
 ptest_log_dir_link = os.path.join(test_log_dir, 'ptest_log')
-ptest_log_dir = '%s.%s' % (ptest_log_dir_link, datetime)
+ptest_log_dir = '%s.%s' % (ptest_log_dir_link, timestamp)
 ptest_runner_log = os.path.join(ptest_log_dir, 'ptest-runner.log')
 
 status, output = self.target.run('ptest-runner', 0)
@@ -51,7 +49,7 @@ class PtestRunnerTest(OERuntimeTestCase):
 # Parse and save results
 parser = PtestParser()
 results, sections = parser.parse(ptest_runner_log)
-parser.results_as_files(ptest_log_dir, test_status = ['pass','fail', 
'skip'])
+parser.results_as_files(ptest_log_dir)
 if os.path.exists(ptest_log_dir_link):
 # Remove the old link to create a new one
 os.remove(ptest_log_dir_link)
@@ -60,12 +58,11 @@ class PtestRunnerTest(OERuntimeTestCase):
 extras['ptestresult.sections'] = sections
 
 trans = str.maketrans("()", "__")
-resmap = {'pass': 'PASSED', 'skip': 'SKIPPED', 'fail': 'FAILED'}
 for section in results:
 for test in results[section]:
 result = results[section][test]
 testname = "ptestresult." + (section or "No-section") + "." + 
"_".join(test.translate(trans).split())
-extras[testname] = {'status': resmap[result]}
+extras[testname] = {'status': result}
 
 failed_tests = {}
 for section in results:
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
index 8585c195c44..32fde14a7de 100644
--- a/meta/lib/oeqa/utils/logparser.py
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -3,7 +3,6 @@
 import sys
 import os
 import re
-from . import ftools
 
 # A parser that can be used to identify weather a line is a test result or a 
section statement.
 class PtestParser(object):
@@ -13,9 +12,9 @@ class PtestParser(object):
 
 def parse(self, logfile):
 test_regex = {}
-test_regex['pass'] = re.compile(r"^PASS:(.+)")
-test_regex['fail'] = re.compile(r"^FAIL:(.+)")
-test_regex['skip'] = re.compile(r"^SKIP:(.+)")
+test_regex['PASSED'] = re.compile(r"^PASS:(.+)")
+test_regex['FAILED'] = re.compile(r"^FAIL:(.+)")
+test_regex['SKIPPED'] = re.compile(r"^SKIP:(.+)")
 
 section_regex = {}
 section_regex['begin'] = re.compile(r"^BEGIN: .*/(.+)/ptest")
@@ -72,9 +71,7 @@ class PtestParser(object):
 return self.results, self.sections
 
 # Log the results as files. The file name is the section name and the 
contents are the tests in that section.
-def results_as_files(self, target_dir, test_status):
-if not type(test_status) == type([]):
-raise Exception("test_status should be a list. Got " + 
str(test_status) + " instead.")
+def results_as_files(self, target_dir):
 if not os.path.exists(target_dir):
 raise Exception("Target directory does not exist: %s" % target_dir)
 
@@ -84,10 +81,8 @@ class PtestParser(object):
 prefix = section
 section_file = os.path.join(target_dir, prefix)
 # purge the file contents if it exists
-open(section_file, 'w').close()
-for test_name in sorted(self.results[section]):
-status = self.results[section][test_name]
-# we log only the tests 

[OE-core] [PATCH 5/7] oeqa/utils/logparser: Add in support for duration, exitcode and logs by section

2019-01-29 Thread Richard Purdie
Allow parsing of the ptest duration, exit code and timeout keywords
from the logs, returning data on each section.

Also include the logs broken out per section.

Signed-off-by: Richard Purdie 
---
 meta/lib/oeqa/runtime/cases/ptest.py |  4 ++-
 meta/lib/oeqa/utils/logparser.py | 40 +++-
 2 files changed, 37 insertions(+), 7 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/ptest.py 
b/meta/lib/oeqa/runtime/cases/ptest.py
index ae54a01669a..3cfd7af7e2e 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -49,13 +49,15 @@ class PtestRunnerTest(OERuntimeTestCase):
 extras['ptestresult.rawlogs'] = {'log': output}
 
 # Parse and save results
-parse_result = PtestParser().parse(ptest_runner_log)
+parse_result, sections = PtestParser().parse(ptest_runner_log)
 parse_result.log_as_files(ptest_log_dir, test_status = ['pass','fail', 
'skip'])
 if os.path.exists(ptest_log_dir_link):
 # Remove the old link to create a new one
 os.remove(ptest_log_dir_link)
 os.symlink(os.path.basename(ptest_log_dir), ptest_log_dir_link)
 
+extras['ptestresult.sections'] = sections
+
 trans = str.maketrans("()", "__")
 resmap = {'pass': 'PASSED', 'skip': 'SKIPPED', 'fail': 'FAILED'}
 for section in parse_result.result_dict:
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
index f8d1c036306..dddea14fc98 100644
--- a/meta/lib/oeqa/utils/logparser.py
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -9,6 +9,7 @@ from . import ftools
 class PtestParser(object):
 def __init__(self):
 self.results = Result()
+self.sections = {}
 
 def parse(self, logfile):
 test_regex = {}
@@ -19,28 +20,55 @@ class PtestParser(object):
 section_regex = {}
 section_regex['begin'] = re.compile(r"^BEGIN: .*/(.+)/ptest")
 section_regex['end'] = re.compile(r"^END: .*/(.+)/ptest")
+section_regex['duration'] = re.compile(r"^DURATION: (.+)")
+section_regex['exitcode'] = re.compile(r"^ERROR: Exit status is (.+)")
+section_regex['timeout'] = re.compile(r"^TIMEOUT: .*/(.+)/ptest")
+
+def newsection():
+return { 'name': "No-section", 'log': "" }
+
+current_section = newsection()
 
 with open(logfile, errors='replace') as f:
 for line in f:
 result = section_regex['begin'].search(line)
 if result:
-current_section = result.group(1)
+current_section['name'] = result.group(1)
 continue
 
 result = section_regex['end'].search(line)
 if result:
-if current_section != result.group(1):
-bb.warn("Ptest log section mismatch %s vs. %s" % 
(current_section, result.group(1)))
-current_section = None
+if current_section['name'] != result.group(1):
+bb.warn("Ptest END log section mismatch %s vs. %s" % 
(current_section['name'], result.group(1)))
+if current_section['name'] in self.sections:
+bb.warn("Ptest duplicate section for %s" % 
(current_section['name']))
+self.sections[current_section['name']] = current_section
+del self.sections[current_section['name']]['name']
+current_section = newsection()
+continue
+
+result = section_regex['timeout'].search(line)
+if result:
+if current_section['name'] != result.group(1):
+bb.warn("Ptest TIMEOUT log section mismatch %s vs. %s" 
% (current_section['name'], result.group(1)))
+current_section['timeout'] = True
 continue
 
+for t in ['duration', 'exitcode']:
+result = section_regex[t].search(line)
+if result:
+current_section[t] = result.group(1)
+continue
+
+current_section['log'] = current_section['log'] + line 
+
 for t in test_regex:
 result = test_regex[t].search(line)
 if result:
-self.results.store(current_section, result.group(1), t)
+self.results.store(current_section['name'], 
result.group(1), t)
 
 self.results.sort_tests()
-return self.results
+return self.results, self.sections
 
 class Result(object):
 
-- 
2.19.1

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


[OE-core] [PATCH 3/7] oeqa/logparser: Further simplification/clarification

2019-01-29 Thread Richard Purdie
Rename the paster to be ptest specific and apply some further cleanups
to the code to simplify and clarify what its doing.

Signed-off-by: Richard Purdie 
---
 meta/lib/oeqa/runtime/cases/ptest.py |  6 ++---
 meta/lib/oeqa/utils/logparser.py | 36 +---
 2 files changed, 19 insertions(+), 23 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/ptest.py 
b/meta/lib/oeqa/runtime/cases/ptest.py
index ebef3f9eac3..1ce22a09e7d 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -6,13 +6,13 @@ from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.oeid import OETestID
 from oeqa.core.decorator.data import skipIfNotFeature
 from oeqa.runtime.decorator.package import OEHasPackage
-from oeqa.utils.logparser import Lparser, Result
+from oeqa.utils.logparser import PtestParser, Result
 
 class PtestRunnerTest(OERuntimeTestCase):
 
 # a ptest log parser
 def parse_ptest(self, logfile):
-parser = Lparser()
+parser = PtestParser()
 result = Result()
 
 with open(logfile, errors='replace') as f:
@@ -20,7 +20,7 @@ class PtestRunnerTest(OERuntimeTestCase):
 result_tuple = parser.parse_line(line)
 if not result_tuple:
 continue
-result_tuple = line_type, category, status, name = 
parser.parse_line(line)
+line_type, category, status, name = result_tuple
 
 if line_type == 'section' and status == 'begin':
 current_section = name
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
index 328baeefaf6..0807093fda6 100644
--- a/meta/lib/oeqa/utils/logparser.py
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -6,35 +6,31 @@ import re
 from . import ftools
 
 # A parser that can be used to identify weather a line is a test result or a 
section statement.
-class Lparser(object):
+class PtestParser(object):
 
-def __init__(self, **kwargs):
+def __init__(self):
 
 self.test_regex = {}
-self.test_regex[0] = {}
-self.test_regex[0]['pass'] = re.compile(r"^PASS:(.+)")
-self.test_regex[0]['fail'] = re.compile(r"^FAIL:(.+)")
-self.test_regex[0]['skip'] = re.compile(r"^SKIP:(.+)")
+self.test_regex['pass'] = re.compile(r"^PASS:(.+)")
+self.test_regex['fail'] = re.compile(r"^FAIL:(.+)")
+self.test_regex['skip'] = re.compile(r"^SKIP:(.+)")
 
 self.section_regex = {}
-self.section_regex[0] = {}
-self.section_regex[0]['begin'] = re.compile(r"^BEGIN: .*/(.+)/ptest")
-self.section_regex[0]['end'] = re.compile(r"^END: .*/(.+)/ptest")
+self.section_regex['begin'] = re.compile(r"^BEGIN: .*/(.+)/ptest")
+self.section_regex['end'] = re.compile(r"^END: .*/(.+)/ptest")
 
 # Parse a line and return a tuple containing the type of result 
(test/section) and its category, status and name
 def parse_line(self, line):
 
-for test_category, test_status_list in self.test_regex.items():
-for test_status, status_regex in test_status_list.items():
-test_name = status_regex.search(line)
-if test_name:
-return ['test', test_category, test_status, 
test_name.group(1)]
-
-for section_category, section_status_list in 
self.section_regex.items():
-for section_status, status_regex in section_status_list.items():
-section_name = status_regex.search(line)
-if section_name:
-return ['section', section_category, section_status, 
section_name.group(1)]
+for test_status, status_regex in test_status_list.items():
+test_name = status_regex.search(line)
+if test_name:
+return ['test', test_category, test_status, test_name.group(1)]
+
+for section_status, status_regex in section_status_list.items():
+section_name = status_regex.search(line)
+if section_name:
+return ['section', section_category, section_status, 
section_name.group(1)]
 return None
 
 
-- 
2.19.1

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


[OE-core] [PATCH 4/7] oeqa/logparser: Reform the ptest results parser

2019-01-29 Thread Richard Purdie
Now we have a dedicated ptest parser, merge in the remaining ptest
specific pieces to further clarify and simplify the code, moving to
a point where we can consider extending/enhancing it.

Signed-off-by: Richard Purdie 
---
 meta/lib/oeqa/runtime/cases/ptest.py | 40 ++-
 meta/lib/oeqa/utils/logparser.py | 58 
 2 files changed, 36 insertions(+), 62 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/ptest.py 
b/meta/lib/oeqa/runtime/cases/ptest.py
index 1ce22a09e7d..ae54a01669a 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -1,50 +1,16 @@
 import unittest
 import pprint
+import re
 
 from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.oeid import OETestID
 from oeqa.core.decorator.data import skipIfNotFeature
 from oeqa.runtime.decorator.package import OEHasPackage
-from oeqa.utils.logparser import PtestParser, Result
+from oeqa.utils.logparser import PtestParser
 
 class PtestRunnerTest(OERuntimeTestCase):
 
-# a ptest log parser
-def parse_ptest(self, logfile):
-parser = PtestParser()
-result = Result()
-
-with open(logfile, errors='replace') as f:
-for line in f:
-result_tuple = parser.parse_line(line)
-if not result_tuple:
-continue
-line_type, category, status, name = result_tuple
-
-if line_type == 'section' and status == 'begin':
-current_section = name
-continue
-
-if line_type == 'section' and status == 'end':
-current_section = None
-continue
-
-if line_type == 'test' and status == 'pass':
-result.store(current_section, name, status)
-continue
-
-if line_type == 'test' and status == 'fail':
-result.store(current_section, name, status)
-continue
-
-if line_type == 'test' and status == 'skip':
-result.store(current_section, name, status)
-continue
-
-result.sort_tests()
-return result
-
 @OETestID(1600)
 @skipIfNotFeature('ptest', 'Test requires ptest to be in DISTRO_FEATURES')
 @OETestDepends(['ssh.SSHTest.test_ssh'])
@@ -83,7 +49,7 @@ class PtestRunnerTest(OERuntimeTestCase):
 extras['ptestresult.rawlogs'] = {'log': output}
 
 # Parse and save results
-parse_result = self.parse_ptest(ptest_runner_log)
+parse_result = PtestParser().parse(ptest_runner_log)
 parse_result.log_as_files(ptest_log_dir, test_status = ['pass','fail', 
'skip'])
 if os.path.exists(ptest_log_dir_link):
 # Remove the old link to create a new one
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
index 0807093fda6..f8d1c036306 100644
--- a/meta/lib/oeqa/utils/logparser.py
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -7,32 +7,40 @@ from . import ftools
 
 # A parser that can be used to identify weather a line is a test result or a 
section statement.
 class PtestParser(object):
-
 def __init__(self):
-
-self.test_regex = {}
-self.test_regex['pass'] = re.compile(r"^PASS:(.+)")
-self.test_regex['fail'] = re.compile(r"^FAIL:(.+)")
-self.test_regex['skip'] = re.compile(r"^SKIP:(.+)")
-
-self.section_regex = {}
-self.section_regex['begin'] = re.compile(r"^BEGIN: .*/(.+)/ptest")
-self.section_regex['end'] = re.compile(r"^END: .*/(.+)/ptest")
-
-# Parse a line and return a tuple containing the type of result 
(test/section) and its category, status and name
-def parse_line(self, line):
-
-for test_status, status_regex in test_status_list.items():
-test_name = status_regex.search(line)
-if test_name:
-return ['test', test_category, test_status, test_name.group(1)]
-
-for section_status, status_regex in section_status_list.items():
-section_name = status_regex.search(line)
-if section_name:
-return ['section', section_category, section_status, 
section_name.group(1)]
-return None
-
+self.results = Result()
+
+def parse(self, logfile):
+test_regex = {}
+test_regex['pass'] = re.compile(r"^PASS:(.+)")
+test_regex['fail'] = re.compile(r"^FAIL:(.+)")
+test_regex['skip'] = re.compile(r"^SKIP:(.+)")
+
+section_regex = {}
+section_regex['begin'] = re.compile(r"^BEGIN: .*/(.+)/ptest")
+section_regex['end'] = re.compile(r"^END: .*/(.+)/ptest")
+
+with open(logfile, errors='replace') as f:
+for line in f:
+result = section_regex['begin'].search(line)
+if result:
+

[OE-core] [PATCH 2/7] oeqa/utils/logparser: Simplify ptest log parsing code

2019-01-29 Thread Richard Purdie
logparser is only used by ptest. Its slightly overcomplicated as it was
intended to be reusable but wasn't. Simplify it as a dedicated parser is
likely to me more readable and maintainable.

Signed-off-by: Richard Purdie 
---
 meta/lib/oeqa/runtime/cases/ptest.py |  7 +---
 meta/lib/oeqa/utils/logparser.py | 62 +---
 2 files changed, 11 insertions(+), 58 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/ptest.py 
b/meta/lib/oeqa/runtime/cases/ptest.py
index 7d8849308d7..ebef3f9eac3 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -12,12 +12,7 @@ class PtestRunnerTest(OERuntimeTestCase):
 
 # a ptest log parser
 def parse_ptest(self, logfile):
-parser = Lparser(test_0_pass_regex="^PASS:(.+)",
- test_0_fail_regex="^FAIL:(.+)",
- test_0_skip_regex="^SKIP:(.+)",
- section_0_begin_regex="^BEGIN: .*/(.+)/ptest",
- section_0_end_regex="^END: .*/(.+)/ptest")
-parser.init()
+parser = Lparser()
 result = Result()
 
 with open(logfile, errors='replace') as f:
diff --git a/meta/lib/oeqa/utils/logparser.py b/meta/lib/oeqa/utils/logparser.py
index 0670627c3c0..328baeefaf6 100644
--- a/meta/lib/oeqa/utils/logparser.py
+++ b/meta/lib/oeqa/utils/logparser.py
@@ -5,66 +5,24 @@ import os
 import re
 from . import ftools
 
-
 # A parser that can be used to identify weather a line is a test result or a 
section statement.
 class Lparser(object):
 
-def __init__(self, test_0_pass_regex, test_0_fail_regex, 
test_0_skip_regex, section_0_begin_regex=None, section_0_end_regex=None, 
**kwargs):
-# Initialize the arguments dictionary
-if kwargs:
-self.args = kwargs
-else:
-self.args = {}
-
-# Add the default args to the dictionary
-self.args['test_0_pass_regex'] = test_0_pass_regex
-self.args['test_0_fail_regex'] = test_0_fail_regex
-self.args['test_0_skip_regex'] = test_0_skip_regex
-if section_0_begin_regex:
-self.args['section_0_begin_regex'] = section_0_begin_regex
-if section_0_end_regex:
-self.args['section_0_end_regex'] = section_0_end_regex
-
-self.test_possible_status = ['pass', 'fail', 'error', 'skip']
-self.section_possible_status = ['begin', 'end']
-
-self.initialized = False
+def __init__(self, **kwargs):
 
-
-# Initialize the parser with the current configuration
-def init(self):
-
-# extra arguments can be added by the user to define new test and 
section categories. They must follow a pre-defined pattern: 
___regex
-self.test_argument_pattern = "^test_(.+?)_(%s)_regex" % 
'|'.join(map(str, self.test_possible_status))
-self.section_argument_pattern = "^section_(.+?)_(%s)_regex" % 
'|'.join(map(str, self.section_possible_status))
-
-# Initialize the test and section regex dictionaries
 self.test_regex = {}
-self.section_regex ={}
-
-for arg, value in self.args.items():
-if not value:
-raise Exception('The value of provided argument %s is %s. 
Should have a valid value.' % (key, value))
-is_test =  re.search(self.test_argument_pattern, arg)
-is_section = re.search(self.section_argument_pattern, arg)
-if is_test:
-if not is_test.group(1) in self.test_regex:
-self.test_regex[is_test.group(1)] = {}
-self.test_regex[is_test.group(1)][is_test.group(2)] = 
re.compile(value)
-elif is_section:
-if not is_section.group(1) in self.section_regex:
-self.section_regex[is_section.group(1)] = {}
-self.section_regex[is_section.group(1)][is_section.group(2)] = 
re.compile(value)
-else:
-# TODO: Make these call a traceback instead of a simple 
exception..
-raise Exception("The provided argument name does not 
correspond to any valid type. Please give one of the following types:\nfor 
tests: %s\nfor sections: %s" % (self.test_argument_pattern, 
self.section_argument_pattern))
-
-self.initialized = True
+self.test_regex[0] = {}
+self.test_regex[0]['pass'] = re.compile(r"^PASS:(.+)")
+self.test_regex[0]['fail'] = re.compile(r"^FAIL:(.+)")
+self.test_regex[0]['skip'] = re.compile(r"^SKIP:(.+)")
+
+self.section_regex = {}
+self.section_regex[0] = {}
+self.section_regex[0]['begin'] = re.compile(r"^BEGIN: .*/(.+)/ptest")
+self.section_regex[0]['end'] = re.compile(r"^END: .*/(.+)/ptest")
 
 # Parse a line and return a tuple containing the type of result 
(test/section) and its category, status and name
 def parse_line(self, line):
-if not self.initialized:
-raise Exception("The parser is not 

[OE-core] [PATCH 1/7] oeqa/runtime/ptest: Avoid traceback for tests with no section

2019-01-29 Thread Richard Purdie
Some tests end up without a section, avoid tracebacks trying to use
None as a string in that case.

Signed-off-by: Richard Purdie 
---
 meta/lib/oeqa/runtime/cases/ptest.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/runtime/cases/ptest.py 
b/meta/lib/oeqa/runtime/cases/ptest.py
index 0972a583eeb..7d8849308d7 100644
--- a/meta/lib/oeqa/runtime/cases/ptest.py
+++ b/meta/lib/oeqa/runtime/cases/ptest.py
@@ -99,7 +99,7 @@ class PtestRunnerTest(OERuntimeTestCase):
 resmap = {'pass': 'PASSED', 'skip': 'SKIPPED', 'fail': 'FAILED'}
 for section in parse_result.result_dict:
 for test, result in parse_result.result_dict[section]:
-testname = "ptestresult." + section + "." + 
"_".join(test.translate(trans).split())
+testname = "ptestresult." + (section or "No-section") + "." + 
"_".join(test.translate(trans).split())
 extras[testname] = {'status': resmap[result]}
 
 failed_tests = {}
-- 
2.19.1

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


[OE-core] [PATCH] oe-git-proxy: Avoid resolving NO_PROXY against local files

2019-01-29 Thread Jan Kiszka
From: Jan Kiszka 

NO_PROXY may contain * elements, and if we are unlucky (or want to match
all hosts with *), we will pick up local files rather than doing the
match in match_host. Quoting helps here.

Signed-off-by: Jan Kiszka 
---
 scripts/oe-git-proxy | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy
index 7a43fe6a6e..1800942f36 100755
--- a/scripts/oe-git-proxy
+++ b/scripts/oe-git-proxy
@@ -131,8 +131,8 @@ if [ -z "$ALL_PROXY" ]; then
 fi
 
 # Connect directly to hosts in NO_PROXY
-for H in ${NO_PROXY//,/ }; do
-   if match_host $1 $H; then
+for H in "${NO_PROXY//,/ }"; do
+   if match_host $1 "$H"; then
exec $SOCAT STDIO $METHOD
fi
 done
-- 
2.16.4
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] Yocto Project Status WW05'19

2019-01-29 Thread Jolley, Stephen K
Current Dev Position: YP 2.7 M3

Next Deadline: YP 2.7 M3 Cutoff is Feb. 25, 2019


SWAT Team Rotation:

* SWAT lead is currently: Armin

* SWAT team rotation: Armin -> Anuj on Feb. 1, 2019

* SWAT team rotation: Anuj -> Paul on Feb. 8, 2019

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


Key Status/Updates:

* YP 2.6.1 should release this week. The transition to automated QA is 
raising some questions about test results but we're working through those.

* YP 2.7 M2 was built and is in QA and is 8% done.  See: 
https://wiki.yoctoproject.org/wiki/2.7_QA_Status

* There have been a further round of gitsm fixes (and new test case 
additions). If anyone is seeing gitsm fetcher issues please report them. There 
are requests to backport these changes to the stable series. This has risks but 
people are reporting bugs there so is something we need to consider.

* There has been little follow up from the last round of AUH patches. 
Please can maintainers work on this and get these submitted!

* There has been little feedback on the proposed virtgl changes, these 
will likely merge as no discussion will be taken to mean there are no 
objections. This will have a performance impact.

* There have been changes to the way the arm tunes are handled which 
merged after much discussion. The solution that merged should be safe and 
uncontroversial but if these do cause problems for anyone, please report ASAP.

* We're getting much improved results from our automated testing but 
these are highlighting a number of problems. There is an email about issues 
found in ptest. The biggest challenge here now is finding people able to step 
up and help improve things.


Planned Releases for YP 2.7:

* YP 2.7 M2 is built and in QA.

* YP 2.7 M2 Release Target is Feb. 1, 2019

* YP 2.7 M3 Cutoff is Feb. 25, 2019

* YP 2.7 M3 Release Target is Mar. 8, 2019

* YP 2.7 M4 Cutoff is Apr. 1, 2019

* YP 2.7 M4 Release Target is Apr. 26, 2019


Planned upcoming dot releases:

* YP 2.6.1 (Thud) will release shortly.

* YP 2.5.3 (Sumo) will be targeted after YP 2.7 M2 is done.

* YP 2.5.4 (Sumo) will be targeted after YP 2.7 M4 is done.

* YP 2.6.2 (Thud) will be targeted after YP 2.5.4 is done.


Tracking Metrics:

* WDD 2393 (last week 2421) 
(https://wiki.yoctoproject.org/charts/combo.html)

* Poky Patch Metrics

oTotal patches found: 1583 (last week 1572)

oPatches in the Pending State: 677 (43%) [last week 677 (43%)]


Key Status Links for YP:

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

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

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


The Status reports are now stored on the wiki at: 
https://wiki.yoctoproject.org/wiki/Weekly_Status


[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
*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


Re: [OE-core] [PATCH 11/24] mesa-gl: do not enable nativesdk variant to avoid clashes with main mesa recipe

2019-01-29 Thread Alexander Kanavin
On Mon, 28 Jan 2019 at 18:37, Alexander Kanavin  wrote:
> > I really hate using remove in OE-Core. Lets find a different way to do
> > this please as if we do this, its nearly impossible to undo in another
> > layer...
>
> Sure, I think moving 'BBCLASSEXTEND = "native nativesdk"' from
> mesa.inc to mesa_*.bb should sort this.

Actually, no - mesa-gl.bb includes mesa.bb, so this moving wouldn't
help. I simply set the PREFERRED_PROVIDER instead:

https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=akanavin/virgl-gtk=b517d2940a19cf19647937ea727959c51fc28c1c

The full branch is otherwise the same:
https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=akanavin/virgl-gtk

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


Re: [OE-core] [PATCH 1/1] pkgdata.py: avoid target-sdk-dummy-provides to mess things up

2019-01-29 Thread Richard Purdie
On Tue, 2019-01-29 at 17:14 +0800, Chen Qi wrote:
> Sometimes we meet the following failure for the test_lookup_recipe
> test case.
> 
>   AssertionError: 'zlib\nbusybox is in the RPROVIDES of target-sdk-
> provid[32 chars]ummy' != 'zlib\nbusybox'
> zlib
>   + busybox- busybox is in the RPROVIDES of target-sdk-provides-
> dummy:
>   - target-sdk-provides-dummy
> 
> This is because target-sdk-provides-dummy rprovides busybox.
> 
> So clean things up to avoid failure.
> 
> Signed-off-by: Chen Qi 
> ---
>  meta/lib/oeqa/selftest/cases/pkgdata.py | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py
> b/meta/lib/oeqa/selftest/cases/pkgdata.py
> index 0b4caf1..e02c6c4 100644
> --- a/meta/lib/oeqa/selftest/cases/pkgdata.py
> +++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
> @@ -13,6 +13,7 @@ class OePkgdataUtilTests(OESelftestTestCase):
>  super(OePkgdataUtilTests, cls).setUpClass()
>  # Ensure we have the right data in pkgdata
>  cls.logger.info('Running bitbake to generate pkgdata')
> +bitbake('target-sdk-provides-dummy -c cleansstate')
>  bitbake('busybox zlib m4')

Nice debugging!

clean is enough here, we don't want to run cleansstate on what might be
a shared sstate cache though.

Cheers,

Richard

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


Re: [OE-core] [PATCH 1/2 v5] resultstool: enable merge, store, report and regression analysis

2019-01-29 Thread Yeoh, Ee Peng
Hi RP,

I had submitted the v6 patches with below changes.
v6:
  Add regression for directory and git repository
  Enable regression pairing base set to multiple target sets 
  Revise selftest testing for regression
http://lists.openembedded.org/pipermail/openembedded-core/2019-January/278486.html
http://lists.openembedded.org/pipermail/openembedded-core/2019-January/278487.html
http://lists.openembedded.org/pipermail/openembedded-core/2019-January/278488.html

For regression directory and git, it can support arbitrary directory layout.  
The regression will select pair of result instances for comparison based on the 
unique configurations data inside the result instance itself. 

I have some questions regarding below items:
>I think there is a third thing we also need to look at:
>
>It would be great if there was some way of allowing some kind of templating 
>when storing into the git >repository. This way a general local log file from 
>tmp/log/oeqa could be stored into the git repo, being >split according to the 
>layout of the repo if needed.
>
>Our default layout could match that from the autobuilder but the repository 
>could define a layout?
Before developing custom template layout for store git repo, I would like to 
understand more so that I will make sure the output will fulfill the 
requirement. May I know what was the intention to store result into git repo 
with custom layout template? Can you share the use case? 

For ptest and perform tests, let me look into them. Thank you for sharing the 
logparser. 
http://git.yoctoproject.org/cgit.cgi/poky-contrib/tree/meta/lib/oeqa/utils/logparser.py#n101

Best regards,
Yeoh Ee Peng 

-Original Message-
From: Richard Purdie [mailto:richard.pur...@linuxfoundation.org] 
Sent: Tuesday, January 29, 2019 12:29 AM
To: Yeoh, Ee Peng ; 
openembedded-core@lists.openembedded.org
Cc: Eggleton, Paul ; Burton, Ross 

Subject: Re: [OE-core] [PATCH 1/2 v5] resultstool: enable merge, store, report 
and regression analysis

Hi Ee Peng,

On Mon, 2019-01-28 at 02:12 +, Yeoh, Ee Peng wrote:
> Thanks for providing the precious inputs. 
> Agreed with you that the current patch that enable files based 
> regression was not enough for other use cases.
> 
> From the information that you had shared, there are 2 more regression 
> use cases that I have in mind:
> Use case#1: directory based regression Given that Autobuilder stored 
> result files inside /testresults directories, user shall be able to 
> perform the directory based regression using output from Autobuilder 
> directly, such as below Autobuilder directories.
> https://autobuilder.yocto.io/pub/releases/yocto-2.6.1.rc1/testresults/
> qemux86/testresults.json 
> https://autobuilder.yocto.io/pub/releases/yocto-2.7_M1.rc1/testresults
> /qemux86/testresults.json 
> https://autobuilder.yocto.io/pub/releases/yocto-2.7_M2.rc1/testresults
> /qemux86/testresults.json
> 
> Assumed that there are 2 directories storing list of result files.
> User shall provide these 2 directories for regression, regression 
> scripts will first parse through all the available files inside each 
> directories, then perform regression based on available configuration 
> data to determine the regression pair (eg. select result_set_1 from
> directory#1 and result_set_x from directory#2 if they both have 
> matching configurations).

Yes, this would be very useful. I suspect you don't need to have matching 
layouts, just import from all the json files in a given directory for the 
comparison.

This way we can support arbitrary layouts.

> Use case#2: git branch based regression Given that Autobuilder stored 
> result files inside /testresults directories, user shall first store 
> these directories and the result files in each git branch accordingly 
> using the existing store plugin.
> After that, user can used the git branch based regression to analysis 
> the information.
> Store in yocto-2.6.1.rc1, yocto-2.7_M1.rc1, yocto-2.7_M2.rc1 git 
> branch accordingly 
> https://autobuilder.yocto.io/pub/releases/yocto-2.6.1.rc1/testresults/
> https://autobuilder.yocto.io/pub/releases/yocto-2.7_M1.rc1/testresults
> / 
> https://autobuilder.yocto.io/pub/releases/yocto-2.7_M2.rc1/testresults
> /
>  
> Assumed that result files are stored inside git repository with 
> specific git branch storing result files for single commit. User shall 
> provide the 2 specific git branches for regression, regression scripts 
> will first parse through all the available files inside each git 
> branch, then perform regression based on available configuration data 
> to determine the regression pair (eg. select result_set_1 from
> git_branch_1 and result_set_x from git_branch_2 if they both have 
> matching configurations).
> 
> The current codebase can be easily extended to enable both use cases 
> above. Please let me know if both use cases above are important and 
> please give us your inputs.

Yes, I think these are two key use cases we need to support.

I 

Re: [OE-core] [PATCH v4 00/12] util-linux: one package per binary

2019-01-29 Thread André Draszik
ping

On Wed, 2019-01-16 at 12:51 +, André Draszik wrote:
> v4:
> * update patch 06/15
>   * unconditionally assign PACKAGE_PREPROCESS_FUNCS
> * update patch 07/15
>   * introduce update_files() helper function
> 
> Cheers,
> Andre'
> 
> 

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


[OE-core] [PATCH 1/1] pkgdata.py: avoid target-sdk-dummy-provides to mess things up

2019-01-29 Thread Chen Qi
Sometimes we meet the following failure for the test_lookup_recipe
test case.

  AssertionError: 'zlib\nbusybox is in the RPROVIDES of target-sdk-provid[32 
chars]ummy' != 'zlib\nbusybox'
zlib
  + busybox- busybox is in the RPROVIDES of target-sdk-provides-dummy:
  - target-sdk-provides-dummy

This is because target-sdk-provides-dummy rprovides busybox.

So clean things up to avoid failure.

Signed-off-by: Chen Qi 
---
 meta/lib/oeqa/selftest/cases/pkgdata.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py 
b/meta/lib/oeqa/selftest/cases/pkgdata.py
index 0b4caf1..e02c6c4 100644
--- a/meta/lib/oeqa/selftest/cases/pkgdata.py
+++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
@@ -13,6 +13,7 @@ class OePkgdataUtilTests(OESelftestTestCase):
 super(OePkgdataUtilTests, cls).setUpClass()
 # Ensure we have the right data in pkgdata
 cls.logger.info('Running bitbake to generate pkgdata')
+bitbake('target-sdk-provides-dummy -c cleansstate')
 bitbake('busybox zlib m4')
 
 @OETestID(1203)
-- 
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] pkgdata.py: avoid target-sdk-dummy-provides to mess things up

2019-01-29 Thread Chen Qi
*** BLURB HERE ***
The following changes since commit ecfe26834922861ab69602b8c1aa404080f0fb0c:

  libtool: Fix ignoring compiler-rt libs (2019-01-27 13:05:17 +)

are available in the git repository at:

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

Chen Qi (1):
  pkgdata.py: avoid target-sdk-dummy-provides to mess things up

 meta/lib/oeqa/selftest/cases/pkgdata.py | 1 +
 1 file changed, 1 insertion(+)

-- 
1.9.1

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


[OE-core] [PATCH 1/2 v6] resultstool: enable merge, store, report and regression analysis

2019-01-29 Thread Yeoh Ee Peng
OEQA outputs test results into json files and these files were
archived by Autobuilder during QA releases. Example: each oe-selftest
run by Autobuilder for different host distro generate a
testresults.json file.

These scripts were developed as a test result tools to manage
these testresults.json file.

Using the "store" operation, user can store multiple testresults.json
files as well as the pre-configured directories used to hold those files.

Using the "merge" operation, user can merge multiple testresults.json
files to a target file.

Using the "report" operation, user can view the test result summary
for all available testresults.json files inside a ordinary directory
or a git repository.

Using the "regression-file" operation, user can perform regression
analysis on testresults.json files specified. Using the "regression-dir"
and "regression-git" operations, user can perform regression analysis
on directory and git accordingly.

These resultstool operations expect the testresults.json file to use
the json format below.
{
"": {
"configuration": {
"": "",
"": "",
...
"": "",
},
"result": {
"": {
"status": "",
"log": ""
},
"": {
"status": "",
"log": ""
},
...
"": {
"status": "",
"log": ""
},
}
},
...
"": {
"configuration": {
"": "",
"": "",
...
"": "",
},
"result": {
"": {
"status": "",
"log": ""
},
"": {
"status": "",
"log": ""
},
...
"": {
"status": "",
"log": ""
},
}
},
}

To use these scripts, first source oe environment, then run the
entry point script to look for help.
$ resultstool

To store test result from oeqa automated tests, execute the below
$ resultstool store  

To merge multiple testresults.json files, execute the below
$ resultstool merge  

To report test report, execute the below
$ resultstool report 

To perform regression file analysis, execute the below
$ resultstool regression-file  

To perform regression dir analysis, execute the below
$ resultstool regression-dir  

To perform regression git analysis, execute the below
$ resultstool regression-git   

[YOCTO# 13012]
[YOCTO# 12654]

Signed-off-by: Yeoh Ee Peng 
---
 meta/lib/oeqa/files/testresults/testresults.json   |  40 +
 meta/lib/oeqa/selftest/cases/resultstooltests.py   | 104 +++
 scripts/lib/resultstool/__init__.py|   0
 scripts/lib/resultstool/merge.py   |  71 
 scripts/lib/resultstool/regression.py  | 195 +
 scripts/lib/resultstool/report.py  | 113 
 scripts/lib/resultstool/resultsutils.py|  57 ++
 scripts/lib/resultstool/store.py   | 110 
 .../resultstool/template/test_report_full_text.txt |  35 
 scripts/resultstool|  84 +
 10 files changed, 809 insertions(+)
 create mode 100644 meta/lib/oeqa/files/testresults/testresults.json
 create mode 100644 meta/lib/oeqa/selftest/cases/resultstooltests.py
 create mode 100644 scripts/lib/resultstool/__init__.py
 create mode 100644 scripts/lib/resultstool/merge.py
 create mode 100644 scripts/lib/resultstool/regression.py
 create mode 100644 scripts/lib/resultstool/report.py
 create mode 100644 scripts/lib/resultstool/resultsutils.py
 create mode 100644 scripts/lib/resultstool/store.py
 create mode 100644 scripts/lib/resultstool/template/test_report_full_text.txt
 create mode 100755 scripts/resultstool

diff --git a/meta/lib/oeqa/files/testresults/testresults.json 
b/meta/lib/oeqa/files/testresults/testresults.json
new file mode 100644
index 000..1a62155
--- /dev/null
+++ b/meta/lib/oeqa/files/testresults/testresults.json
@@ -0,0 +1,40 @@
+{
+"runtime_core-image-minimal_qemuarm_20181225195701": {
+"configuration": {
+"DISTRO": "poky",
+"HOST_DISTRO": "ubuntu-16.04",
+"IMAGE_BASENAME": "core-image-minimal",
+"IMAGE_PKGTYPE": "rpm",
+"LAYERS": {
+"meta": {
+"branch": "master",
+"commit": "801745d918e83f976c706f29669779f5b292ade3",
+"commit_count": 52782
+},
+"meta-poky": {
+"branch": "master",
+"commit": "801745d918e83f976c706f29669779f5b292ade3",
+"commit_count": 52782
+},
+"meta-yocto-bsp": {
+"branch": "master",
+

[OE-core] [PATCH 2/2 v6] scripts/resultstool: enable manual execution and result creation

2019-01-29 Thread Yeoh Ee Peng
From: Mazliana 

Integrated “manualexecution” operation to test-case-mgmt scripts.
Manual execution script is a helper script to execute all manual
test cases in baseline command, which consists of user guideline
steps and the expected results. The last step will ask user to
provide their input to execute result. The input options are
passed/failed/blocked/skipped status. The result given will be
written in testresults.json including log error from the user
input and configuration if there is any.The output test result
for json file is created by using OEQA library.

The configuration part is manually key-in by the user. The system
allow user to specify how many configuration they want to add and
they need to define the required configuration name and value pair.
In QA perspective, "configuration" means the test environments and
parameters used during QA setup before testing can be carry out.
Example of configurations: image used for boot up, host machine
distro used, poky configurations, etc.

The purpose of adding the configuration is to standardize the
output test result format between automation and manual execution.

To use these scripts, first source oe environment, then run the
entry point script to look for help.
$ resultstool

To execute manual test cases, execute the below
$ resultstool  manualexecution 

By default testresults.json store in /tmp/log/manual/

[YOCTO #12651]

Signed-off-by: Mazliana 
Signed-off-by: Yeoh Ee Peng 
---
 scripts/lib/resultstool/manualexecution.py | 137 +
 scripts/resultstool|   8 ++
 2 files changed, 145 insertions(+)
 create mode 100644 scripts/lib/resultstool/manualexecution.py

diff --git a/scripts/lib/resultstool/manualexecution.py 
b/scripts/lib/resultstool/manualexecution.py
new file mode 100644
index 000..e0c0c36
--- /dev/null
+++ b/scripts/lib/resultstool/manualexecution.py
@@ -0,0 +1,137 @@
+# test case management tool - manual execution from testopia test cases
+#
+# Copyright (c) 2018, Intel Corporation.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms and conditions of the GNU General Public License,
+# version 2, as published by the Free Software Foundation.
+#
+# This program is distributed in the hope it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+# more details.
+#
+import argparse
+import json
+import os
+import sys
+import datetime
+import re
+from oeqa.core.runner import OETestResultJSONHelper
+from resultstool.resultsutils import load_json_file
+
+class ManualTestRunner(object):
+def __init__(self):
+self.jdata = ''
+self.test_module = ''
+self.test_suite = ''
+self.test_cases = ''
+self.configuration = ''
+self.starttime = ''
+self.result_id = ''
+self.write_dir = ''
+
+def _get_testcases(self, file):
+self.jdata = load_json_file(file)
+self.test_cases = []
+self.test_module = self.jdata[0]['test']['@alias'].split('.', 2)[0]
+self.test_suite = self.jdata[0]['test']['@alias'].split('.', 2)[1]
+for i in self.jdata:
+self.test_cases.append(i['test']['@alias'].split('.', 2)[2])
+
+def _get_input(self, config):
+while True:
+output = input('{} = '.format(config))
+if re.match('^[a-zA-Z0-9_]+$', output):
+break
+print('Only alphanumeric and underscore are allowed. Please try 
again')
+return output
+
+def _create_config(self):
+self.configuration = {}
+while True:
+try:
+conf_total = int(input('\nPlease provide how many 
configuration you want to save \n'))
+break
+except ValueError:
+print('Invalid input. Please provide input as a number not 
character.')
+for i in range(conf_total):
+print('-')
+print('This is configuration #%s ' % (i + 1) + '. Please provide 
configuration name and its value')
+print('-')
+name_conf = self._get_input('Configuration Name')
+value_conf = self._get_input('Configuration Value')
+print('-\n')
+self.configuration[name_conf.upper()] = value_conf
+current_datetime = datetime.datetime.now()
+self.starttime = current_datetime.strftime('%Y%m%d%H%M%S')
+self.configuration['STARTTIME'] = self.starttime
+self.configuration['TEST_TYPE'] = self.test_module
+
+def _create_result_id(self):
+self.result_id = 'manual_' + self.test_module + '_' + self.starttime
+
+def _execute_test_steps(self, test_id):
+test_result = {}
+

[OE-core] [PATCH 0/2 v6] test-case-mgmt

2019-01-29 Thread Yeoh Ee Peng
v1:
  Face key error from oe-git-archive
  Undesirable behavior when storing to multiple git branch

v2: 
  Include fix for oe-git-archive
  Include fix for store result to multiple git branch
  Improve git commit message   

v3:
  Enhance fix for oe-git-archive by using exception catch to
  improve code readability and easy to understand

v4:
  Add new features, merge result files & regression analysis 
  Add selftest to merge, store, report and regression functionalities
  Revise codebase for pythonic
  
v5:
  Add required files for selftest testing store
  
v6:
  Add regression for directory and git repository
  Enable regression pairing base set to multiple target sets 
  Revise selftest testing for regression

Mazliana (1):
  scripts/resultstool: enable manual execution and result creation

Yeoh Ee Peng (1):
  resultstool: enable merge, store, report and regression analysis

 meta/lib/oeqa/files/testresults/testresults.json   |  40 +
 meta/lib/oeqa/selftest/cases/resultstooltests.py   | 104 +++
 scripts/lib/resultstool/__init__.py|   0
 scripts/lib/resultstool/manualexecution.py | 137 +++
 scripts/lib/resultstool/merge.py   |  71 
 scripts/lib/resultstool/regression.py  | 195 +
 scripts/lib/resultstool/report.py  | 113 
 scripts/lib/resultstool/resultsutils.py|  57 ++
 scripts/lib/resultstool/store.py   | 110 
 .../resultstool/template/test_report_full_text.txt |  35 
 scripts/resultstool|  92 ++
 11 files changed, 954 insertions(+)
 create mode 100644 meta/lib/oeqa/files/testresults/testresults.json
 create mode 100644 meta/lib/oeqa/selftest/cases/resultstooltests.py
 create mode 100644 scripts/lib/resultstool/__init__.py
 create mode 100644 scripts/lib/resultstool/manualexecution.py
 create mode 100644 scripts/lib/resultstool/merge.py
 create mode 100644 scripts/lib/resultstool/regression.py
 create mode 100644 scripts/lib/resultstool/report.py
 create mode 100644 scripts/lib/resultstool/resultsutils.py
 create mode 100644 scripts/lib/resultstool/store.py
 create mode 100644 scripts/lib/resultstool/template/test_report_full_text.txt
 create mode 100755 scripts/resultstool

-- 
2.7.4

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


Re: [OE-core] [PATCH 1/1] base.bbclass: Use bb.event.ParseStarted for HOSTTOOLS

2019-01-29 Thread Robert Yang




On 1/28/19 7:46 PM, Peter Kjellerstedt wrote:

-Original Message-
From: openembedded-core-boun...@lists.openembedded.org  On Behalf Of Robert Yang
Sent: den 28 januari 2019 10:19
To: openembedded-core@lists.openembedded.org
Subject: [OE-core] [PATCH 1/1] base.bbclass: Use bb.event.ParseStarted
for HOSTTOOLS

Fixed:
$ export BB_SERVER_TIMEOUT=-1
$ bitbake quilt-native
$ rm -fr tmp
$ bitbake quilt-native
ERROR: Error running gcc  --version: /bin/sh: gcc: command not found

This is because bb.event.ParseStarted fires only once when server is running,


I assume you meant bb.event.ConfigParsed above?


Yes, thanks for pointing it out, fixed it in the repo:

git://git.openembedded.org/openembedded-core-contrib rbt/ht

// Robert





but bb.event.ParseStarted fires every time when build configs are changed, so
use bb.event.ParseStarted to fix the problem.

[YOCTO #13022]

Signed-off-by: Robert Yang 
---
  meta/classes/base.bbclass | 11 +--
  1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index f1a3c0e..c273a29 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -220,11 +220,18 @@ def buildcfg_neededvars(d):
  bb.fatal('The following variable(s) were not set: %s\nPlease set them 
directly, or choose a MACHINE or DISTRO that sets them.' % ', 
'.join(pesteruser))

  addhandler base_eventhandler
-base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.MultiConfigParsed 
bb.event.BuildStarted bb.event.RecipePreFinalise bb.runqueue.sceneQueueComplete 
bb.event.RecipeParsed"
+base_eventhandler[eventmask] = "\
+   bb.event.ParseStarted \
+   bb.event.MultiConfigParsed \
+   bb.event.BuildStarted \
+   bb.event.RecipePreFinalise \
+   bb.runqueue.sceneQueueComplete \
+   bb.event.RecipeParsed \
+"
  python base_eventhandler() {
  import bb.runqueue

-if isinstance(e, bb.event.ConfigParsed):
+if isinstance(e, bb.event.ParseStarted):
  if not d.getVar("NATIVELSBSTRING", False):
  d.setVar("NATIVELSBSTRING", lsb_distro_identifier(d))
  d.setVar('BB_VERSION', bb.__version__)
--
2.7.4


//Peter



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