[OE-core] [PATCH 3/3] libtool-cross: Handle ccache sstate 'infection' issues
On a system without ccache, f you: INHERIT += "ccache" bitbake libtool-cross bitbake apmd then it fails due to being unable to find ccache. The references to ccache are coded into libtool-cross but the sstate checksum doesn't reflect this due to the way the class is coded (output should be the same regardless). The simplest solution is to remove references to ccache from the libtool script. The output then works regardless of whether ccache is present or not. The libtool-cross script is only used in a handful of cases (most of the time its dynamically generated by autoconf) so any performance issue is minor. Signed-off-by: Richard Purdie --- meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb | 8 1 file changed, 8 insertions(+) diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb b/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb index b2683104686..522bf3a0e96 100644 --- a/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +++ b/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb @@ -13,11 +13,19 @@ do_configure_prepend () { rm -f ${STAGING_DATADIR}/aclocal/lt*.m4 } +# +# ccache may or may not be INHERITED, we remove references to it so the sstate +# artefact works on a machine where its not present. libtool-cross isn't used +# heavily so any performance issue is minor. +# Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc" +# do_install () { install -d ${D}${bindir_crossscripts}/ install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool sed -e 's@^\(predep_objects="\).*@\1"@' \ -e 's@^\(postdep_objects="\).*@\1"@' \ + -e 's@^CC="ccache.@CC="@' \ + -e 's@^LTCC="ccache.@LTCC="@' \ -i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/3] sstate: Remove DEPLOY_DIR_IMAGE from SSTATE_DUPWHITELIST
Replace the generic whitelist entry with entries for the three specific 'problem' cases in OE-Core. This means the general DEPLOY_DIR_IMAGE entry doesn't mask problems for others as was recently encoutered by users reported on irc. In the whitelisted cases they occur only in multilib builds and the files are identical. Signed-off-by: Richard Purdie --- meta/classes/sstate.bbclass | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 6743becf071..9927c76596e 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -25,7 +25,7 @@ PV[vardepvalue] = "${PV}" SSTATE_EXTRAPATH[vardepvalue] = "" # For multilib rpm the allarch packagegroup files can overwrite (in theory they're identical) -SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/noarch/" +SSTATE_DUPWHITELIST = "${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/noarch/" # Avoid docbook/sgml catalog warnings for now SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml" # sdk-provides-dummy-nativesdk and nativesdk-buildtools-perl-dummy overlap for different SDKMACHINE @@ -33,6 +33,10 @@ SSTATE_DUPWHITELIST += "${DEPLOY_DIR_RPM}/sdk_provides_dummy_nativesdk/ ${DEPLOY SSTATE_DUPWHITELIST += "${DEPLOY_DIR_RPM}/buildtools_dummy_nativesdk/ ${DEPLOY_DIR_IPK}/buildtools-dummy-nativesdk/" # Archive the sources for many architectures in one deploy folder SSTATE_DUPWHITELIST += "${DEPLOY_DIR_SRC}" +# ovmf/grub-efi/systemd-boot multilib recipes can generate identical overlapping files +SSTATE_DUPWHITELIST += "${DEPLOY_DIR_IMAGE}/ovmf" +SSTATE_DUPWHITELIST += "${DEPLOY_DIR_IMAGE}/grub-efi" +SSTATE_DUPWHITELIST += "${DEPLOY_DIR_IMAGE}/systemd-boot" SSTATE_SCAN_FILES ?= "*.la *-config *_config postinst-*" SSTATE_SCAN_CMD ??= 'find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES").split())}" \) -type f' -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/3] oeqa/esdk/devtool: Drop OETestDepends usage
OETestDepends doesn't work with parallelism and in this case we don't really need this dependency, it would just short out some tests quickly in the rare case the esdk environment was broken. Currently this is masking tests which is a much worse problem and we can't make OETestDepends work reliably with parallelism so drop the dependencies. Signed-off-by: Richard Purdie --- meta/lib/oeqa/sdkext/cases/devtool.py | 8 1 file changed, 8 deletions(-) diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py index ea9051710ae..0860e8d17cf 100644 --- a/meta/lib/oeqa/sdkext/cases/devtool.py +++ b/meta/lib/oeqa/sdkext/cases/devtool.py @@ -6,7 +6,6 @@ import shutil import subprocess from oeqa.sdkext.case import OESDKExtTestCase -from oeqa.core.decorator.depends import OETestDepends from oeqa.core.decorator.oeid import OETestID from oeqa.utils.httpserver import HTTPService @@ -45,28 +44,23 @@ class DevtoolTest(OESDKExtTestCase): self.assertEqual(output.startswith(self.tc.sdk_dir), True, \ msg="Seems that devtool isn't the eSDK one: %s" % output) -@OETestDepends(['test_devtool_location']) def test_devtool_add_reset(self): self._run('devtool add myapp %s' % self.myapp_dst) self._run('devtool reset myapp') @OETestID(1605) -@OETestDepends(['test_devtool_location']) def test_devtool_build_make(self): self._test_devtool_build(self.myapp_dst) @OETestID(1606) -@OETestDepends(['test_devtool_location']) def test_devtool_build_esdk_package(self): self._test_devtool_build_package(self.myapp_dst) @OETestID(1607) -@OETestDepends(['test_devtool_location']) def test_devtool_build_cmake(self): self._test_devtool_build(self.myapp_cmake_dst) @OETestID(1608) -@OETestDepends(['test_devtool_location']) def test_extend_autotools_recipe_creation(self): req = 'https://github.com/rdfa/librdfa' recipe = "librdfa" @@ -78,7 +72,6 @@ class DevtoolTest(OESDKExtTestCase): self._run('devtool reset %s' % recipe) @OETestID(1609) -@OETestDepends(['test_devtool_location']) def test_devtool_kernelmodule(self): docfile = 'https://github.com/umlaeute/v4l2loopback.git' recipe = 'v4l2loopback-driver' @@ -89,7 +82,6 @@ class DevtoolTest(OESDKExtTestCase): self._run('devtool reset %s' % recipe) @OETestID(1610) -@OETestDepends(['test_devtool_location']) def test_recipes_for_nodejs(self): package_nodejs = "npm://registry.npmjs.org;name=winston;version=2.2.0" self._run('devtool add %s ' % package_nodejs) -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [meta-oe][PATCH 2/3] testimage: target.start exceptions not masked.
Previously the target.start exceptions were being masked by the catch clause of RuntimeError and BlockingIOError which are very broad. We decoupled the start method try clause from the runTests try clause which requires catching the BlockingIOError and RuntimeError. Signed-off-by: Paulo Neves --- meta/classes/testimage.bbclass | 36 +--- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 2aa59b0..f58d11d 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass @@ -269,24 +269,30 @@ def testimage_main(d): # Add systemd.log_level=debug to enable systemd debug logging bootparams = 'systemd.log_target=console' + tc.target.deploy() -results = None -orig_sigterm_handler = signal.signal(signal.SIGTERM, sigterm_exception) + +#We do not want the runTests to mask exeptions of target.start but we want a failed start +#to trigger a stop. try: -# We need to check if runqemu ends unexpectedly -# or if the worker send us a SIGTERM -tc.target.start(extra_bootparams=bootparams) -results = tc.runTests() -except (RuntimeError, BlockingIOError) as err: -if isinstance(err, RuntimeError): -bb.error('testimage received SIGTERM, shutting down...') -else: -bb.error('runqemu failed, shutting down...') -if results: -results.stop() -results = None +tc.target.start(extra_bootparams=bootparams) +results = None +orig_sigterm_handler = signal.signal(signal.SIGTERM, sigterm_exception) +try: +# We need to check if runqemu ends unexpectedly +# or if the worker send us a SIGTERM +results = tc.runTests() +except (RuntimeError, BlockingIOError) as err: +if isinstance(err, RuntimeError): +bb.error('testimage received SIGTERM, shutting down...') +else: +bb.error('runqemu failed, shutting down...') +if results: +results.stop() +results = None +finally: +signal.signal(signal.SIGTERM, orig_sigterm_handler) finally: -signal.signal(signal.SIGTERM, orig_sigterm_handler) tc.target.stop() # Show results (if we have them) -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [meta-oe][PATCH 1/3] testimage: Refactoring and fixing.
The testimage.bbclass invocation of controllers besides simpletarget and qemutarget was broken. Setting TEST_TARGET to class names did not work, only hardcoded values set in context.py were allowed. On the other hand the other TEST_TARGETs available were supposedly available through the class name convetion but none of them were working. See: https://bugzilla.yoctoproject.org/show_bug.cgi?id=12842 In this commit qemuwrapper and simpletarget TEST_TARGETS are now not available through these names, but through the common convention of class names. The code for layer defined controllers was outdated and broken because the example controllers in meta-yocto-bsp as well as the controllers available in masterimage were dependent only on the datastore d being available for __init__ contruction, when the testimage.bbclass and context.py, which initialize test controllers never passed the datastore. This commit fixes all the openembedded controllers to not use the datastore, but the testdata json file that is loaded by the testimage.bbclass. This way the tests can still be exported to be ran outside bitbake. The kwargs and logger is still passed in the constructor and there maybe some redundancies between the kwargs and the td test datstore, but this is not addressed in this commit. In masterimage.py there was a duplicate SystemdbootTarget which was removed. It is my opinion that all targets should go to meta-yocto-bsp or meta/ and should not get special treatment whether they come from poky or other layer. In this commit functionality that was lost in masterimage about retrieving a fresh BB_ORIGENV. The test data json file does not store this variable, so the build-time enviromental variables cannot be retrieved later on, when running the tests. The deploy() method invocation of the test cases was removed in the refactoring and this commit re-adds it in the same logical place. The deploy method was added as an abstract method so that all Test controller classes have this method. This method had been lost and was not used in the simpleremote and qemuwrapper, because these controllers do not need the functionality, but almost any real board requires certain steps to deploy the new images, before the tests can be ran. An example of this need was visible in the master image and subclasses in meta-yocto-bsp. A dependency on images fstypes of qemu was removed from testimage. The allowed file system types were not relevant for other controllers, and made it so that there was an import of the OEQemuTarget python class applicable to all possible controllers, including non qemu. The SimpleRemoteTarget, OEQemuTarget and a custom controller, developed according to the manual were successfully tested. Signed-off-by: Paulo Neves --- meta/classes/testimage.bbclass | 18 +--- meta/lib/oeqa/controllers/masterimage.py | 107 ++--- .../target/qemu.py => controllers/qemutarget.py} | 30 -- meta/lib/oeqa/controllers/simpleremote.py | 33 +++ .../target/ssh.py => controllers/sshtarget.py} | 9 +- meta/lib/oeqa/core/target/__init__.py | 4 + meta/lib/oeqa/runtime/context.py | 32 +- meta/lib/oeqa/targetcontrol.py | 97 ++- 8 files changed, 137 insertions(+), 193 deletions(-) rename meta/lib/oeqa/{core/target/qemu.py => controllers/qemutarget.py} (58%) create mode 100644 meta/lib/oeqa/controllers/simpleremote.py rename meta/lib/oeqa/{core/target/ssh.py => controllers/sshtarget.py} (98%) diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 6fa901b..2aa59b0 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass @@ -75,7 +75,7 @@ DEFAULT_TEST_SUITES_remove_qemumips64 = "${MIPSREMOVE}" TEST_SUITES ?= "${DEFAULT_TEST_SUITES}" TEST_QEMUBOOT_TIMEOUT ?= "1000" -TEST_TARGET ?= "qemu" +TEST_TARGET ?= "OEQemuTarget" TESTIMAGEDEPENDS = "" TESTIMAGEDEPENDS_qemuall = "qemu-native:do_populate_sysroot qemu-helper-native:do_populate_sysroot qemu-helper-native:do_addto_recipe_sysroot" @@ -147,7 +147,6 @@ def testimage_main(d): from oeqa.core.utils.misc import updateTestData from oeqa.runtime.context import OERuntimeTestContext from oeqa.runtime.context import OERuntimeTestContextExecutor -from oeqa.core.target.qemu import supported_fstypes from oeqa.core.utils.test import getSuiteCases from oeqa.utils import make_logger_bitbake_compatible @@ -189,15 +188,6 @@ def testimage_main(d): # Get machine machine = d.getVar("MACHINE") -# Get rootfs -fstypes = [fs for fs in d.getVar('IMAGE_FSTYPES').split(' ') - if fs in supported_fstypes] -if not fstypes: -bb.fatal('Unsupported image type built. Add a comptible image to ' - 'IMAGE_FSTYPES. Supported types: %s' % - ', '.join(supported_fstypes)) -rootfs = '%s.%s' % (image_name,
[OE-core] [meta-oe][PATCH 3/3] masterimage: Check for rootfs path instead of file.
The rootfs might be a directory path or a file path. A case in point is if the test wants to deploy a rootfs directly by rsyncing it to the target or even use it as part of a tftp server. Signed-off-by: Paulo Neves --- meta/lib/oeqa/controllers/masterimage.py | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/meta/lib/oeqa/controllers/masterimage.py b/meta/lib/oeqa/controllers/masterimage.py index 26e3870..fb8ab50 100644 --- a/meta/lib/oeqa/controllers/masterimage.py +++ b/meta/lib/oeqa/controllers/masterimage.py @@ -51,11 +51,7 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta self.image_fstype = self.get_image_fstype(td) self.rootfs = os.path.join(td['DEPLOY_DIR_IMAGE'], td['IMAGE_LINK_NAME'] + '.' + self.image_fstype) self.kernel = os.path.join(td['DEPLOY_DIR_IMAGE'], td["KERNEL_IMAGETYPE"] + '-' + td['MACHINE'] + '.bin') -if not os.path.isfile(self.rootfs): -# we could've checked that IMAGE_FSTYPES contains tar.gz but the config for running testimage might not be -# the same as the config with which the image was build, ie -# you bitbake core-image-sato with IMAGE_FSTYPES += "tar.gz" -# and your autobuilder overwrites the config, adds the test bits and runs bitbake core-image-sato -c testimage +if not os.path.exists(self.rootfs): bb.fatal("No rootfs found. Did you build the image ?\n" \ "If yes, did you build it with IMAGE_FSTYPES += \"{}\" ?" \ "\nExpected path: {}".format(" ".join(self.supported_image_fstypes), self.rootfs)) -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] perf: fail if src path does not exist
A missing src directory from a broken kernel recipe resulted only in a warning: WARNING: copyfile: stat of /home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch failed ([Errno 2] No such file or directory: '/home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch') With this change it's an error which can not be missed: ERROR: perf-1.0-r9 do_configure: Path does not exist: /home/builder/src/tmp-glibc/work-shared/target/kernel-source/tools/arch ERROR: perf-1.0-r9 do_configure: Function failed: copy_perf_source_from_kernel ERROR: Logfile of failure stored in: /home/builder/src/tmp-glibc/work/target-linux/perf/1.0-r9/temp/log.do_configure.21083 NOTE: recipe perf-1.0-r9: task do_configure: Failed ERROR: Task (/home/builder/src/poky/meta/recipes-kernel/perf/perf.bb:do_configure) failed with exit code '1' Signed-off-by: Mikko Rapeli --- meta/recipes-kernel/perf/perf.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index 2c6bbb4..c07afeb 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb @@ -147,6 +147,8 @@ python copy_perf_source_from_kernel() { for s in sources: src = oe.path.join(src_dir, s) dest = oe.path.join(dest_dir, s) +if not os.path.exists(src): +bb.fatal("Path does not exist: %s" % src) if os.path.isdir(src): oe.path.copyhardlinktree(src, dest) else: -- 1.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] lttng-tools: add systemd support
Add systemd service file of lttng-tools from Fedora ftp://fr2.rpmfind.net/linux/fedora/linux/development/rawhide /Everything/source/tree/Packages/l/lttng-tools-2.10.5-1.fc29.src.rpm And disable the service by default. Signed-off-by: Kai Kang --- meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service | 9 + meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb | 12 +++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service diff --git a/meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service b/meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service new file mode 100644 index 000..aaf81305923 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/lttng-sessiond.service @@ -0,0 +1,9 @@ +[Unit] +Description=LTTng 2.x central tracing registry session daemon + +[Service] +Type=forking +ExecStart=/usr/bin/lttng-sessiond -d + +[Install] +WantedBy=multi-user.target diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb b/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb index e4969c30807..0314b536376 100644 --- a/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb +++ b/meta/recipes-kernel/lttng/lttng-tools_2.9.5.bb @@ -31,12 +31,16 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ file://x32.patch \ file://run-ptest \ file://0001-Allow-multiple-attempts-to-connect-to-relayd.patch \ + file://lttng-sessiond.service \ " SRC_URI[md5sum] = "051224eb991aee07f8721ff1877d0b96" SRC_URI[sha256sum] = "77839eb6fc6c652125f08acfd9369701c2516eb05cc2084160e7efc7a3fb731c" -inherit autotools ptest pkgconfig useradd python3-dir manpages +inherit autotools ptest pkgconfig useradd python3-dir manpages systemd + +SYSTEMD_SERVICE_${PN} = "lttng-sessiond.service" +SYSTEMD_AUTO_ENABLE = "disable" USERADD_PACKAGES = "${PN}" GROUPADD_PARAM_${PN} = "tracing" @@ -52,6 +56,12 @@ FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" INSANE_SKIP_${PN} = "libexec dev-so" INSANE_SKIP_${PN}-dbg = "libexec" +do_install_append () { +# install systemd unit file +install -d ${D}${systemd_unitdir}/system +install -m 0644 ${WORKDIR}/lttng-sessiond.service ${D}${systemd_unitdir}/system +} + do_install_ptest () { for f in Makefile tests/Makefile tests/utils/utils.sh ; do install -D "${B}/$f" "${D}${PTEST_PATH}/$f" -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [morty][PATCH] Check libcc1 directory before disabling hardcoding of RPATHs
On vie, 2018-07-27 at 12:59 -0700, Andre McCurdy wrote: > On Fri, Jul 27, 2018 at 6:07 AM, Daniel Gomez > wrote: > > > > Check if libcc1 directory exits before disabling hardcode_into_libs > > configuration because of broken libtool in gcc recipes. > A patch for morty should either be a backport which has already been > merged into all applicable later branches (ie if the same fix is > needed in sumo, rocko or pyro it needs to be merged to those branches > first) or it should explain clearly why it's only applicable to morty. Well, I have realized about the real problem and it is only affecting to the gcc_4.9.bb recipe in the meta-linaro repo and not in the poky one. Basically, libcc1 support is included in gcc versions >= 5.x but not in older versions like 4.9.x and poky does not check the 'hardcode_into_libs' flags in versions where libcc1 is not included. > > > > > Signed-off-by: Daniel Gomez > > --- > > meta/recipes-devtools/gcc/gcc_5.4.bb | 3 ++- > > meta/recipes-devtools/gcc/gcc_6.4.bb | 3 ++- > > 2 files changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/meta/recipes-devtools/gcc/gcc_5.4.bb > > b/meta/recipes-devtools/gcc/gcc_5.4.bb > > index b0a523c..9da8ece 100644 > > --- a/meta/recipes-devtools/gcc/gcc_5.4.bb > > +++ b/meta/recipes-devtools/gcc/gcc_5.4.bb > > @@ -9,7 +9,8 @@ ARM_INSTRUCTION_SET_armv4 = "arm" > > do_configure_prepend() { > > # Easiest way to stop bad RPATHs getting into the library since we > > have a > > # broken libtool here > > - sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' > > ${S}/libcc1/configure > > + if [ -d "${S}/libcc1" ]; then > > + sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' > > ${S}/libcc1/configure > Missing fi ? Yes! I forgot to copy it from the original patch: https://lists.linaro.org/pipermail/openembedded/2018-March/000137.html > > > > } > > > > BBCLASSEXTEND = "nativesdk" > > diff --git a/meta/recipes-devtools/gcc/gcc_6.4.bb > > b/meta/recipes-devtools/gcc/gcc_6.4.bb > > index b0a523c..9da8ece 100644 > > --- a/meta/recipes-devtools/gcc/gcc_6.4.bb > > +++ b/meta/recipes-devtools/gcc/gcc_6.4.bb > > @@ -9,7 +9,8 @@ ARM_INSTRUCTION_SET_armv4 = "arm" > > do_configure_prepend() { > > # Easiest way to stop bad RPATHs getting into the library since we > > have a > > # broken libtool here > > - sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' > > ${S}/libcc1/configure > > + if [ -d "${S}/libcc1" ]; then > > + sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' > > ${S}/libcc1/configure > > } > > > > BBCLASSEXTEND = "nativesdk" > > -- > > 2.7.4 > > > > -- > > ___ > > 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
Re: [OE-core] [PATCH 1/1] allarch: disable allarch when multilib is used
On 2018年08月10日 17:24, richard.pur...@linuxfoundation.org wrote: On Fri, 2018-08-10 at 16:14 +0800, kai.k...@windriver.com wrote: From: Kai Kang Some allarch packages rdepends non-allarch packages. When multilib is used, it doesn't expand the dependency chain correctly, e.g. core-image-sato -> ca-certificates(allarch) -> openssl we expect dependency chain for lib32-core-image-sato: lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl it should install lib32-openssl for ca-certificates but openssl is still wrongly imported. Disable allarch when multilib is used. Signed-off-by: Kai Kang --- meta/classes/allarch.bbclass | 4 meta/classes/icecc.bbclass | 2 +- meta/classes/multilib.bbclass| 3 ++- meta/classes/multilib_global.bbclass | 4 +--- meta/classes/package.bbclass | 9 ++--- meta/classes/staging.bbclass | 2 +- 6 files changed, 15 insertions(+), 9 deletions(-) Looks good at a quick glance, I'll put it in for testing. Since I just saw it for other reasons, could you also see if we could remove the ${DEPLOY_DIR_RPM}/noarch/ mentioned as: # For multilib rpm the allarch packagegroup files can overwrite (in theory they're identical) SSTATE_DUPWHITELIST = "${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/noarch/" from sstate.bbclass please? OK. I'll check it. Regards, Kai Cheers, Richard -- 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 6/6] nss: fix multilib file conflict
2018-08-10 11:03 GMT+02:00 Richard Purdie : > Shouldn't those files be architecture independent given the files are > in sysconfdir? Isn't this really a determinism problem and we should > fix the builds to be deterministic instead? Yes, absolutely. This 'multilib_script' facility should be used only when there's a genuine reason for the files to be different for different multilib configs. Otherwise it does look like someone took a shortcut without looking at the problem properly. Alex -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] curl: support multilib installation of curl-config
From: Changqing Li Signed-off-by: Changqing Li --- meta/recipes-support/curl/curl_7.61.0.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/recipes-support/curl/curl_7.61.0.bb b/meta/recipes-support/curl/curl_7.61.0.bb index 76f5509..cabfcff 100644 --- a/meta/recipes-support/curl/curl_7.61.0.bb +++ b/meta/recipes-support/curl/curl_7.61.0.bb @@ -73,4 +73,7 @@ RRECOMMENDS_lib${BPN} += "ca-certificates" FILES_${PN} += "${datadir}/zsh" +inherit multilib_script +MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/curl-config" + BBCLASSEXTEND = "native nativesdk" -- 2.7.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] nfs-utils: add runtime depends for nfs-export-root
When DISTRO_FEATURE enable "systemd", the nfs-server.service in nfs-utils depends on /etc/exports, but the file "/etc/exports" installed by package nfs-export-root. Otherwise the service would failed. So we should add the runtime depends for nfs-export-root. Signed-off-by: Dengke Du --- meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb index 6d450c7..581f334 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb @@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84" # util-linux for libblkid DEPENDS = "libcap libevent util-linux sqlite3 libtirpc" RDEPENDS_${PN} = "${PN}-client bash" +RDEPENDS_${PN}_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'nfs-export-root', '' ,d)}" RRECOMMENDS_${PN} = "kernel-module-nfsd" inherit useradd -- 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] allarch: disable allarch when multilib is used
On Fri, 2018-08-10 at 16:14 +0800, kai.k...@windriver.com wrote: > From: Kai Kang > > Some allarch packages rdepends non-allarch packages. When multilib is > used, it doesn't expand the dependency chain correctly, e.g. > > core-image-sato -> ca-certificates(allarch) -> openssl > > we expect dependency chain for lib32-core-image-sato: > > lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl > > it should install lib32-openssl for ca-certificates but openssl is > still wrongly imported. > > Disable allarch when multilib is used. > > Signed-off-by: Kai Kang > --- > meta/classes/allarch.bbclass | 4 > meta/classes/icecc.bbclass | 2 +- > meta/classes/multilib.bbclass| 3 ++- > meta/classes/multilib_global.bbclass | 4 +--- > meta/classes/package.bbclass | 9 ++--- > meta/classes/staging.bbclass | 2 +- > 6 files changed, 15 insertions(+), 9 deletions(-) Looks good at a quick glance, I'll put it in for testing. Since I just saw it for other reasons, could you also see if we could remove the ${DEPLOY_DIR_RPM}/noarch/ mentioned as: # For multilib rpm the allarch packagegroup files can overwrite (in theory they're identical) SSTATE_DUPWHITELIST = "${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/noarch/" from sstate.bbclass please? Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 6/6] nss: fix multilib file conflict
On Fri, 2018-08-10 at 00:31 -0700, Zhixiong Chi wrote: > Signed-off-by: Zhixiong Chi > --- > meta/recipes-support/nss/nss_3.38.bb | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-support/nss/nss_3.38.bb b/meta/recipes- > support/nss/nss_3.38.bb > index f3e5170a89..4f53b55f05 100644 > --- a/meta/recipes-support/nss/nss_3.38.bb > +++ b/meta/recipes-support/nss/nss_3.38.bb > @@ -33,7 +33,9 @@ SRC_URI[sha256sum] = > "2c643d3c08d6935f4d325f40743719b6990aa25a79ec2f8f712c99d086 > UPSTREAM_CHECK_URI = > "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"; > UPSTREAM_CHECK_REGEX = "NSS_(?P.+)_release_notes" > > -inherit siteinfo > +inherit siteinfo multilib_script > + > +MULTILIB_SCRIPTS = "${PN}:${sysconfdir}/pki/nssdb/secmod.db > ${PN}:${sysconfdir}/pki/nssdb/key3.db" Shouldn't those files be architecture independent given the files are in sysconfdir? Isn't this really a determinism problem and we should fix the builds to be deterministic instead? Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 5/6] mobile-broadband-provider-info: fix the script multilib conflict
On Fri, 2018-08-10 at 00:31 -0700, Zhixiong Chi wrote: > Signed-off-by: Zhixiong Chi > --- > .../mobile-broadband-provider-info_git.bb | 4 > +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-connectivity/mobile-broadband-provider- > info/mobile-broadband-provider-info_git.bb b/meta/recipes- > connectivity/mobile-broadband-provider-info/mobile-broadband- > provider-info_git.bb > index dbc578e2d8..1a39932ffc 100644 > --- a/meta/recipes-connectivity/mobile-broadband-provider- > info/mobile-broadband-provider-info_git.bb > +++ b/meta/recipes-connectivity/mobile-broadband-provider- > info/mobile-broadband-provider-info_git.bb > @@ -10,4 +10,6 @@ PE = "1" > SRC_URI = "git://git.gnome.org/mobile-broadband-provider-info" > S = "${WORKDIR}/git" > > -inherit autotools > +inherit autotools multilib_script > + > +MULTILIB_SCRIPTS = "${PN}-dev:${datadir}/pkgconfig/mobile-broadband- > provider-info.pc" This is not correct, pkgconfig files installed into datadir are meant to be architecture independent. The ones in libdir can be target specific. What is the difference causing problems here? Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 2/6] libcheck: fix the multilib header conflict
On Fri, 2018-08-10 at 00:31 -0700, Zhixiong Chi wrote: > Signed-off-by: Zhixiong Chi > --- > meta/recipes-support/libcheck/libcheck_0.12.0.bb | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/meta/recipes-support/libcheck/libcheck_0.12.0.bb > b/meta/recipes-support/libcheck/libcheck_0.12.0.bb > index e646d43968..cb97201580 100644 > --- a/meta/recipes-support/libcheck/libcheck_0.12.0.bb > +++ b/meta/recipes-support/libcheck/libcheck_0.12.0.bb > @@ -12,7 +12,7 @@ UPSTREAM_CHECK_URI = "https://github.com/libcheck/c > heck/releases/" > > S = "${WORKDIR}/check-${PV}" > > -inherit autotools pkgconfig texinfo > +inherit autotools pkgconfig texinfo multilib_header > > CACHED_CONFIGUREVARS += "ac_cv_path_AWK_PATH=${bindir}/gawk" > > @@ -20,4 +20,8 @@ RREPLACES_${PN} = "check (<= 0.9.5)" > RDEPENDS_${PN} += "gawk" > RDEPENDS_${PN}_class-native = "" > > +do_install_append() { > +oe_multilib_header check_stdint.h > +} > + > BBCLASSEXTEND = "native nativesdk" I'd like to understand the difference between the different headers, do you have an example diff? Is there no way we can make them the same for the different multilibs? oe_multilib_header should only be used when there is no other way... The same applies to your other patches, an example of the differences in the headers would be useful for review please. Cheers, Richard -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/1] allarch: disable allarch when multilib is used
From: Kai Kang Some allarch packages rdepends non-allarch packages. When multilib is used, it doesn't expand the dependency chain correctly, e.g. core-image-sato -> ca-certificates(allarch) -> openssl we expect dependency chain for lib32-core-image-sato: lib32-core-image-sato -> ca-certificates(allarch) -> lib32-openssl it should install lib32-openssl for ca-certificates but openssl is still wrongly imported. Disable allarch when multilib is used. Signed-off-by: Kai Kang --- meta/classes/allarch.bbclass | 4 meta/classes/icecc.bbclass | 2 +- meta/classes/multilib.bbclass| 3 ++- meta/classes/multilib_global.bbclass | 4 +--- meta/classes/package.bbclass | 9 ++--- meta/classes/staging.bbclass | 2 +- 6 files changed, 15 insertions(+), 9 deletions(-) diff --git a/meta/classes/allarch.bbclass b/meta/classes/allarch.bbclass index 1eebe0bf2e..0622622d80 100644 --- a/meta/classes/allarch.bbclass +++ b/meta/classes/allarch.bbclass @@ -5,6 +5,10 @@ PACKAGE_ARCH = "all" python () { +# only enable allarch when multilib is not used +if not d.getVar("MULTILIB_VARIANTS"): +d.setVar("PACKAGE_ARCH", "all") + # Allow this class to be included but overridden - only set # the values if we're still "all" package arch. if d.getVar("PACKAGE_ARCH") == "all": diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass index 0ca8de86c2..b5a8457747 100644 --- a/meta/classes/icecc.bbclass +++ b/meta/classes/icecc.bbclass @@ -171,7 +171,7 @@ def use_icecc(bb,d): return "yes" def icecc_is_allarch(bb, d): -return d.getVar("PACKAGE_ARCH") == "all" or bb.data.inherits_class('allarch', d) +return d.getVar("PACKAGE_ARCH") == "all" def icecc_is_kernel(bb, d): return \ diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass index f2ac8bdfef..7b4d6472b0 100644 --- a/meta/classes/multilib.bbclass +++ b/meta/classes/multilib.bbclass @@ -50,7 +50,8 @@ python multilib_virtclass_handler () { if bb.data.inherits_class('nativesdk', e.data) or bb.data.inherits_class('crosssdk', e.data): raise bb.parse.SkipRecipe("We can't extend nativesdk recipes") -if bb.data.inherits_class('allarch', e.data) and not bb.data.inherits_class('packagegroup', e.data): +if bb.data.inherits_class('allarch', e.data) and not d.getVar('MULTILIB_VARIANTS') \ +and not bb.data.inherits_class('packagegroup', e.data): raise bb.parse.SkipRecipe("Don't extend allarch recipes which are not packagegroups") # Expand this since this won't work correctly once we set a multilib into place diff --git a/meta/classes/multilib_global.bbclass b/meta/classes/multilib_global.bbclass index d2ec1adfea..1bb62427b0 100644 --- a/meta/classes/multilib_global.bbclass +++ b/meta/classes/multilib_global.bbclass @@ -165,9 +165,7 @@ python multilib_virtclass_handler_global () { return if bb.data.inherits_class('kernel', e.data) or \ -bb.data.inherits_class('module-base', e.data) or \ -(bb.data.inherits_class('allarch', e.data) and\ - not bb.data.inherits_class('packagegroup', e.data)): +bb.data.inherits_class('module-base', e.data): variants = (e.data.getVar("MULTILIB_VARIANTS") or "").split() import oe.classextend diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 8459d39b27..f642a307c3 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -499,7 +499,8 @@ def get_package_mapping (pkg, basepkg, d): if key in data: # Have to avoid undoing the write_extra_pkgs(global_variants...) -if bb.data.inherits_class('allarch', d) and data[key] == basepkg: +if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \ +and data[key] == basepkg: return pkg return data[key] @@ -1410,7 +1411,8 @@ fi if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d): write_extra_pkgs(variants, pn, packages, pkgdatadir) -if (bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d)): +if bb.data.inherits_class('allarch', d) and not variants \ +and not bb.data.inherits_class('packagegroup', d): write_extra_pkgs(global_variants, pn, packages, pkgdatadir) workdir = d.getVar('WORKDIR') @@ -1499,7 +1501,8 @@ fi if bb.data.inherits_class('kernel', d) or bb.data.inherits_class('module-base', d): write_extra_runtime_pkgs(variants, packages, pkgdatadir) -if bb.data.inherits_class('allarch', d) and not bb.data.inherits_class('packagegroup', d): +if bb.data.inherits_class('allarch', d) and not d.getVar('MULTILIB_VARIANTS') \ +and not bb.data.inherits_class('packagegroup', d): write_extra_runtime_pkgs(global_variants, packages, pkgdatadir) } diff --git a/meta/cla
[OE-core] [PATCH 0/1] allarch: disable allarch when multilib is used
From: Kai Kang The following changes since commit da24071e92071ecbefe51314d82bf40f85172485: bitbake: toaster/orm/management/commands/lsupdates.py: Use new layerindexlib module (2018-08-02 10:18:27 +0100) are available in the Git repository at: git://git.pokylinux.org/poky-contrib kangkai/disable-allarch http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/disable-allarch Kai Kang (1): allarch: disable allarch when multilib is used meta/classes/allarch.bbclass | 4 meta/classes/icecc.bbclass | 2 +- meta/classes/multilib.bbclass| 3 ++- meta/classes/multilib_global.bbclass | 4 +--- meta/classes/package.bbclass | 9 ++--- meta/classes/staging.bbclass | 2 +- 6 files changed, 15 insertions(+), 9 deletions(-) -- 2.18.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] test-result-log: testcase management tool to store test result
Same codes were available in github with better viewing and reviewing. https://github.com/epyeoh/openembedded-core/tree/test-result-log/scripts/lib/testresultlog -Original Message- From: Yeoh, Ee Peng Sent: Friday, August 10, 2018 4:42 PM To: openembedded-core@lists.openembedded.org Cc: Eggleton, Paul ; Burton, Ross ; Mittal, Anuj ; Sangal, Apoorv ; richard.pur...@linuxfoundation.org Subject: RE: [PATCH] test-result-log: testcase management tool to store test result Hi Richard, Ross, Paul, Anuj, As per our conversation in the past, there was a need to provide alternative testcase management tool to Testopia in order to achieve our goals of: 1) To unblocked Bugzilla upgrade to a newer version in order to receive the improvement in WebServices, performance, and GUI. 2) To improve overall QA testing efficiency where it reduce maintenance cost when Testopia need to manually synchronize the test case content between Testopia and the available automated test cases inside OEQA, also it minimize test execution rerun where someone need to retrieve test failure log information from previous QA cycle (Testopia does not store test log due to its limitation on Testopia API for automation). To provide alternative testcase management tool to Testopia, here was the first batch of patch target to enable storing test result for OEQA automated testcase execution and view test summary report. There are another patch planned to enable manual test execution and store/view test result. With inputs from Paul and Anuj, I had refined this patches. Please review this and give me your inputs. Thank you very much for your attention and feedback! Best regards, Yeoh Ee Peng -Original Message- From: Yeoh, Ee Peng Sent: Friday, August 10, 2018 4:23 PM To: openembedded-core@lists.openembedded.org Cc: Yeoh, Ee Peng Subject: [PATCH] test-result-log: testcase management tool to store test result These scripts were developed as an alternative testcase management tool to Testopia. Using these scripts, user can store test result from OEQA automated testcase execution. These scripts will store test result & log in GIT repository. To use these scripts, first source oe environment, then run the entry point script to look for help information. $ test-result-log To store test result for OEQA automated testcase, execute the below $ test-result-log store-auto / Signed-off-by: Yeoh Ee Peng --- scripts/lib/testresultlog/gitstore.py | 250 ++ scripts/lib/testresultlog/oeqalogparser.py| 97 ++ scripts/lib/testresultlog/oeqatestdiscover.py | 51 ++ scripts/lib/testresultlog/storeauto.py| 125 + scripts/test-result-log | 106 +++ 5 files changed, 629 insertions(+) create mode 100644 scripts/lib/testresultlog/gitstore.py create mode 100644 scripts/lib/testresultlog/oeqalogparser.py create mode 100644 scripts/lib/testresultlog/oeqatestdiscover.py create mode 100644 scripts/lib/testresultlog/storeauto.py create mode 100755 scripts/test-result-log diff --git a/scripts/lib/testresultlog/gitstore.py b/scripts/lib/testresultlog/gitstore.py new file mode 100644 index 000..866d7d6 --- /dev/null +++ b/scripts/lib/testresultlog/gitstore.py @@ -0,0 +1,250 @@ +# test case management tool - store test result to git repository # # +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 tempfile +import os +import pathlib +import json +import subprocess +import shutil +import scriptpath +scriptpath.add_bitbake_lib_path() +scriptpath.add_oe_lib_path() +from oeqa.utils.git import GitRepo, GitError + +class GitStore(object): + +def __init__(self): +self.script_path = os.path.dirname(os.path.realpath(__file__)) +self.base_path = self.script_path + '/../../..' + +def _get_project_environment_directory_path(self, project_dir, test_environment_list): +project_env_dir = project_dir +for env in test_environment_list: +project_env_dir = os.path.join(project_env_dir, env) +return project_env_dir + +def _get_testmodule_list(self, testmodule_testsuite_dict): +return sorted(list(testmodule_testsuite_dict.keys())) + +def _get_testcase_list(self, testsuite_list, testsuite_testcase_dict): +testcase_list = [] +for testsuite in sorted(testsuite_list): +if testsuite in testsuite_testcase_dict: +for testcase in testsuite_testcase_dict[testsuite]: +
Re: [OE-core] [PATCH] test-result-log: testcase management tool to store test result
Hi Richard, Ross, Paul, Anuj, As per our conversation in the past, there was a need to provide alternative testcase management tool to Testopia in order to achieve our goals of: 1) To unblocked Bugzilla upgrade to a newer version in order to receive the improvement in WebServices, performance, and GUI. 2) To improve overall QA testing efficiency where it reduce maintenance cost when Testopia need to manually synchronize the test case content between Testopia and the available automated test cases inside OEQA, also it minimize test execution rerun where someone need to retrieve test failure log information from previous QA cycle (Testopia does not store test log due to its limitation on Testopia API for automation). To provide alternative testcase management tool to Testopia, here was the first batch of patch target to enable storing test result for OEQA automated testcase execution and view test summary report. There are another patch planned to enable manual test execution and store/view test result. With inputs from Paul and Anuj, I had refined this patches. Please review this and give me your inputs. Thank you very much for your attention and feedback! Best regards, Yeoh Ee Peng -Original Message- From: Yeoh, Ee Peng Sent: Friday, August 10, 2018 4:23 PM To: openembedded-core@lists.openembedded.org Cc: Yeoh, Ee Peng Subject: [PATCH] test-result-log: testcase management tool to store test result These scripts were developed as an alternative testcase management tool to Testopia. Using these scripts, user can store test result from OEQA automated testcase execution. These scripts will store test result & log in GIT repository. To use these scripts, first source oe environment, then run the entry point script to look for help information. $ test-result-log To store test result for OEQA automated testcase, execute the below $ test-result-log store-auto / Signed-off-by: Yeoh Ee Peng --- scripts/lib/testresultlog/gitstore.py | 250 ++ scripts/lib/testresultlog/oeqalogparser.py| 97 ++ scripts/lib/testresultlog/oeqatestdiscover.py | 51 ++ scripts/lib/testresultlog/storeauto.py| 125 + scripts/test-result-log | 106 +++ 5 files changed, 629 insertions(+) create mode 100644 scripts/lib/testresultlog/gitstore.py create mode 100644 scripts/lib/testresultlog/oeqalogparser.py create mode 100644 scripts/lib/testresultlog/oeqatestdiscover.py create mode 100644 scripts/lib/testresultlog/storeauto.py create mode 100755 scripts/test-result-log diff --git a/scripts/lib/testresultlog/gitstore.py b/scripts/lib/testresultlog/gitstore.py new file mode 100644 index 000..866d7d6 --- /dev/null +++ b/scripts/lib/testresultlog/gitstore.py @@ -0,0 +1,250 @@ +# test case management tool - store test result to git repository # # +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 tempfile +import os +import pathlib +import json +import subprocess +import shutil +import scriptpath +scriptpath.add_bitbake_lib_path() +scriptpath.add_oe_lib_path() +from oeqa.utils.git import GitRepo, GitError + +class GitStore(object): + +def __init__(self): +self.script_path = os.path.dirname(os.path.realpath(__file__)) +self.base_path = self.script_path + '/../../..' + +def _get_project_environment_directory_path(self, project_dir, test_environment_list): +project_env_dir = project_dir +for env in test_environment_list: +project_env_dir = os.path.join(project_env_dir, env) +return project_env_dir + +def _get_testmodule_list(self, testmodule_testsuite_dict): +return sorted(list(testmodule_testsuite_dict.keys())) + +def _get_testcase_list(self, testsuite_list, testsuite_testcase_dict): +testcase_list = [] +for testsuite in sorted(testsuite_list): +if testsuite in testsuite_testcase_dict: +for testcase in testsuite_testcase_dict[testsuite]: +testcase_list.append(testcase) +return testcase_list + +def _get_testcase_status(self, testcase, testcase_status_dict): +if testcase in testcase_status_dict: +return testcase_status_dict[testcase] +return "" + +def _create_testcase_dict(self, testcase_list, testcase_status_dict): +testcase_dict = {} +for testcase in sorted(testcase_list): +testcase_status = self._get_testcase_status(testcase,
[OE-core] [PATCH] test-result-log: testcase management tool to store test result
These scripts were developed as an alternative testcase management tool to Testopia. Using these scripts, user can store test result from OEQA automated testcase execution. These scripts will store test result & log in GIT repository. To use these scripts, first source oe environment, then run the entry point script to look for help information. $ test-result-log To store test result for OEQA automated testcase, execute the below $ test-result-log store-auto / Signed-off-by: Yeoh Ee Peng --- scripts/lib/testresultlog/gitstore.py | 250 ++ scripts/lib/testresultlog/oeqalogparser.py| 97 ++ scripts/lib/testresultlog/oeqatestdiscover.py | 51 ++ scripts/lib/testresultlog/storeauto.py| 125 + scripts/test-result-log | 106 +++ 5 files changed, 629 insertions(+) create mode 100644 scripts/lib/testresultlog/gitstore.py create mode 100644 scripts/lib/testresultlog/oeqalogparser.py create mode 100644 scripts/lib/testresultlog/oeqatestdiscover.py create mode 100644 scripts/lib/testresultlog/storeauto.py create mode 100755 scripts/test-result-log diff --git a/scripts/lib/testresultlog/gitstore.py b/scripts/lib/testresultlog/gitstore.py new file mode 100644 index 000..866d7d6 --- /dev/null +++ b/scripts/lib/testresultlog/gitstore.py @@ -0,0 +1,250 @@ +# test case management tool - store test result to git repository +# +# 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 tempfile +import os +import pathlib +import json +import subprocess +import shutil +import scriptpath +scriptpath.add_bitbake_lib_path() +scriptpath.add_oe_lib_path() +from oeqa.utils.git import GitRepo, GitError + +class GitStore(object): + +def __init__(self): +self.script_path = os.path.dirname(os.path.realpath(__file__)) +self.base_path = self.script_path + '/../../..' + +def _get_project_environment_directory_path(self, project_dir, test_environment_list): +project_env_dir = project_dir +for env in test_environment_list: +project_env_dir = os.path.join(project_env_dir, env) +return project_env_dir + +def _get_testmodule_list(self, testmodule_testsuite_dict): +return sorted(list(testmodule_testsuite_dict.keys())) + +def _get_testcase_list(self, testsuite_list, testsuite_testcase_dict): +testcase_list = [] +for testsuite in sorted(testsuite_list): +if testsuite in testsuite_testcase_dict: +for testcase in testsuite_testcase_dict[testsuite]: +testcase_list.append(testcase) +return testcase_list + +def _get_testcase_status(self, testcase, testcase_status_dict): +if testcase in testcase_status_dict: +return testcase_status_dict[testcase] +return "" + +def _create_testcase_dict(self, testcase_list, testcase_status_dict): +testcase_dict = {} +for testcase in sorted(testcase_list): +testcase_status = self._get_testcase_status(testcase, testcase_status_dict) +testcase_dict[testcase] = {"testresult": testcase_status,"bugs": ""} +return testcase_dict + +def _create_testsuite_testcase_teststatus_json_object(self, testsuite_list, testsuite_testcase_dict, testcase_status_dict): +json_object = {'testsuite':{}} +testsuite_dict = json_object['testsuite'] +for testsuite in sorted(testsuite_list): +testsuite_dict[testsuite] = {'testcase': {}} +testsuite_dict[testsuite]['testcase'] = self._create_testcase_dict(testsuite_testcase_dict[testsuite], testcase_status_dict) +return json_object + +def _create_testsuite_json_formatted_string(self, testsuite_list, testsuite_testcase_dict, testcase_status_dict): +testsuite_testcase_list = self._create_testsuite_testcase_teststatus_json_object(testsuite_list, testsuite_testcase_dict, testcase_status_dict) +return json.dumps(testsuite_testcase_list, sort_keys=True, indent=4) + +def _write_testsuite_testcase_json_formatted_string_to_file(self, file_path, file_content): +with open(file_path, 'w') as the_file: +the_file.write(file_content) + +def _write_log_file(self, file_path, logs): +with open(file_path, 'w') as the_file: +for line in logs: +the_file.write(line + '\n') + +def _write_test_log_files_for_list_of_testcase(self, file_dir, testcase_list, testcase_logs_dict): +
[OE-core] [PATCH 6/6] nss: fix multilib file conflict
Signed-off-by: Zhixiong Chi --- meta/recipes-support/nss/nss_3.38.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-support/nss/nss_3.38.bb b/meta/recipes-support/nss/nss_3.38.bb index f3e5170a89..4f53b55f05 100644 --- a/meta/recipes-support/nss/nss_3.38.bb +++ b/meta/recipes-support/nss/nss_3.38.bb @@ -33,7 +33,9 @@ SRC_URI[sha256sum] = "2c643d3c08d6935f4d325f40743719b6990aa25a79ec2f8f712c99d086 UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"; UPSTREAM_CHECK_REGEX = "NSS_(?P.+)_release_notes" -inherit siteinfo +inherit siteinfo multilib_script + +MULTILIB_SCRIPTS = "${PN}:${sysconfdir}/pki/nssdb/secmod.db ${PN}:${sysconfdir}/pki/nssdb/key3.db" DEPENDS = "sqlite3 nspr zlib nss-native" DEPENDS_class-native = "sqlite3-native nspr-native zlib-native" -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 5/6] mobile-broadband-provider-info: fix the script multilib conflict
Signed-off-by: Zhixiong Chi --- .../mobile-broadband-provider-info_git.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb b/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb index dbc578e2d8..1a39932ffc 100644 --- a/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb +++ b/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb @@ -10,4 +10,6 @@ PE = "1" SRC_URI = "git://git.gnome.org/mobile-broadband-provider-info" S = "${WORKDIR}/git" -inherit autotools +inherit autotools multilib_script + +MULTILIB_SCRIPTS = "${PN}-dev:${datadir}/pkgconfig/mobile-broadband-provider-info.pc" -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 4/6] libevent: fix the multilib header conflict
Signed-off-by: Zhixiong Chi --- meta/recipes-support/libevent/libevent_2.1.8.bb | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/recipes-support/libevent/libevent_2.1.8.bb b/meta/recipes-support/libevent/libevent_2.1.8.bb index 83ce4644cf..0f91e05a6c 100644 --- a/meta/recipes-support/libevent/libevent_2.1.8.bb +++ b/meta/recipes-support/libevent/libevent_2.1.8.bb @@ -28,12 +28,16 @@ inherit autotools # Needed for Debian packaging LEAD_SONAME = "libevent-2.1.so" -inherit ptest +inherit ptest multilib_header DEPENDS = "zlib" BBCLASSEXTEND = "native nativesdk" +do_install_append() { +oe_multilib_header event2/event-config.h +} + do_install_ptest() { install -d ${D}${PTEST_PATH}/test for file in ${B}/test/.libs/regress ${B}/test/.libs/test* -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/6] multilib-script: fix ALTERNATIVE_${PN} override issue
If multilib scripts are more than one file, the variable ALTERNATIVE_${PN} will be overrode. Finally, there will be only one symbol link file. Signed-off-by: Zhixiong Chi --- meta/classes/multilib_script.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/multilib_script.bbclass b/meta/classes/multilib_script.bbclass index a5a552b716..51c9fcc12c 100644 --- a/meta/classes/multilib_script.bbclass +++ b/meta/classes/multilib_script.bbclass @@ -25,7 +25,7 @@ python () { for entry in (d.getVar("MULTILIB_SCRIPTS", False) or "").split(): pkg, script = entry.split(":") scriptname = os.path.basename(script) - d.setVar("ALTERNATIVE_" + pkg, scriptname) + d.appendVar("ALTERNATIVE_" + pkg, scriptname + " ") d.setVarFlag("ALTERNATIVE_LINK_NAME", scriptname, script) d.setVarFlag("ALTERNATIVE_TARGET", scriptname, script + "-${MULTILIB_SUFFIX}") d.appendVar("multilibscript_rename", "\n mv ${PKGD}" + script + " ${PKGD}" + script + "-${MULTILIB_SUFFIX}") -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 3/6] nspr: fix script conflict for multilib
Stop the nspr-config scripts conflicting in a multilib case. Signed-off-by: Zhixiong Chi --- meta/recipes-support/nspr/nspr_4.19.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-support/nspr/nspr_4.19.bb b/meta/recipes-support/nspr/nspr_4.19.bb index b43c78081d..b5264be2a0 100644 --- a/meta/recipes-support/nspr/nspr_4.19.bb +++ b/meta/recipes-support/nspr/nspr_4.19.bb @@ -149,7 +149,9 @@ TESTS = " \ xnotify \ zerolen" -inherit autotools +inherit autotools multilib_script + +MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/nspr-config" PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/6] libcheck: fix the multilib header conflict
Signed-off-by: Zhixiong Chi --- meta/recipes-support/libcheck/libcheck_0.12.0.bb | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/recipes-support/libcheck/libcheck_0.12.0.bb b/meta/recipes-support/libcheck/libcheck_0.12.0.bb index e646d43968..cb97201580 100644 --- a/meta/recipes-support/libcheck/libcheck_0.12.0.bb +++ b/meta/recipes-support/libcheck/libcheck_0.12.0.bb @@ -12,7 +12,7 @@ UPSTREAM_CHECK_URI = "https://github.com/libcheck/check/releases/"; S = "${WORKDIR}/check-${PV}" -inherit autotools pkgconfig texinfo +inherit autotools pkgconfig texinfo multilib_header CACHED_CONFIGUREVARS += "ac_cv_path_AWK_PATH=${bindir}/gawk" @@ -20,4 +20,8 @@ RREPLACES_${PN} = "check (<= 0.9.5)" RDEPENDS_${PN} += "gawk" RDEPENDS_${PN}_class-native = "" +do_install_append() { +oe_multilib_header check_stdint.h +} + BBCLASSEXTEND = "native nativesdk" -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core