Re: [OE-core] devshell problems after distro upgrade openSUSE Leap 42.3 -> 15.0 (tmux only)
On 04.07.2018 13:37, Steffen Sledz wrote: > On 03.07.2018 08:04, Steffen Sledz wrote: >> On 02.07.2018 20:25, Khem Raj wrote: >>> On Sun, Jul 1, 2018 at 11:39 PM Steffen Sledz wrote: After upgrading my build system from openSUSE Leap 42.3 to openSUSE Leap 15.0 a bitbake foo -c devshell no longer switches to the related work directory. The devshell is opened in the original directory without any error or warning instead. Any hints what's wrong here or how I can debug this behaviour? >>> >>> which terminal are you using, probably some default behavior changes there ? >> >> Main terminal is xterm. No special settings for the devshell terminal, so >> tmux is started like before. > > > After some more tests I can limit the problem to OE_TERMINAL="tmux". Other > terminals like screen or xterm work well. > ... Ping! -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/3] systemd-boot: upgrade to 239
Upgrade systemd-boot to 239. The following patch is removed due to recent fix about meson's cpu family mapping and validation. 0001-Also-check-i386-i586-and-i686-for-ia32.patch Signed-off-by: Chen Qi --- .../{systemd-boot_237.bb => systemd-boot_239.bb} | 5 ++-- ...01-Also-check-i386-i586-and-i686-for-ia32.patch | 28 -- 2 files changed, 2 insertions(+), 31 deletions(-) rename meta/recipes-core/systemd/{systemd-boot_237.bb => systemd-boot_239.bb} (91%) delete mode 100644 meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch diff --git a/meta/recipes-core/systemd/systemd-boot_237.bb b/meta/recipes-core/systemd/systemd-boot_239.bb similarity index 91% rename from meta/recipes-core/systemd/systemd-boot_237.bb rename to meta/recipes-core/systemd/systemd-boot_239.bb index afd3848..7fe420c 100644 --- a/meta/recipes-core/systemd/systemd-boot_237.bb +++ b/meta/recipes-core/systemd/systemd-boot_239.bb @@ -3,9 +3,8 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemd:" DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native" -SRC_URI += "file://0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \ -file://0027-remove-nobody-user-group-checking.patch \ -file://0001-Also-check-i386-i586-and-i686-for-ia32.patch \ +SRC_URI += "file://0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \ +file://0006-remove-nobody-user-group-checking.patch \ file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \ " diff --git a/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch b/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch deleted file mode 100644 index 877bb1c..000 --- a/meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3e8c19bb1bbc4493c591f75c00c1fefe3b1c8a69 Mon Sep 17 00:00:00 2001 -From: Chen Qi -Date: Tue, 27 Feb 2018 20:42:41 -0800 -Subject: [PATCH] Also check i386, i586 and i686 for ia32 - -Upstream-Status: Pending - -Signed-off-by: Chen Qi - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 28cb8b60e..489531a43 100644 a/meson.build -+++ b/meson.build -@@ -1217,7 +1217,7 @@ conf.set10('SYSTEMD_SLOW_TESTS_DEFAULT', slow_tests) - if get_option('efi') - efi_arch = host_machine.cpu_family() - --if efi_arch == 'x86' -+if efi_arch == 'x86' or efi_arch == 'i386' or efi_arch == 'i586' or efi_arch == 'i686' - EFI_MACHINE_TYPE_NAME = 'ia32' - gnu_efi_arch = 'ia32' - elif efi_arch == 'x86_64' --- -2.13.0 - -- 1.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 3/3] oeqa/runtime/cases/rpm.py: workaround race condition
With the recent change in new systemd version, it's possible that a user is deleted before stopping user-runtime-dir@xxx.service. See link below. https://github.com/systemd/systemd/issues/9541 Workaround this issue by delay for 1 second before deleting user. Signed-off-by: Chen Qi --- meta/lib/oeqa/runtime/cases/rpm.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/meta/lib/oeqa/runtime/cases/rpm.py b/meta/lib/oeqa/runtime/cases/rpm.py index 1e5e463..2f9dcad 100644 --- a/meta/lib/oeqa/runtime/cases/rpm.py +++ b/meta/lib/oeqa/runtime/cases/rpm.py @@ -87,6 +87,12 @@ class RpmInstallRemoveTest(OERuntimeTestCase): self.assertEqual(status, 0, msg=msg) def unset_up_test_user(u): +# Due to recent change in systemd, we need to sleep for a while +# to avoid unexpected failure of user-runtime-dir@1000.service +# See https://github.com/systemd/systemd/issues/9541 +if self.tc.td.get('VIRTUAL-RUNTIME_init_manager') == 'systemd': +self.target.run('sleep 1') + status, output = self.target.run('userdel -r %s' % u) msg = 'Failed to erase user: %s' % output self.assertTrue(status == 0, msg=msg) -- 1.9.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH V5 0/3] upgrade systemd and systemd-boot to 239
Changes in V5: * Add to ${PN}-container ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf to avoid QA issue Changes in V4: * Squash fixes into the upgrade patch Changes in V3: * Change SRC_URI back to include musl patches unconditionally Changes in V2: * Update commit message to detail why dropping 0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch * Remove -Dfirmware-path option * Fix segment fault in case of musl * Workaround race condition in rpm.py test case The following changes since commit e6f7c57b556cad467ff014f29bc9ceb26146a22c: oeqa/selftest/systemd_boot: Never use cleansstate in QA tests without special handling of SSTATE_DIR (2018-07-15 16:19:05 +0100) are available in the git repository at: git://git.pokylinux.org/poky-contrib ChenQi/systemd-239 http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/systemd-239 Chen Qi (3): systemd: upgrade to 239 systemd-boot: upgrade to 239 oeqa/runtime/cases/rpm.py: workaround race condition meta/lib/oeqa/runtime/cases/rpm.py | 6 + .../{systemd-boot_237.bb => systemd-boot_239.bb} | 5 +- meta/recipes-core/systemd/systemd.inc | 2 +- ...01-Also-check-i386-i586-and-i686-for-ia32.patch | 28 -- ...rt_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch | 34 -- ...ck-protector-flags-to-workaround-musl-bui.patch | 28 +- ...nv-when-secure-versions-are-not-available.patch | 10 +- ...-install-dependency-links-at-install-tim.patch} | 22 +- c-Change-the-default-device-timeout-to-2.patch | 19 +- ...=> 0002-don-t-use-glibc-specific-qsort_r.patch} | 108 +- ...per-instead-of-looking-for-relative-opti.patch} | 16 +- ...n_t-is-glibc-specific-use-raw-signature-.patch} | 25 +- ...003-implment-systemd-sysv-install-for-OE.patch} | 10 +- ...lback-parse_printf_format-implementation.patch} | 49 +-- ...patch => 0004-rules-whitelist-hd-devices.patch} | 8 +- ...-Make-root-s-home-directory-configurable.patch} | 34 +- ...clude-gshadow-only-if-ENABLE_GSHADOW-is-1.patch | 29 ++ ...> 0006-remove-nobody-user-group-checking.patch} | 40 +-- ...sic-missing.h-check-for-missing-strndupa.patch} | 66 ++-- ...patch => 0007-Include-netinet-if_ether.h.patch} | 51 +-- ...evert-rules-remove-firmware-loading-rules.patch | 28 -- ...es-watch-metadata-changes-in-ide-devices.patch} | 6 +- ...e-nss-tests-if-nss-systemd-is-not-enable.patch} | 16 +- ...-remove-userspace-firmware-loading-suppor.patch | 377 - ...f-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch} | 86 +++-- ...=> 0009-add-missing-FTW_-macros-for-musl.patch} | 12 +- ...es-Build-conditionally-when-ENABLE_MYHOS.patch} | 10 +- .../0009-remove-duplicate-include-uchar.h.patch| 41 --- .../0010-check-for-uchar.h-in-meson.build.patch| 45 --- ...l-don-t-fail-if-libc-doesn-t-support-IDN.patch} | 17 +- ...ssing.h-check-for-missing-__compar_fn_t-.patch} | 23 +- ...of-__register_atfork-for-non-glibc-build.patch} | 18 +- ...> 0013-Use-uintmax_t-for-handling-rlim_t.patch} | 33 +- ...ULONG_LONG_MAX-definition-in-case-of-mus.patch} | 12 +- ...xdecoct.c-Include-missing.h-for-strndupa.patch} | 12 +- ...c-Disable-tests-for-missing-typedefs-in-.patch} | 14 +- ...ss-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch} | 20 +- ...-compatible-basename-for-non-glibc-syste.patch} | 11 +- ...-check-for-missing-canonicalize_file_name.patch | 47 --- ...ble-buffering-when-writing-to-oom_score_a.patch | 39 +++ ...-XSI-compliant-strerror_r-from-GNU-specif.patch | 62 ...PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch | 43 --- meta/recipes-core/systemd/systemd/0032-memfd.patch | 272 --- ...cros-rename-noreturn-into-_noreturn_-8456.patch | 203 --- ...truncation-compile-failure-by-typecasting.patch | 173 -- ...ix-build-with-gcc8-Werror-format-truncati.patch | 53 --- meta/recipes-core/systemd/systemd/libmount.patch | 75 .../systemd/{systemd_237.bb => systemd_239.bb} | 125 +++ 48 files changed, 630 insertions(+), 1833 deletions(-) rename meta/recipes-core/systemd/{systemd-boot_237.bb => systemd-boot_239.bb} (91%) delete mode 100644 meta/recipes-core/systemd/systemd/0001-Also-check-i386-i586-and-i686-for-ia32.patch delete mode 100644 meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch rename meta/recipes-core/systemd/systemd/{0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch => 0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch} (83%) rename meta/recipes-core/systemd/systemd/{0022-don-t-use-glibc-specific-qsort_r.patch => 0002-don-t-use-glibc-specific-qsort_r.patch} (52%) rename meta/recipes-core/systemd/systemd/{0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch => 0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch} (83%) rename meta/recipes-core/systemd/systemd/{0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch => 0003-c
[OE-core] [PATCH] bash: fix wrong exit status offset
In Linux,8 bits of the return code and 8 bits of the number of the killing signal are mixed into a single value on the exit code, so the exit status offset should be 8. But the autoconf checker can not determine it while cross compiling, and then it is set to the default value 0, which will cause generating the wrong exit code if program exit with an error code. Signed-off-by: Rui Wang --- meta/recipes-extended/bash/bash.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc index f4e1f7a11f..ada9f51ca2 100644 --- a/meta/recipes-extended/bash/bash.inc +++ b/meta/recipes-extended/bash/bash.inc @@ -7,7 +7,7 @@ DEPENDS = "ncurses bison-native virtual/libiconv" inherit autotools gettext texinfo update-alternatives ptest EXTRA_AUTORECONF += "--exclude=autoheader --exclude=aclocal" -EXTRA_OECONF = "--enable-job-control --without-bash-malloc" +EXTRA_OECONF = "--enable-job-control --without-bash-malloc bash_cv_wexitstatus_offset=8" # If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the # startup files, even if they are not interactive. -- 2.13.3 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 3/3] meson: Add risc-v to known architectures
Signed-off-by: Khem Raj --- meta/recipes-devtools/meson/meson.inc | 1 + ...nbuild-Recognise-risc-v-architecture.patch | 27 +++ 2 files changed, 28 insertions(+) create mode 100644 meta/recipes-devtools/meson/meson/0001-mesonbuild-Recognise-risc-v-architecture.patch diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc index b278d33b72..a650469e93 100644 --- a/meta/recipes-devtools/meson/meson.inc +++ b/meta/recipes-devtools/meson/meson.inc @@ -12,6 +12,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P file://0004-Prettifying-some-output-with-pathlib.patch \ file://0005-Set-the-meson-command-to-use-when-we-know-what-it-is.patch \ file://validate-cpu.patch \ + file://0001-mesonbuild-Recognise-risc-v-architecture.patch \ " SRC_URI[md5sum] = "1698f6526574839de5dcdc45e3f7d582" diff --git a/meta/recipes-devtools/meson/meson/0001-mesonbuild-Recognise-risc-v-architecture.patch b/meta/recipes-devtools/meson/meson/0001-mesonbuild-Recognise-risc-v-architecture.patch new file mode 100644 index 00..5abf3642f3 --- /dev/null +++ b/meta/recipes-devtools/meson/meson/0001-mesonbuild-Recognise-risc-v-architecture.patch @@ -0,0 +1,27 @@ +From 85bb96909d2024769d8e758538a7e8e2004dbb4d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 14 Jul 2018 13:03:39 -0700 +Subject: [PATCH] mesonbuild: Recognise risc-v architecture + +Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/3889] +Signed-off-by: Khem Raj +--- + mesonbuild/environment.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py +index a0580a21..b2041424 100644 +--- a/mesonbuild/environment.py b/mesonbuild/environment.py +@@ -83,6 +83,8 @@ known_cpu_families = ( + 'ppc', + 'ppc64', + 'ppc64le', ++'riscv32', ++'riscv64', + 'sparc64', + 'x86', + 'x86_64' +-- +2.18.0 + -- 2.18.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 2/3] packagegroups: Disable unbuildable dependencies for riscv64
This helps with cleaner world build parsing logs Signed-off-by: Khem Raj --- .../packagegroups/packagegroup-core-tools-profile.bb | 3 +++ .../packagegroups/packagegroup-core-tools-testapps.bb | 1 + meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb | 2 ++ 3 files changed, 6 insertions(+) diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb index 5d2b4c8181..520d907714 100644 --- a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb @@ -33,6 +33,7 @@ PERF_libc-musl = "" SYSTEMTAP = "systemtap" SYSTEMTAP_libc-musl = "" SYSTEMTAP_nios2 = "" +SYSTEMTAP_riscv64 = "" # lttng-ust uses sched_getcpu() which is not there on for some platforms. LTTNGUST = "lttng-ust" @@ -44,6 +45,7 @@ LTTNGTOOLS_libc-musl = "" LTTNGTOOLS_riscv64 = "" LTTNGMODULES = "lttng-modules" +LTTNGMODULES_riscv64 = "" BABELTRACE = "babeltrace" @@ -58,6 +60,7 @@ VALGRIND_armv5 = "" VALGRIND_armv6 = "" VALGRIND_armeb = "" VALGRIND_aarch64 = "" +VALGRIND_riscv64 = "" VALGRIND_linux-gnux32 = "" RDEPENDS_${PN} = "\ diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb index df43068fe5..a35f15e6ce 100644 --- a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb +++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb @@ -15,6 +15,7 @@ KEXECTOOLS ?= "kexec" KEXECTOOLS_e5500-64b ?= "" KEXECTOOLS_microblaze ?= "" KEXECTOOLS_nios2 ?= "" +KEXECTOOLS_riscv64 ?= "" X11GLTOOLS = "\ mesa-demos \ diff --git a/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb b/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb index 7d2ccbda22..5afb490aac 100644 --- a/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb +++ b/meta/recipes-core/packagegroups/packagegroup-go-sdk-target.bb @@ -7,3 +7,5 @@ RDEPENDS_${PN} = " \ go-runtime-dev \ go-runtime-staticdev \ " + +COMPATIBLE_HOST = "^(?!riscv64).*" -- 2.18.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/3] mesa: Fix build with wayland and egl
When wayland and egl both are on then it enables the wayland plugin which actually fails to build because its not finding wayland-protocol xml templates in proper location which is recipe sysroot since we are cross compiling Fixes build errors e.g. make[4]: *** No rule to make target `//usr/share/wayland-protocols/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml', needed by `drivers/dri2/linux-dmabuf-unstable-v1-client-protocol.h'. Stop. make[4]: *** Waiting for unfinished jobs Signed-off-by: Khem Raj --- ...ss-compile-WAYLAND_PROTOCOLS_DATADIR.patch | 24 +++ meta/recipes-graphics/mesa/mesa.inc | 2 ++ meta/recipes-graphics/mesa/mesa_18.1.3.bb | 1 + 3 files changed, 27 insertions(+) create mode 100644 meta/recipes-graphics/mesa/files/cross-compile-WAYLAND_PROTOCOLS_DATADIR.patch diff --git a/meta/recipes-graphics/mesa/files/cross-compile-WAYLAND_PROTOCOLS_DATADIR.patch b/meta/recipes-graphics/mesa/files/cross-compile-WAYLAND_PROTOCOLS_DATADIR.patch new file mode 100644 index 00..b4e3c4995f --- /dev/null +++ b/meta/recipes-graphics/mesa/files/cross-compile-WAYLAND_PROTOCOLS_DATADIR.patch @@ -0,0 +1,24 @@ +use PKG_CHECK_VAR for defining WAYLAND_PROTOCOLS_DATADIR + +This allows to override the wayland-protocols pkgdatadir with the +WAYLAND_PROTOCOLS_DATADIR from environment. + +pkgconfig would return an absolute path in /usr/share/wayland-protocols +for the pkgdatadir value, which is not suitable for cross-compiling. + +Signed-off-by: Khem Raj +Upstream-Status: Pending + +Index: mesa-18.1.2/configure.ac +=== +--- mesa-18.1.2.orig/configure.ac mesa-18.1.2/configure.ac +@@ -1808,7 +1808,7 @@ for plat in $platforms; do + PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= $WAYLAND_REQUIRED]) + PKG_CHECK_MODULES([WAYLAND_SERVER], [wayland-server >= $WAYLAND_REQUIRED]) + PKG_CHECK_MODULES([WAYLAND_PROTOCOLS], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED]) +-WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols` ++PKG_CHECK_VAR([WAYLAND_PROTOCOLS_DATADIR], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], pkgdatadir) + + AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:]) + diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 6d61e09bc5..860a2d94cc 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -110,6 +110,8 @@ FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS" +EXTRA_OEMAKE += "WAYLAND_PROTOCOLS_DATADIR=${STAGING_DATADIR}/wayland-protocols" + # Remove the mesa dependency on mesa-dev, as mesa is empty RDEPENDS_${PN}-dev = "" diff --git a/meta/recipes-graphics/mesa/mesa_18.1.3.bb b/meta/recipes-graphics/mesa/mesa_18.1.3.bb index 1c76f4b1b1..d72f5d0b6d 100644 --- a/meta/recipes-graphics/mesa/mesa_18.1.3.bb +++ b/meta/recipes-graphics/mesa/mesa_18.1.3.bb @@ -8,6 +8,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ file://0006-Use-Python-3-to-execute-the-scripts.patch \ file://0007-dri-i965-Add-missing-time.h-include.patch \ file://0008-egl-fix-build-race-in-automake.patch \ + file://cross-compile-WAYLAND_PROTOCOLS_DATADIR.patch \ " SRC_URI[md5sum] = "b34273403a605f6f98ead00f0bdf8e0b" -- 2.18.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 11/12] oeqa/sdkbuildproject: Capture output to quieten selftest logs
Only show the output in the failure case. Signed-off-by: Richard Purdie --- meta/lib/oeqa/sdk/utils/sdkbuildproject.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py index 4e251142d7c..0519911e8f4 100644 --- a/meta/lib/oeqa/sdk/utils/sdkbuildproject.py +++ b/meta/lib/oeqa/sdk/utils/sdkbuildproject.py @@ -42,4 +42,9 @@ class SDKBuildProject(BuildProject): def _run(self, cmd): self.log("Running . %s; " % self.sdkenv + cmd) -return subprocess.call(". %s; " % self.sdkenv + cmd, shell=True) +try: +output = subprocess.check_output(". %s; " % self.sdkenv + cmd, shell=True, stderr=subprocess.STDOUT) +except subprocess.CalledProcessError as exc: +print(exc.output.decode('utf-8')) +return exc.returncode +return 0 -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 10/12] devtool: Split tests into multiple classes
This allows better parallelism between the different tests as currently this block takes the longest time to execute. devtool tests are still all grouped into the "devtool" module for ease of exection. This also makes it easier to execute some subset of devtool tests for testing devtool changes. Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/devtool.py | 113 +--- 1 file changed, 61 insertions(+), 52 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index f2b0f596771..43a66c8e283 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -13,6 +13,58 @@ from oeqa.core.decorator.oeid import OETestID class DevtoolBase(OESelftestTestCase): +@classmethod +def setUpClass(cls): +super(DevtoolBase, cls).setUpClass() +bb_vars = get_bb_vars(['TOPDIR', 'SSTATE_DIR']) +cls.original_sstate = bb_vars['SSTATE_DIR'] +cls.devtool_sstate = os.path.join(bb_vars['TOPDIR'], 'sstate_devtool') +cls.sstate_conf = 'SSTATE_DIR = "%s"\n' % cls.devtool_sstate +cls.sstate_conf += ('SSTATE_MIRRORS += "file://.* file:///%s/PATH"\n' +% cls.original_sstate) + +@classmethod +def tearDownClass(cls): +cls.logger.debug('Deleting devtool sstate cache on %s' % cls.devtool_sstate) +runCmd('rm -rf %s' % cls.devtool_sstate) +super(DevtoolBase, cls).tearDownClass() + +def setUp(self): +"""Test case setup function""" +super(DevtoolBase, self).setUp() +self.workspacedir = os.path.join(self.builddir, 'workspace') +self.assertTrue(not os.path.exists(self.workspacedir), +'This test cannot be run with a workspace directory ' +'under the build directory') +self.append_config(self.sstate_conf) + +def _check_src_repo(self, repo_dir): +"""Check srctree git repository""" +self.assertTrue(os.path.isdir(os.path.join(repo_dir, '.git')), +'git repository for external source tree not found') +result = runCmd('git status --porcelain', cwd=repo_dir) +self.assertEqual(result.output.strip(), "", + 'Created git repo is not clean') +result = runCmd('git symbolic-ref HEAD', cwd=repo_dir) +self.assertEqual(result.output.strip(), "refs/heads/devtool", + 'Wrong branch in git repo') + +def _check_repo_status(self, repo_dir, expected_status): +"""Check the worktree status of a repository""" +result = runCmd('git status . --porcelain', +cwd=repo_dir) +for line in result.output.splitlines(): +for ind, (f_status, fn_re) in enumerate(expected_status): +if re.match(fn_re, line[3:]): +if f_status != line[:2]: +self.fail('Unexpected status in line: %s' % line) +expected_status.pop(ind) +break +else: +self.fail('Unexpected modified file in line: %s' % line) +if expected_status: +self.fail('Missing file changes: %s' % expected_status) + def _test_recipe_contents(self, recipefile, checkvars, checkinherits): with open(recipefile, 'r') as f: invar = None @@ -116,58 +168,6 @@ class DevtoolBase(OESelftestTestCase): class DevtoolTests(DevtoolBase): -@classmethod -def setUpClass(cls): -super(DevtoolTests, cls).setUpClass() -bb_vars = get_bb_vars(['TOPDIR', 'SSTATE_DIR']) -cls.original_sstate = bb_vars['SSTATE_DIR'] -cls.devtool_sstate = os.path.join(bb_vars['TOPDIR'], 'sstate_devtool') -cls.sstate_conf = 'SSTATE_DIR = "%s"\n' % cls.devtool_sstate -cls.sstate_conf += ('SSTATE_MIRRORS += "file://.* file:///%s/PATH"\n' -% cls.original_sstate) - -@classmethod -def tearDownClass(cls): -cls.logger.debug('Deleting devtool sstate cache on %s' % cls.devtool_sstate) -runCmd('rm -rf %s' % cls.devtool_sstate) -super(DevtoolTests, cls).tearDownClass() - -def setUp(self): -"""Test case setup function""" -super(DevtoolTests, self).setUp() -self.workspacedir = os.path.join(self.builddir, 'workspace') -self.assertTrue(not os.path.exists(self.workspacedir), -'This test cannot be run with a workspace directory ' -'under the build directory') -self.append_config(self.sstate_conf) - -def _check_src_repo(self, repo_dir): -"""Check srctree git repository""" -self.assertTrue(os.path.isdir(os.path.join(repo_dir, '.git')), -'git repository for external source tree not found') -result = runCmd('git status --porcelain', cwd=repo_dir) -self.a
[OE-core] [PATCH 05/12] oeqa/selftest/package: Use setUpLocal, not setUp
The main setUp function needs to be called and tests are meant to define setUpLocal. For some reason this one didn't leading to errors with recent code changes. Fix it. Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/package.py b/meta/lib/oeqa/selftest/cases/package.py index 169698f780d..ef6eabef665 100644 --- a/meta/lib/oeqa/selftest/cases/package.py +++ b/meta/lib/oeqa/selftest/cases/package.py @@ -29,7 +29,7 @@ class VersionOrdering(OESelftestTestCase): cls.bindir = oe.path.join(cls.staging, vars["bindir_native"]) cls.libdir = oe.path.join(cls.staging, vars["libdir_native"]) -def setUp(self): +def setUpLocal(self): # Just for convenience self.staging = type(self).staging self.bindir = type(self).bindir -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 12/12] oeqa/selftest/wic: Split tests into two class groups
This improves test parallelism. Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/wic.py | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 2771af63674..ba4d3be7a86 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -61,7 +61,7 @@ def only_for_arch(archs, image='core-image-minimal'): return wrapper -class Wic(OESelftestTestCase): +class WicTestCase(OESelftestTestCase): """Wic test class.""" image_is_ready = False @@ -71,7 +71,7 @@ class Wic(OESelftestTestCase): def setUpLocal(self): """This code is executed before each test method.""" self.resultdir = self.builddir + "/wic-tmp/" -super(Wic, self).setUpLocal() +super(WicTestCase, self).setUpLocal() if not self.native_sysroot: Wic.native_sysroot = get_bb_var('STAGING_DIR_NATIVE', 'wic-tools') @@ -92,7 +92,9 @@ class Wic(OESelftestTestCase): def tearDownLocal(self): """Remove resultdir as it may contain images.""" rmtree(self.resultdir, ignore_errors=True) -super(Wic, self).tearDownLocal() +super(WicTestCase, self).tearDownLocal() + +class Wic(WicTestCase): @OETestID(1552) def test_version(self): @@ -522,6 +524,8 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r % (wks_file, self.resultdir), ignore_status=True).status) os.remove(wks_file) +class Wic2(WicTestCase): + @OETestID(1496) def test_bmap_short(self): """Test generation of .bmap file -m option""" @@ -679,7 +683,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r Test creation of a simple image with partition size controlled through --fixed-size flag """ -wkspath, wksname = Wic._make_fixed_size_wks(200) +wkspath, wksname = Wic2._make_fixed_size_wks(200) self.assertEqual(0, runCmd("wic create %s -e core-image-minimal -o %s" \ % (wkspath, self.resultdir)).status) @@ -711,7 +715,7 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r --fixed-size flag. The size of partition is intentionally set to 1MiB in order to trigger an error in wic. """ -wkspath, wksname = Wic._make_fixed_size_wks(1) +wkspath, wksname = Wic2._make_fixed_size_wks(1) self.assertEqual(1, runCmd("wic create %s -e core-image-minimal -o %s" \ % (wkspath, self.resultdir), ignore_status=True).status) -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 08/12] oeqa/selftest/wic: Ensure initramfs exists for test_iso_image
AssertionError: Command 'wic create mkhybridiso --image-name core-image-minimal -o /var/tmp/wic.oe-selftest/' returned non-zero exit status 1: ERROR: _exec_cmd: gzip -f -9 -c /var/tmp/wic.oe-selftest/tmp.wic.drhn6edm/initrd.cpio > /var/tmp/wic.oe-selftest/tmp.wic.drhn6edm/initrd.cpio.gz returned '1' instead of 0 output: gzip: /var/tmp/wic.oe-selftest/tmp.wic.drhn6edm/initrd.cpio: No such file or directory This is because in a clean build directory, the initramfs may not be rebuilt. Add a call to ensure it is built to avoid the error. Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/wic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 5302e47da1a..2771af63674 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -191,7 +191,7 @@ class Wic(OESelftestTestCase): 'MACHINE_FEATURES_append = " efi"\n'\ 'DEPENDS_pn-core-image-minimal += "syslinux"\n' self.append_config(config) -bitbake('core-image-minimal') +bitbake('core-image-minimal core-image-minimal-initramfs') self.remove_config(config) cmd = "wic create mkhybridiso --image-name core-image-minimal -o %s" % self.resultdir self.assertEqual(0, runCmd(cmd).status) -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 09/12] oeqa: Default to buffer mode for tests
Currently some tests run in buffer mode and some don't. Those that don't can corrupt stdout/stderr. Switch to using buffer mode everywhere so we're consistent. If there is useful output on stdout/stderr, it will be displayed if the test fails. Signed-off-by: Richard Purdie --- meta/lib/oeqa/core/context.py| 2 +- meta/lib/oeqa/core/runner.py | 5 - meta/lib/oeqa/selftest/cases/devtool.py | 2 -- meta/lib/oeqa/selftest/cases/efibootpartition.py | 1 - meta/lib/oeqa/selftest/cases/imagefeatures.py| 2 -- meta/lib/oeqa/selftest/cases/runqemu.py | 2 -- 6 files changed, 1 insertion(+), 13 deletions(-) diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py index acd547416f9..10481b44b61 100644 --- a/meta/lib/oeqa/core/context.py +++ b/meta/lib/oeqa/core/context.py @@ -59,7 +59,7 @@ class OETestContext(object): self.suites = self.loader.discover() def runTests(self, skips=[]): -self.runner = self.runnerClass(self, descriptions=False, verbosity=2) +self.runner = self.runnerClass(self, descriptions=False, verbosity=2, buffer=True) # Dinamically skip those tests specified though arguments self.skipTests(skips) diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py index 374d30cc38d..219102c6b0f 100644 --- a/meta/lib/oeqa/core/runner.py +++ b/meta/lib/oeqa/core/runner.py @@ -48,11 +48,6 @@ class OETestResult(_TestResult): self._tc_map_results() def startTest(self, test): -# Allow us to trigger the testcase buffer mode on a per test basis -# so stdout/stderr are only printed upon failure. Enables debugging -# but clean output -if hasattr(test, "buffer"): -self.buffer = test.buffer super(OETestResult, self).startTest(test) def _tc_map_results(self): diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index 723d8e19cfd..f2b0f596771 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -13,8 +13,6 @@ from oeqa.core.decorator.oeid import OETestID class DevtoolBase(OESelftestTestCase): -buffer = True - def _test_recipe_contents(self, recipefile, checkvars, checkinherits): with open(recipefile, 'r') as f: invar = None diff --git a/meta/lib/oeqa/selftest/cases/efibootpartition.py b/meta/lib/oeqa/selftest/cases/efibootpartition.py index 0c832566965..c6f39d5b162 100644 --- a/meta/lib/oeqa/selftest/cases/efibootpartition.py +++ b/meta/lib/oeqa/selftest/cases/efibootpartition.py @@ -11,7 +11,6 @@ from oeqa.utils.commands import bitbake, runqemu, get_bb_var class GenericEFITest(OESelftestTestCase): """EFI booting test class""" -buffer = True cmd_common = "runqemu nographic serial wic ovmf" efi_provider = "systemd-boot" image = "core-image-minimal" diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py index b60ab8ae7e1..8c95432e00b 100644 --- a/meta/lib/oeqa/selftest/cases/imagefeatures.py +++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py @@ -10,8 +10,6 @@ class ImageFeatures(OESelftestTestCase): test_user = 'tester' root_user = 'root' -buffer = True - @OETestID(1107) def test_non_root_user_can_connect_via_ssh_without_password(self): """ diff --git a/meta/lib/oeqa/selftest/cases/runqemu.py b/meta/lib/oeqa/selftest/cases/runqemu.py index 5ebdd57a41e..e57f503a577 100644 --- a/meta/lib/oeqa/selftest/cases/runqemu.py +++ b/meta/lib/oeqa/selftest/cases/runqemu.py @@ -14,8 +14,6 @@ class RunqemuTests(OESelftestTestCase): image_is_ready = False deploy_dir_image = '' -# We only want to print runqemu stdout/stderr if there is a test case failure -buffer = True def setUpLocal(self): super(RunqemuTests, self).setUpLocal() -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 06/12] oeqa/selftest/devtool: Ensure dbus is built befoe running test
If dbus isn't build first the dbus dependency of dbus-wait can't be detected through pkgconfig and the test fails: AssertionError: {'DEPENDS': {'dbus'}} != {} - {'DEPENDS': {'dbus'}} + {} : Some expected variables not found in recipe: {'DEPENDS': {'dbus'}} Ensure dbus is built and present in the sysroot. Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/devtool.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index d5b6a46d491..723d8e19cfd 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -235,6 +235,8 @@ class DevtoolTests(DevtoolBase): @OETestID(1423) def test_devtool_add_git_local(self): +# We need dbus built so that DEPENDS recognition works +bitbake('dbus') # Fetch source from a remote URL, but do it outside of devtool tempdir = tempfile.mkdtemp(prefix='devtoolqa') self.track_for_cleanup(tempdir) -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 07/12] oeqa/selftest/wic: Use a subdir of builddir, not /var/
Using /var/ leave wic open to races with other processes on the system, use a subdir of builddir instead to avoid this. Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/wic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index 055175212a6..5302e47da1a 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -64,13 +64,13 @@ def only_for_arch(archs, image='core-image-minimal'): class Wic(OESelftestTestCase): """Wic test class.""" -resultdir = "/var/tmp/wic.oe-selftest/" image_is_ready = False native_sysroot = None wicenv_cache = {} def setUpLocal(self): """This code is executed before each test method.""" +self.resultdir = self.builddir + "/wic-tmp/" super(Wic, self).setUpLocal() if not self.native_sysroot: Wic.native_sysroot = get_bb_var('STAGING_DIR_NATIVE', 'wic-tools') -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 02/12] oeqa/selftest/image_tyypedep: Avoid undefined variable failure
If something goes wrong with the test, dep can be undefined. Avoid a traceback for this and handle it more gracefully. Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/image_typedep.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/lib/oeqa/selftest/cases/image_typedep.py b/meta/lib/oeqa/selftest/cases/image_typedep.py index e6788853a36..932c7f883da 100644 --- a/meta/lib/oeqa/selftest/cases/image_typedep.py +++ b/meta/lib/oeqa/selftest/cases/image_typedep.py @@ -29,11 +29,14 @@ inherit image # like CONVERSION_DEPENDS_bz2="somedep" result = bitbake('-e emptytest') +dep = None for line in result.output.split('\n'): if line.startswith('CONVERSION_DEPENDS_bz2'): dep = line.split('=')[1].strip('"') break +self.assertIsNotNone(dep, "CONVERSION_DEPENDS_bz2 dependency not found in bitbake -e output") + # Now get the dependency task list and check for the expected task # dependency bitbake('-g emptytest') -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 03/12] oqqa/selftest/lic_checksum: Avoid cache reparse
By having a consistent config for the test, a second reparse is avoided and the test runs slightly faster. Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/lic_checksum.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/cases/lic_checksum.py b/meta/lib/oeqa/selftest/cases/lic_checksum.py index 37407157c1e..f992b3736e4 100644 --- a/meta/lib/oeqa/selftest/cases/lic_checksum.py +++ b/meta/lib/oeqa/selftest/cases/lic_checksum.py @@ -19,6 +19,8 @@ class LicenseTests(OESelftestTestCase): os.close(lic_file) self.track_for_cleanup(lic_path) +self.write_config("INHERIT_remove = \"report-error\"") + self.write_recipeinc('emptytest', """ INHIBIT_DEFAULT_DEPS = "1" LIC_FILES_CHKSUM = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e" @@ -29,7 +31,6 @@ SRC_URI = "file://%s;md5=d41d8cd98f00b204e9800998ecf8427e" with open(lic_path, "w") as f: f.write("data") -self.write_config("INHERIT_remove = \"report-error\"") result = bitbake(bitbake_cmd, ignore_status=True) if error_msg not in result.output: raise AssertionError(result.output) -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 04/12] oeqa/runner: Ensure we don't print misleading results output
The current code assumes if something isn't a failure of some kind, it was a pass. When test case IDs weren't matching, this lead to very confusing output where things would fail, then be listed as passing. This adds code to track successes, ensuring we don't end up in this position again with unmatched entries being listed as UNKNOWN. Signed-off-by: Richard Purdie --- meta/lib/oeqa/core/runner.py | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py index 16345fab2ec..374d30cc38d 100644 --- a/meta/lib/oeqa/core/runner.py +++ b/meta/lib/oeqa/core/runner.py @@ -42,6 +42,8 @@ class OETestResult(_TestResult): def __init__(self, tc, *args, **kwargs): super(OETestResult, self).__init__(*args, **kwargs) +self.successes = [] + self.tc = tc self._tc_map_results() @@ -58,6 +60,7 @@ class OETestResult(_TestResult): self.tc._results['errors'] = self.errors self.tc._results['skipped'] = self.skipped self.tc._results['expectedFailures'] = self.expectedFailures +self.tc._results['successes'] = self.successes def logSummary(self, component, context_msg=''): elapsed_time = self.tc._run_end_time - self.tc._run_start_time @@ -115,13 +118,18 @@ class OETestResult(_TestResult): return (found, None) +def addSuccess(self, test): +#Added so we can keep track of successes too +self.successes.append((test, None)) +super(OETestResult, self).addSuccess(test) + def logDetails(self): self.tc.logger.info("RESULTS:") for case_name in self.tc._registry['cases']: case = self.tc._registry['cases'][case_name] -result_types = ['failures', 'errors', 'skipped', 'expectedFailures'] -result_desc = ['FAILED', 'ERROR', 'SKIPPED', 'EXPECTEDFAIL'] +result_types = ['failures', 'errors', 'skipped', 'expectedFailures', 'successes'] +result_desc = ['FAILED', 'ERROR', 'SKIPPED', 'EXPECTEDFAIL', 'PASSED'] fail = False desc = None @@ -143,7 +151,7 @@ class OETestResult(_TestResult): oeid, desc)) else: self.tc.logger.info("RESULTS - %s - Testcase %s: %s" % (case.id(), -oeid, 'PASSED')) +oeid, 'UNKNOWN')) class OEListTestsResult(object): def wasSuccessful(self): -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 01/12] oeqa/core/runner: Improve test case comparision
We can directly compare the test case IDs rather than representations, then if we're using subunit to split the tests, the comparisions still work as intended. Signed-off-by: Richard Purdie --- meta/lib/oeqa/core/runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py index 13cdf5ba523..16345fab2ec 100644 --- a/meta/lib/oeqa/core/runner.py +++ b/meta/lib/oeqa/core/runner.py @@ -88,10 +88,10 @@ class OETestResult(_TestResult): break scase_str = scase.test_id else: -if case == scase: +if case.id() == scase.id(): found = True break -scase_str = str(scase) +scase_str = str(scase.id()) # When fails at module or class level the class name is passed as string # so figure out to see if match -- 2.17.1 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [yocto] [PATCH] runtime: Add support to manual BSP test cases
TestID was determined from testopia, https://bugzilla.yoctoproject.org/tr_show_run.cgi?run_id=9635. Regards, Alim Hussin -Original Message- From: akuster808 [mailto:akuster...@gmail.com] Sent: Friday, July 13, 2018 10:52 PM To: Hussin, Mohamad Noor Alim ; yo...@yoctoproject.org; richard.pur...@linuxfoundation.org Subject: Re: [yocto] [PATCH] runtime: Add support to manual BSP test cases On 07/13/2018 05:08 AM, mohamad.noor.alim.hus...@intel.com wrote: > From: Mohamad Noor Alim Hussin > > This is manual BSP test cases that have converted to auto test cases > for QA release. Manualbsp.py has dependency on file bsphardware that > run on hardware. How do the TestID get determined? Also, I think this patch needs to be cc'd to "openembedded-core@lists.openembedded.org" > > Signed-off-by: Mohamad Noor Alim Hussin > > --- > meta/lib/oeqa/runtime/cases/manualbsp.py | 122 > meta/lib/oeqa/runtime/files/bsphardware > | 132 +++ > 2 files changed, 254 insertions(+) > create mode 100644 meta/lib/oeqa/runtime/cases/manualbsp.py > create mode 100755 meta/lib/oeqa/runtime/files/bsphardware > > diff --git a/meta/lib/oeqa/runtime/cases/manualbsp.py > b/meta/lib/oeqa/runtime/cases/manualbsp.py > new file mode 100644 > index 000..22d0d33 > --- /dev/null > +++ b/meta/lib/oeqa/runtime/cases/manualbsp.py > @@ -0,0 +1,122 @@ > +from oeqa.runtime.case import OERuntimeTestCase from > +oeqa.core.decorator.depends import OETestDepends from > +oeqa.core.decorator.oeid import OETestID import subprocess import > +time > + > +class BspRuntimeTest(OERuntimeTestCase): > + > +@OETestID(240) > +def test_check_bash(self): > +status, output = self.target.run('which bash') > +msg = ('bash shell not working as expected. ' > +'Status and output:%s and %s.' % (status, output)) > +self.assertEqual(status, 0, msg = msg) > + > +@OETestID(228) > +def test_runlevel_5(self): > +status, output = self.target.run('init 5') > +msg = ('System unable to init 5 ' > +'Status and output:%s and %s.' % (status, output)) > +self.assertEqual(status, 255, msg = msg) > +time.sleep(2) > +command = 'bsphardware -r 5' > +status, output = self.target.run(command) > +msg = ('System did not start from runlevel 5. ' > +'Status:%s.' % (status)) > +self.assertEqual(status, 0, msg = msg) > + > +@OETestID(198) > +def test_runlevel_3(self): > +status, output = self.target.run('init 3') > +msg = ('System unable to start with runlevel 3. ' > +'Status and output:%s and %s.' % (status, output)) > +self.assertEqual(status, 255, msg = msg) > +time.sleep(2) > +command = 'bsphardware -r 3' > +status, output = self.target.run(command) > +msg = ('Unable to change from runlevel 5 to 3. ' > +'Status and output:%s and %s.' % (status, output)) > +self.assertEqual(status, 0, msg = msg) > + > +class BspHardwareTest(OERuntimeTestCase): > + > +@classmethod > +def setUpClass(cls): > +src = os.path.join(cls.tc.runtime_files_dir, 'bsphardware') > +cls.tc.target.run('mkdir ~/test') > +cls.tc.target.copyTo(src, '/usr/bin') > + > +@classmethod > +def tearDownClass(cls): > +cls.tc.target.run('rm -rf ~/test') > + > +@OETestID(216) > +def test_USB_mount(self): > +command = 'bsphardware -d sd -sp 1 -m ~/test/stick' > +status, output = self.target.run(command) > +msg = ('Unable to mount USB stick. ' > +'Status and output:%s and %s.' % (status, output)) > +self.assertEqual(status, 0, msg = msg) > + > +@OETestID(217) > +@OETestDepends(['manualbsp.BspHardwareTest.test_USB_write_file']) > +def test_USB_read_file(self): > +command = 'cat ~/test/stick/hello_stick' > +status, output = self.target.run(command) > +msg = ('Unable to read file from USB stick. ' > +'Status and output:%s and %s.' % (status, output)) > +self.assertEqual(status, 0, msg = msg) > + > +@OETestDepends(['manualbsp.BspHardwareTest.test_USB_mount']) > +@OETestID(219) > +def test_USB_write_file(self): > +command = 'touch ~/test/stick/hello_stick' > +status, output = self.target.run(command) > +msg = ('Status and output:%s and %s.' % (status, output)) > +self.assertEqual(status, 0, msg = msg) > + > +@OETestDepends(['manualbsp.BspHardwareTest.test_USB_mount']) > +@OETestID(218) > +def test_USB_unmount(self): > +command = 'bsphardware -u ~/test/stick' > +status, output = self.target.run(command) > +msg = ('Unable to unmount USB stick. ' > +'Status and output:%s and %s.' % (status, output)) > +self.assertEqual(status, 0, msg = msg) > + > +