summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* buildhistory-diff: add option to compare task signature listPaul Eggleton2017-04-112-5/+50
| | | | | | | | | | | | Having added writing out of the task signature list to buildhistory (when BUILDHISTORY_FEATURES includes "task"), we now need a way to compare the list. This just shows which tasks have been added / changed signature / removed. (From OE-Core rev: 63bd7e9f780a98dda458d612877495756bcc5463) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/buildhistory: write out task signatures on every buildPaul Eggleton2017-04-111-0/+10
| | | | | | | | | | | | | | | | | If we want to determine what changed since the last build, one angle from which to look at it is to check the signatures. However, if we don't actually have the signatures from the last build we don't have anywhere to start. Save the signatures on each build in order to give us the starting point. NOTE: you need to set your BUILDHISTORY_FEATURES value to include "task" to enable collection of these signatures as it is is disabled by default. (From OE-Core rev: 11f68f65c46c5bc26ddeeade3021e83b3a7f895a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: Split feed_archs for RPM repo URIsIan.Arkver2017-04-111-1/+1
| | | | | | | | | | | By default the feed_archs variable is split into single characters resulting in very many broken short repo_uris. Add a split() to split the string into words first. (From OE-Core rev: 7bd6a4d56c08bf7f9ced7c07327e6163216fee08) Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classutils.py: deterministic sortingJuro Bystricky2017-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The method "prioritized" returns a list sorted by the value of the "priority" field, in descending order. However, if several list items have the same priority, the ordering of those items within the priority-sorted list becomes random. As a consequence, we may end up with a non-deterministic oe-terminal spawning, as several terminals have the same priority. So running commands such as $ bitbake xxx -cdevshell $ bitbake yyy -cmenuconfig may spawn a different terminal each time, for example sometimes Gnome and sometimes Konsole as hey have the same priority. Rather than modifying the priorities so they all differ, we sub-sort the list based on (terminal) names. This way we achieve a deterministic outcome. [YOCTO#10938] (From OE-Core rev: 82ae62f28dd2d5fb2fb261478ac6161315ac6c38) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts: Drop cleanup-workdirRichard Purdie2017-04-101-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This script appears broken and is actively breaking build directories. For example, binutils-cross-i586 gets run do_fetch to do_populate_sysroot by: $ oe-selftest -r devtool.DevtoolTests.test_devtool_virtual_kernel_modify then: $ oe-selftest -r oescripts.BuildhistoryDiffTests.test_buildhistory_diff wipes out the contents of tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/ but does not wipe out the corresponding stamps, then: $ oe-selftest -r runtime-test.Postinst.test_postinst_rootfs_and_boot needs binutils-cross-i586:do_populate_lic and if and only if this is unavailable from sstate, it fails since it thinks the source is already unpacked when it isn't resulting in: WARNING: binutils-cross-i586-2.28-r0 do_populate_lic: Could not copy license file /home/pokybuild/yocto-autobuilder/yocto-worker/nigh tly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3.LIB to /home/pokybuild/yocto-autobuilder/yocto -worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/license-destdir/binutils-cross-i586/COPYING3.LI B: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-l inux/binutils-cross-i586/2.28-r0/git/COPYING3.LIB' ERROR: binutils-cross-i586-2.28-r0 do_populate_lic: QA Issue: binutils-cross-i586: LIC_FILES_CHKSUM points to an invalid file: /home/ pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3 [license-checksum] and similar errors. Its safer for users to wipe tmp than try and maintain scripts which try to remove pieces of tmp and get it wrong so remove the script. (From OE-Core rev: 809b23c829f352c0eae455ea89f53e2a9ee87f06) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Don't use cleanup-workdirRichard Purdie2017-04-102-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cleanup-workdir isn't a partcularly good way to attempt to cleanup after tests and in some cases is actively breaking the workdir. Whilst this is a bug in cleanup-workdir, I'd prefer it didn't break tests, particularly when as far as I can see, these calls are "belt and braces" and don't appear to serve a specific purpose. If this introduces bugs, we should fix this bugs. For the purposes of history, binutils-cross-i586 gets run do_fetch to do_populate_sysroot by: $ oe-selftest -r devtool.DevtoolTests.test_devtool_virtual_kernel_modify then: $ oe-selftest -r oescripts.BuildhistoryDiffTests.test_buildhistory_diff wipes out the contents of tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/ but does not wipe out the corresponding stamps, then: $ oe-selftest -r runtime-test.Postinst.test_postinst_rootfs_and_boot needs binutils-cross-i586:do_populate_lic and if and only if this is unavailable from sstate, it fails since it thinks the source is already unpacked when it isn't resulting in: WARNING: binutils-cross-i586-2.28-r0 do_populate_lic: Could not copy license file /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3.LIB to /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/license-destdir/binutils-cross-i586/COPYING3.LIB: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3.LIB' ERROR: binutils-cross-i586-2.28-r0 do_populate_lic: QA Issue: binutils-cross-i586: LIC_FILES_CHKSUM points to an invalid file: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3 [license-checksum] and similar errors. (From OE-Core rev: a66857096df3f68d38271b3a6792150f009a54b1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/sstatetests: Replace glibc-initial with linux-libc-headersRichard Purdie2017-04-101-15/+5
| | | | | | | | | | | | The intent in these tests was to find something early in the bootstrap process to run tests against which didn't require long build times. This breaks with the removal of the glibc-initial do_build target. Replacing it with linux-libc-headers seems like a good choice and simplifies the conditionals too. (From OE-Core rev: c37d610272f9d0a506334ff9f724c025acace137) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sstatesig: avoid reporting duplicate siginfo files from sstatePaul Eggleton2017-04-101-6/+14
| | | | | | | | | | | | | | | | | | | | In find_siginfo(), which is used by bitbake-diffsigs among other things, avoid adding a siginfo file from the sstate-cache where we've already collected a sigdata file from the stamps directory with the same hash. This avoids the possibility that the top two files (as picked by default using the bitbake-diffsigs -t option) are for the same signature and thus the tool would report no differences. In order to do that, just use the hashfiles dict that we already have - we just need to change the code to populate that even if we're collecting matching files without looking for a fixed set of hashes (i.e. taskhashlist isn't set). This replaces previous code in bitbake-diffsigs that attempted to filter these out with limited success. (From OE-Core rev: 5b69eef40868180c59400624096d7ebbbbea446b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/sstatesig: fix finding native siginfo files in sstate-cachePaul Eggleton2017-04-101-16/+9
| | | | | | | | | | | | | | | | | | When comparing signatures with bitbake-diffsigs -t or bitbake -S printdiff, we use this find_siginfo() function implemented in this module to find the siginfo/sigdata files corresponding to the tasks we're looking for. However, native sstate files go into a NATIVELSBSTRING subdirectory and there was no handling for this when asking about native recipes. I'm not even sure why we were walking SSTATE_DIR in order to find this - we don't need to, we just need to run glob.glob() on the filespec we calculate, which should be a little bit more efficient. (From OE-Core rev: 8cb472e4ed25e56ec0d9cf6d8d101d1ab6687a5b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/recipetool: skip create_git in case x11 feature is not presentLeonardo Sandoval2017-04-101-0/+2
| | | | | | | | | | | | The unit test requires x11 as distro feature, otherwise it will fail while building the test requirements. [YOCTO #10903] (From OE-Core rev: 2fe8f39b5f5e7390cc46f8cb47c2503b3c5f78e2) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/wic: skip wic unit tests in case NLS is disableLeonardo Sandoval2017-04-101-1/+4
| | | | | | | | | | | | | | | | | | | | WIC test case requires wic-tools which in turn depends on intltool-native and gettext-native. However, if NLS is disable, the gettext-minimal-native is used instead of gettext-native causing a failure on intltool-native as seen below: checking for msgfmt... no checking for gmsgfmt... no configure: error: GNU gettext tools not found; required for intltool ERROR: Function failed: do_configure (log file is located at /home/lsandov1/poky/build/tmp/work/i586-poky-linux-musl/systemd-boot/232-r0/temp/log.do_configure.7518) ERROR: Task (/home/lsandov1/poky/meta/recipes-bsp/systemd-boot/systemd-boot_232.bb:do_configure) failed with exit code '1' NOTE: Tasks Summary: Attempted 609 tasks of which 604 didn't need to be rerun and 1 failed. [YOCTO #10902] (From OE-Core rev: ccd2faca99331e010badbb78d42b0ee644ca1a0a) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/utils/targetbuildproject: use parent classes defaults tmpdirJoshua Lock2017-04-061-2/+1
| | | | | | | | | | Rather than hard-coding the tmpdir for TargetBuildProject to /tmp allow the parent's default handling to define an appropriate tmpdir. (From OE-Core rev: 901659a51cd53625a93f57a9c5865e90a07ec09d) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/targetbuild: tmp dir improvementsJoshua Lock2017-04-061-3/+7
| | | | | | | | | | Don't hard-code /tmp as the tmpdir, instead use WORKDIR as the tmpdir if the instantiater doesn't specify a value. (From OE-Core rev: c43c966e0ed4ed836bdf90b1d4c3f2f45426f1ec) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/buildproject: create a more unique tmp dirJoshua Lock2017-04-061-2/+5
| | | | | | | | | | Rather than hardcoding /tmp as the default tmpdir make a more unique tmpdir with tempfile.mkdtemp() when the caller doesn't specify a tmpdir value. (From OE-Core rev: 9425c2658fea0b45468a04574cd77bffc6668a8d) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/devtool: skip test in case of poky-tiny distroLeonardo Sandoval2017-04-051-0/+2
| | | | | | | | | | | | | | The recipe being tested (devtoo-test-patch-gz) by devtool has dependencies (at least libxres and virtual/libx11) that cannot be built with poky-tiny distro so skip the test for this particular policy. [YOCTO #10891] (From OE-Core rev: 03751783cb063bc6a57cd19357bc1016bfa2a814) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/recipetool: replace fedorahosted.org SRC_URI with github.com sourceChoong YinThong2017-04-051-4/+4
| | | | | | | | | | | | | fedorahosted.org was retired on March 1st, 2017. This is to update the SRC_URI to point to github.com. [YOCTO #11226] (From OE-Core rev: 9b3c9193d4a04061e64e43d55782a4d73ee166ad) Signed-off-by: Choong YinThong <yin.thong.choong@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runtime/dnf : Add ID to the dnf test casesJose Perez Carranza2017-04-051-0/+12
| | | | | | | | | Add the corresponding Testopia ID to the test cases for dnf (From OE-Core rev: 434b48566f2febcc5bd5d6cd9c04788f008ffce1) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/devtool: use kernel provider instead of recipe allowing other ↵Leonardo Sandoval2017-04-051-11/+12
| | | | | | | | | | | | kernel providers To generalize the unit test for other kernel providers, use virtual/kernel instead of linux-yocto, allowing to run the selftest on non-poky distros, i.e. poky-tiny. (From OE-Core rev: 087e1204fb27e2952f16c2e4761f5993b7722732) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/commands: extend variable regex to include A_B variable notationLeonardo Sandoval2017-04-051-1/+1
| | | | | | | | | | This change allows quering for variables with the format A_B, i.e. PREFERRED_PROVIDER_virtual/kernel instead of just A. (From OE-Core rev: 3810738eff6bdcf27c7e291dbeaedc699ab14bfc) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/pkgdata: replace the glibc recipe allowing execution on non-poky ↵Leonardo Sandoval2017-04-011-15/+13
| | | | | | | | | | | | | | | distros Replace the glibc recipe for zlib on unit tests, otherwise tests are restricted to glibc distros (poky). [YOCTO #10890] (From OE-Core rev: b77cf437e89a2ec21de6a69d5e34736925f1eeba) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: remove prepare_empty_partition_squashfsEd Bartosh2017-04-011-2/+1
| | | | | | | | | | | | | | | | | | | | There is not much sense in creation of empty squashfs partition. It's also not possible to create empty squashfs partition of specified size. Even more, prepare_empty_partition_squashfs method is absolutely broken. It raises exception when called and even its signature differs from the rest of of similar methods. It means that nobody uses it and it's safe to remove it. Removed prepare_empty_partition_squashfs method and testing of empty squashfs partition. (From OE-Core rev: 9152960f250cb4df1e559d747fb09005675a0d75) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: test creation of msdos partitionEd Bartosh2017-04-011-0/+1
| | | | | | | | | | | | Added msdos partition to the .wks file in test_fs_types wic test case. [YOCTO #11137] (From OE-Core rev: 044dd146d39542d0e6b598ee1dcadc49e0db3de9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: fix incorrect fstypeEd Bartosh2017-04-011-1/+1
| | | | | | | | | Fixed typo in wks content: squash->squashfs (From OE-Core rev: cf06e6763d06e3e631bed85e2cb087f713808e6d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add test_image_bootpart_globbed test for wicEd Bartosh2017-04-011-0/+10
| | | | | | | | | | | | Test image-bootpart wic plugin with globbed value of IMAGE_BOOT_FILES variable to increase test coverage. [YOCTO #10618] (From OE-Core rev: 4da2526800de1d40b51db96b0d5ab44dbaff68ff) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add kickstart_parser test caseEd Bartosh2017-04-011-0/+12
| | | | | | | | | | | | Added test_kickstart_parser test case to test wks parser options not yet covered by tests. [YOCTO #10618] (From OE-Core rev: 36779a95f2e1e2c0d94ba81d30c8b1fc9dd161e4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add wic test case test_fs_typesEd Bartosh2017-04-011-0/+19
| | | | | | | | | | | | Added wic test case to test all possible filesystem types for empty and not empty partitions. [YOCTO #10618] (From OE-Core rev: 95ec9e6b987706fac9bd410681f0950f957989bb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/cases: Migrate underscore casesMariano Lopez2017-04-012-82/+59
| | | | | | | | | | | | | | | | | There were two missing cases to be migrated to the new framework: _qemutiny and _ptest. qemutiny was straightforward. ptest on the other hand wasn't working even in previous releases; it has been migrated from smart to dnf, and how ptest packages are gathered to be installed, adapted to use unicode, and removed a lot of code that wasn't needed anymore. (From OE-Core rev: ee7c19546b686e852d01df25143504d9798d10d6) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: allow persistent image writes in runqemu()Patrick Ohly2017-03-284-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, QemuRunner avoids modifying the image files that it boots into by enabling the qemu snapshot mode. However, some tests may want to test changes that must persists across reboots, so this mode should be optional. This can be combined by copying the image file to a temporary location first and then booting with that copy. It's also useful when testing with additional drives attached to a virtual machine. QemuTinyRunner doesn't use the snapshot parameter and therefore ignores the new parameter. Long term, a better way of passing these various configuration parameters should be used, and perhaps QemuRunner and QemuTinyRunner can be merged into one again to avoid code duplication. But for now the patch follows the exiting style. Also beware that QemuTarget.start() now acts in two different modes (with or without explicit launch command), and depending on that mode parameters like discard_writes must be ignored, i.e. not get passed to launch(). (From OE-Core rev: 969d079a33a57f5a8f7af86d7bab04d35ab07584) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: allow customizing image used by runqemu()Patrick Ohly2017-03-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | runqemu() takes all parameters for the virtual machine from the variables of the given recipe. By allowing the caller to provide a hash with variables that get applied locally, the caller gets more control. Here's the intended usage: <prepare internal-image in self.resultdir> overrides = { 'DEPLOY_DIR_IMAGE': self.resultdir, 'IMAGE_LINK_NAME': 'internal-image-%s' % self.image_arch, } with runqemu('refkit-installer-image', ssh=False, overrides=overrides) as qemu: .... This can be used to replace the image completely with something else or to copy it before allowing runqemu() to write into it. (From OE-Core rev: 4c6ba32abd6b9de33f4b8a0b87e8a56432ed7825) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: allow extending qemuparams="..."Patrick Ohly2017-03-281-2/+2
| | | | | | | | | | | | | | | Sometimes it is useful to reconfigure the qemu virtual machine directly. runqemu has the "qemuparams" parameter for that, and the underlying start() methods also supported modifying that via their "params" parameter. Only the runqemu() wrapper function lacked a way to specify additional parameters. One potential usage is to attach additional disks. (From OE-Core rev: b2a1cf09ea65ed6f561886b1b4241f9adf3e5709) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: QEMU_USE_KVM can list machinesPatrick Ohly2017-03-281-3/+4
| | | | | | | | | | | | | | | | Previously, QEMU_USE_KVM=True enabled the use of kvm only when "x86" was in the MACHINE name. That is too limiting, because for example intel-corei7-64 can also use kvm but it wasn't possible to enable that without changing OE-core. That traditional usage is still supported. In addition, QEMU_USE_KVM can be set to a list of space-separated MACHINE names for which kvm is to be enabled. (From OE-Core rev: d5421dd00b9cf785fa77e77c6c739e8bd8822fa3) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: tolerate interrupted select() while waiting for qemuPatrick Ohly2017-03-282-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, the OEQA utility code aborts with: ... File ".../meta/lib/oeqa/utils/qemurunner.py", line 131, in start return self.launch(launch_cmd, qemuparams=qemuparams, get_ip=get_ip, extra_bootparams=extra_bootparams) File ".../meta/lib/oeqa/utils/qemurunner.py", line 259, in launch sread, swrite, serror = select.select(socklist, [], [], 5) InterruptedError: [Errno 4] Interrupted system call strace shows that this is because of a SIGWINCH: Connection from 127.0.0.1:52668 select(21, [20], [], [], {5, 0}) = ? ERESTARTNOHAND (To be restarted if no handler) --- SIGWINCH {si_signo=SIGWINCH, si_code=SI_KERNEL} --- This is related to some special conditions: * whether qemu opens a graphical console window (enabled in Poky by default) * where that window gets opened * whether the window manager changes the size of the shell window (mine is a tiling window manager and reorders and resizes windows automatically) Ignoring the interrupted system calls avoids the problem. Code elsewhere (for example, run() in ssh.py) already does the same thing. (From OE-Core rev: 44fe106baf5fd5aebe26c5f28004e2b18d839b7c) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/loader.py: Do not import underscore modules by defaultMariano Lopez2017-03-281-4/+30
| | | | | | | | | | | | | | | | Underscore modules are meant to be run only when manually added to the test suite, so far another mechanisms are in place to make this happen with runtime, sdk, and esdk (mostly in test* bbclasses). This will add such functionality in the core framework so other specific frameworks can take use this without adding something else. [YOCTO #10980] (From OE-Core rev: 2c6eac774768aa610a8b3784483b9e90fb629c2d) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: don't use cleanall in selftestsJoshua Lock2017-03-273-8/+2
| | | | | | | | | | | | | | | | | | | | * devtool: oeqa.selftest.devtool.DevtoolTests is taking 4 or more hours on the autobuilder because the cleanall call deletes the tarball of the kernel source, forcing a large clone which is especially long on an NFS mount. The cleanall invocation isn't really required here and switching to clean instead should avoid hours of re-cloning the same repository each time we run oe-selftest on the autobuilder. * buildoptions: We only need to ensure the first image isn't an incremental image, clean will suffice here. * runtime-test: no need to clean up the artefacts generated during the test, let's leave that to a higher level process rather than using the cleanall hammer. (From OE-Core rev: 9c948d3de08f158387e08a17cdc0cedc7d26bb54) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runtime-test.py: fix typoRobert Yang2017-03-271-2/+2
| | | | | | | | | roofs -> rootfs. (From OE-Core rev: 73b386c16b2388b5b351305bf1855c444d53481e) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.buildperf: limit the length of error outputMarkus Lehtonen2017-03-271-1/+1
| | | | | | | | | | Limit the length of error logs to 40 lines. We don't need to show/archive thousands of lines of bitbake logs if an error occurs. (From OE-Core rev: 3f1996cb016713295edf35edc32dd5e84888a5c7) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.utils.commands: limit runCmd exception outputMarkus Lehtonen2017-03-271-3/+10
| | | | | | | | | | | | Make it possible to limit the length of output lines shown in runCmd exceptions. E.g when running bitbake we easily get thousands of lines of log output, where only the last few (tens) are interesting or relevant when an error occurs. (From OE-Core rev: 403dd205828002d6ef4e8b474aedb6082289e22f) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-build-perf-test: sum rusage in buildstatsMarkus Lehtonen2017-03-271-12/+12
| | | | | | | | | | | | | | | Instead of separate rusage and child rusage values, only store their sum value in buildstats. This is a big reduction in data footprint without really losing any interesting data. Also, utilize OrderedDict to order data more logically. [YOCTO #10582] (From OE-Core rev: 70c41bb721c00ed2abbb88d273eebc3a8bb01f5d) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-build-perf-test: pack all buildstat in one fileMarkus Lehtonen2017-03-272-31/+35
| | | | | | | | | | | | | | | | Write out all buildstats into one big json file, instead of using multiple per-measurement files. Individual buildstats will be indexed using "<test_name>.<measurement_name>" as the key. Also, changes the per-testcase working directories into temporary directories that will be removed after test execution as there are no more per-testcase data files to store permanently. [YOCTO #10582] (From OE-Core rev: a7f2e8915db379021f3409ca640de5d3b054a830) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* targetcontrol.py: use logger.info to replace of bb.noteRobert Yang2017-03-272-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bb.note prints multiple same lines when invoke this class again, but if we set mainlogger.propagate = False, nothing would be printed, according to logging's document: https://docs.python.org/3/library/logging.html Note If you attach a handler to a logger and one or more of its ancestors, it may emit the same record multiple times. In general, you should not need to attach a handler to more than one logger - if you just attach it to the appropriate logger which is highest in the logger hierarchy, then it will see all events logged by all descendant loggers, provided that their propagate setting is left set to True. A common scenario is to attach handlers only to the root logger, and to let propagation take care of the rest. We may need avoid using bb.note or bb.warn in oeqa since it attaches multiple log handlers which may cause confusions This patch only sets "mainlogger.propagate = False" in selftest/runqemu.py and use logger.info to replace bb.note in targetcontrol.py to minimize the impact. [YOCTO #10249] (From OE-Core rev: b139790422bc8e0d80bad063bb78bc1632731bc1) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/runqemu.py: add it to test runqemuRobert Yang2017-03-271-0/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage: $ oe-selftest -r runqemu Current test cases: $ runqemu nographic qemux86-64 $ runqemu nographic qemux86-64 ext4 $ runqemu nographic qemux86-64 iso $ runqemu nographic core-image-minimal $ runqemu nographic core-image-minimal vmdk $ runqemu nographic core-image-minimal vdi $ runqemu nographic tmp/deploy/images/qemux86-64 $ runqemu nographic tmp/deploy/images/qemux86-64 hddimg $ runqemu nographic qemux86-64 slirp $ runqemu nographic qemux86-64 slirp qcow2 $ runqemu nographic tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.qemuboot.conf $ runqemu nographic tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.ext4 Need more later: - Test initramfs - Test nfs - Test when set DEPLOY_DIR_IMAGE and OECORE_NATIVE_SYSROOT - And others which similate runqemu runs on SDK and eSDK. [YOCTO #10249] (From OE-Core rev: e7073cb4786411bb71645e7d7cbc1c510910c4cc) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner.py: fix handling of runqemuparamsChen Qi2017-03-271-3/+3
| | | | | | | | | | The launch() doesn't need runqemuparams, we need handle it in start(). (From OE-Core rev: 16400f2b8bffc4cae0263bb597522071299b46ca) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/targetcontrol.py: modify it to test runqemuRobert Yang2017-03-273-18/+43
| | | | | | | | | | | | | | | | | | Modify the following files to test runqemu: targetcontrol.py utils/commands.py utils/qemurunner.py We need simulate how "runqemu" works in command line, so when test "runqemu", the targetcontrol.py, utils/commands.py and utils/qemurunner.py don't have to find the rootfs or set env vars. [YOCTO #10249] (From OE-Core rev: 9305d816bdf8837ea3a407091cb7f24a9a3ae8dc) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: configurable timeout for run_serial()Patrick Ohly2017-03-273-12/+17
| | | | | | | | | | | | | | | | | | | Some commands might need to run longer than the default timeout of five seconds. If that occurred, run_serial() returned with a status code of zero (sic!) and no other indication of what went wrong. Now the timeout is configurable (with five still the default) and an explicit warning ("<<< run_serial(): command timed out after 5 seconds without output >>>") gets appended at the end of the data returned to the caller. While at it, the logic for checking for the timeout was updated a bit because both implementations could overshoot the timeout when entering select() right before the final deadline. (From OE-Core rev: accf0362f964cc9d6330b6e52e83d748d890521f) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: respect OPKGLIBDIRMartin Jansa2017-03-241-7/+14
| | | | | | | | | | | | | | | | | | | * respect it for incremental rootfs generation * add lists_dir option to opkg.conf * also fix setting info_dir and status_file when they use default value, the problem is that self.opkg_dir is already prefixed with rootfs directory, comparing it with /var/lib/opkg always returned false and the options were appended to config file unnecessary * with opkg 0.3.4 we can use VARDIR prefix added in: commit d2a8e23dc669adc398f4bb8bcfcabfcf925708f7 Author: Florin Gherendi <floring2502@gmail.com> Date: Mon Dec 19 12:25:38 2016 +0200 libopkg: make the /var and /etc directories configurable at compile time. (From OE-Core rev: b14c11d062872c3dcf95e03b61017005dea5b754) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: Respect OPKGLIBDIR variableMartin Jansa2017-03-241-1/+3
| | | | | | | | | | | | | * when OPKGLIBDIR doesn't have the default /var/lib value it will silently fail to copy package database from normal rootfs to debugfs rootfs and then when trying to install *-dbg complimentary packages it won't install anything, because installed_pkgs.txt file generated from debugfs is empty (From OE-Core rev: bebdb056c8bd0efc056f07b275a154e5d5a3aa2b) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sign_rpm.bbclass: do not set/use RPM_GPG_PUBKEYAlexander Kanavin2017-03-232-2/+3
| | | | | | | | | | | | | This is entirely unnecessary (we can ask the signer backend to export the key to a file when needed), and was causing confusing selftest failures due to the variable being set from two different places. [YOCTO #11191] (From OE-Core rev: 74ea979044368dc28c24325e7e77471b70aa8fe8) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: use WORKDIR/oe-testimage-repo to look for RPM packagesAlexander Kanavin2017-03-231-1/+1
| | | | | | | | | | | | | Using RPM deploy dir was causing errors when pre-built images were used with these steps: https://wiki.yoctoproject.org/wiki/Quality_Assurance_yocto_project [YOCTO #11173] (From OE-Core rev: f633abed51ed19522340b1d923ffc12ed7e291d6) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add test_rawcopy_plugin test caseEd Bartosh2017-03-231-0/+16
| | | | | | | | | | | | This test case builds wic image using rawcopy plugin running wic directly. [YOCTO #10618] (From OE-Core rev: acbeaa37554f3546b036ff8ef9aebfe00f2537c6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: pylinted wic test suite.Ed Bartosh2017-03-231-24/+28
| | | | | | | | | Fixed long lines, indentation and one unused variable. (From OE-Core rev: a6dbe6e1630067164881c8d7efb44cb650cd043c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>