summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-01-22scripts/lib/testcasemgmt/manualexecution.py:changing code based on pythonicmazliana/test-case-mgmt-store-report-revisedMazliana
1)for loop in getting testcases 2)for loop in execute steps 3)json load file used with statement 4)getting result using dictionary Signed-off-by: Mazliana <mazliana.mohamad@intel.com>
2019-01-22scripts/lib/testcasemgmt/manualexecution.py: Adding new dic andMazliana
rename function _read_testcases Signed-off-by: Mazliana <mazliana.mohamad@intel.com>
2018-12-21scripts/lib/testcasemgmt/manualexecution.py: Refactoring script based on ↵Mazliana
Paul's inputs Grammatical error-Configuration Simplyfy the code-change using max to len, result input using lower() Change required result to passed/blocked/failed/skipped Signed-off-by: Mazliana <mazliana.mohamad@intel.com>
2018-12-17scripts/lib/testcasemgmt/manualexecution.py: cleancode, remove unnecessary ↵Mazliana
return value Signed-off-by: Mazliana <mazliana.mohamad@intel.com>
2018-12-13scripts/test-case-mgmt: add "manualexecution" as a toolMazliana
Integrated the test-case-mgmt "store", "report" with "manual execution".Manual test execution is one of an alternative test case management tool of Testopia.This script has only a bare-minimum function.Bare-minimum function refer to function where the user can only execute all of the test cases that component have. To use these scripts, first source oe environment, then run the entry point script to look for help. $ test-case-mgmt To execute manual test cases, execute the below $ test-case-mgmt manualexecution <manualjsonfile> By default testresults.json store in <build_dir>/tmp/log/manual/ [YOCTO #12651] Signed-off-by: Mazliana <mazliana.mohamad@intel.com>
2018-12-13script/lib/testcasemgmt/manualexecution.py: manual helper script with ↵Mazliana
bare-minimum function Manual execution is a helper script to execute all manual test cases in baseline command. Basically, this script will show the steps and expected results.Then, in the end of the steps, user need to give their input for the result.The input based on the passed/failed /skipped status. The result given will be stored in testresults.json and it will stored the log error given by user input & the configuration.The output test result for json file was created by using OEQA library. The configuration part is manually key-in by user.The system allow user to specify how many configuration they want to add and they needs to define the configuration name and value pair needed. In QA perspective,"configuration" means the test environments and parameters used during QA setup before testing can be carry out.Example of configurations: image used for boot up, host machine distro used, poky configurations, etc. The configuration part was added because we want to standardize the output test result format between automation and manual execution. [YOCTO #12651] Signed-off-by: Mazliana <mazliana.mohamad@intel.com>
2018-12-13scripts/test-case-mgmt: store test result and reportingYeoh Ee Peng
These scripts were developed as an alternative test case management tool to Testopia. Using these scripts, user can manage the testresults.json files generated by oeqa automated tests. Using the "store" operation, user can store multiple testresults.json files under different directories (eg. categorize directory by selftest-<distro>, runtime-<image>-<machine>). Then, using the "report" operation, user can view the test result summary for all available testresults.json files being stored that were grouped by directory and test configuration. The "report" operation expect the testresults.json file to use the json format below. OEQA implemented the codes to create test result in this format. { "<testresult_1>": { "configuration": { "<config_name_1>": "<config_value_1>", "<config_name_2>": "<config_value_2>", ... "<config_name_n>": "<config_value_n>", }, "result": { "<testcase_namespace_1>": { "status": "<PASSED or FAILED or ERROR or SKIPPED>", "log": "<failure or error logging>" }, "<testcase_namespace_2>": { "status": "<PASSED or FAILED or ERROR or SKIPPED>", "log": "<failure or error logging>" }, ... "<testcase_namespace_n>": { "status": "<PASSED or FAILED or ERROR or SKIPPED>", "log": "<failure or error logging>" }, } }, ... "<testresult_n>": { "configuration": { "<config_name_1>": "<config_value_1>", "<config_name_2>": "<config_value_2>", ... "<config_name_n>": "<config_value_n>", }, "result": { "<testcase_namespace_1>": { "status": "<PASSED or FAILED or ERROR or SKIPPED>", "log": "<failure or error logging>" }, "<testcase_namespace_2>": { "status": "<PASSED or FAILED or ERROR or SKIPPED>", "log": "<failure or error logging>" }, ... "<testcase_namespace_n>": { "status": "<PASSED or FAILED or ERROR or SKIPPED>", "log": "<failure or error logging>" }, } }, } To use these scripts, first source oe environment, then run the entry point script to look for help. $ test-case-mgmt To store test result from oeqa automated tests, execute the below $ test-case-mgmt store <source_dir> <git_branch> To store test result from oeqa automated tests under a custom directory, execute the below $ test-case-mgmt store <source_dir> <git_branch> -s <sub_directory> To report test result summary, execute the below $ test-case-mgmt report <git_branch> Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com>
2018-12-10bitbake: bitbake-user-manual: Added "usehead" parameter.Yong, Jonathan
(Bitbake rev: 91e308992d676ea541b891261e21b840606fc1c4) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09mdadm: Drop redundant patches and fix build with clangKhem Raj
Several patches were being applied unnecessarily, the purpose they served at one point has either been fixed differently, or accepted upstream. Add a new patch to make clang's diagnostics happy (From OE-Core rev: 8bc0d2f2197430723f8b2d0785169e48c883eedb) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09create_manifest3: Dont match filenames which contain the directory name for ↵Alejandro Enedino Hernandez Samaniego
new manifest When creating a new python3 manifest, there is a corner case on which the filepath for a certain dependency that was found, could contain the path of an existing folder, e.g. ${libdir}/python3/xmlrpclib.py module path contains ${libdir}/python3/xml, this causes an issue where the dependency doesnt get eventually added on FILES for that module. This patch checks if the dependency that was found is a directory, if it is, it checks if it matches one of the existing directories on the manifest, if it is not, then it checks if the dependency's path (without the filename) matches one of the directories. (From OE-Core rev: 59db12fdf294cfab5c1730337d092a75867658f7) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09bitbake: bitbake: pysh: Improve error handling for shell codeRobert Yang
The p_error() is used for printing errors when parse shell code, but it can't the EOF error correctly - Add the following lines to quilt.inc do_configure_prepend () { find ${s} -name "*.in" -exec sed -i -e "1s,^#\!.*@perl@ -w$,#\! @perl@\nuse warnings;," {} \; if [ hello ]; then } - Before the patch: $ rm -fr cache/ tmp/cache/; bitbake -p [snip] WARNING: /path/to/quilt/quilt-native_0.65.bb: Error during finalise of /path/to/quilt/quilt-native_0.65.bb [snip] bb.pysh.sherrors.ShellSyntaxError: None followed by: We can see that this isn't easy to debug, let p_error() check wheter it is EOF and print appropriate errors can improve the error message. And don't let codeparser.py except pyshlex.NeedMore (in fact, it never worked since p_error() only raise ShellSyntaxError), but make it print the last 5 lines which might be useful for debuging. - After the patch $ rm -fr cache/ tmp/cache/; bitbake -p [snip] ERROR: /path/to/quilt/quilt_0.65.bb: Error during parse shell code, the last 5 lines are: find /path/to/quilt/0.65-r0/quilt-0.65 -name "*.in" -exec sed -i -e "1s,^#\!.*@PERL@ -w$,#\! @PERL@\nuse warnings;," {} \; if [ hello ]; then autotools_do_configure sed -e 's,^COMPAT_SYMLINKS.*:=.*,COMPAT_SYMLINKS :=,' -i /path/to/quilt/0.65-r0/quilt-0.65/Makefile [snip] File "/path/to/bb/pysh/pyshyacc.py", line 649, in p_error(p=None): w('Unexpected EOF') > raise sherrors.ShellSyntaxError(''.join(msg)) bb.pysh.sherrors.ShellSyntaxError: Unexpected EOF (Bitbake rev: 44790597951638e32eb1672de2e40bd5a603326b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09bitbake: pysh/pyshlex.py: Set is not importableRobert Yang
>>> from Set import Set Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'Set' So remove related code. (Bitbake rev: 118e9d8894e64d102543562314b318676006e710) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09bitbake: pysh/sherrors.py: Remove unused classesRobert Yang
The only two that we need are ShellSyntaxError and ShellError, others are not used, so remove them. (Bitbake rev: abee2ff5ee71bf8c3221cd9d3cd4243ebb4ca273) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09bitbake: pysh: Remove unused modulesRobert Yang
We don't use these modules in bitbake, so remove them. And pysh's author declared that pysh is no longer maintained: http://pysh.sourceforge.net/ (Bitbake rev: 9cc4f12d2aef366a593c7977d3818a3002b1d8bf) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08bitbake: bitbake: persist_data: Retry database setupJoshua Watt
The configuration of the sqlite database can timeout due to locking under heavy load and should be subject to the same retry logic as the other statements. [YOCTO #13069] (Bitbake rev: 5a2a95b0396e39662968690b3065d2f88167a71c) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08bitbake: utils: Use utils.remove() within prunedir()Richard Purdie
We've already tweaked remove() for speed and not to error if it races for deletion. Therefore use this for prunedir() which was starting to show the same bug reports. [YOCTO #13003] (Bitbake rev: 47f359f9b017f8d99d0bb2161ac0dcefcbd915de) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08bitbake: fetch2: Fix os.errno referencesRichard Purdie
os.errno used to happen to work but is invalid. Correct to use errno. [YOCTO #13068] (Bitbake rev: 03aae96a8859409b1ce7e3d5c1197371fa96bd14) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08bitbake: fetch2/wget: Fix typo in exception nameRichard Purdie
This could clearly never have worked since the python3 migration but as its in an error path, it doesn't get tested/used much. (Bitbake rev: 704f27dc28d50a6dc02c8b64274ee4ecb3058c4a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08bitbake: cooker: Add some timing debug messages to the server startupRichard Purdie
We're seeing slow startup in bitbake, add some timeing debug messages so the logs are more useful for debugging when its slow. (Bitbake rev: 8d1fc115b8a176009f1f3a8ce840b422e7e0b45e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08bitbake: server/process: Increase server startup time delayRichard Purdie
On loaded production systems we've seen bitbake server take over 40s to start up. Increase the timeout to 90s which tries to avoid failures in selftests. The delays come from setting up the inotify watches (31s) so can't really be avoided. After 5s delay we now warn the user we're waiting for 90s so the interactive exeperience shouldn't be much changed and its very unlikely the user would see that anyway. (Bitbake rev: 7a4e105093c3080c1087cd06abc2883852a23e28) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08nfs-utils: Fix build with clangKhem Raj
(From OE-Core rev: 924d6956fb5bef3effe8914fe61e8cad6f71a231) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08meson.bbclass: map mips64el TARGET_ARCH to mips64 for the cross fileAndrea Adami
Meson uses 'mips64' for both big- and little-endian MIPS64 machines, so map mips64el to mips64. (From OE-Core rev: 8d1023f222f32ef64d37c3cb15b7dcf9c3e5990d) Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08oeqa/sdk/galculator: rewrite to use new helpersRoss Burton
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08oeqa/sdk/python: fix version typoRoss Burton
(From OE-Core rev: 581b43d7b3566624e6b17d516755d8e7a5142ebf) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08oeqa/sdk/assimp: use helpersRoss Burton
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08oeqa/sdk/case: add fundamental helper methodsRoss Burton
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08avahi: avoid depending on skipped packageJens Rehsack
When built without D-Bus, libavahi-client is not build: Building libavahi-client: no (You need avahi-daemon and D-Bus!) which causes avahi-dev RDEPENDS failing when creating an image containing development-tools: * - nothing provides libavahi-client = 0.7-r0 needed by avahi-dev-0.7-r0.cortexa8hf-neon (From OE-Core rev: 319532792435be73e96c8319e90336e1298ac2a1) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08uboot-sign.bbclass: fix signature and deploymentRobert Yang
Fixed: MACHINE = "beaglebone-yocto" KERNEL_CLASSES += "kernel-fitimage" KERNEL_IMAGETYPE_beaglebone-yocto = "fitImage" UBOOT_MACHINE_beaglebone-yocto = "am335x_boneblack_vboot_config" UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000" UBOOT_SIGN_KEYDIR = "${TOPDIR}/conf" UBOOT_SIGN_KEYNAME = "dev" UBOOT_SIGN_ENABLE = "1" IMAGE_INSTALL_remove = "kernel-image-zimage" $ cd conf $ openssl genrsa -F4 -out dev.key 2048 $ openssl req -batch -new -x509 -key dev.key -out dev.crt $ cd ../ $ bitbake u-boot linux-yocto $ grep signature tmp/deploy/images/beaglebone-yocto/*.dtb Binary file tmp/deploy/images/beaglebone-yocto/u-boot-beaglebone-yocto-2018.07-r0.dtb matches Binary file tmp/deploy/images/beaglebone-yocto/u-boot-beaglebone-yocto.dtb matches Binary file tmp/deploy/images/beaglebone-yocto/u-boot.dtb matches And there would be no signature info when rebuild from sstate: $ bitbake u-boot linux-yocto -cclean $ bitbake u-boot linux-yocto $ grep signature tmp/deploy/images/beaglebone-yocto/*.dtb No result This s because kernel directly edit ${DEPLOY_DIR_IMAGE}/u-boot.dtb, (Note, it is global ${DEPLOY_DIR_IMAGE}, not recipe's DEPLOYDIR), so that the modified info is not in sstate, and would be lost when rebuild from sstate. There are other problems in previouse code: - The u-boot.dtb is provided by u-boot, but edited by kernel during signing, so it should be deployed by kernel rather than u-boot. - The u-boot.do_concat_dtb directly install files to global ${DEPLOY_DIR_IMAGE}, this is incorrect, the ${DEPLOY_DIR_IMAGE} should be installed by do_deploy. - It seems that it assumes do_deploy depends on do_install according the comments, but they have no relationships: # do_concat_dtb is scheduled _before_ do_install as it overwrite the # u-boot.bin in both DEPLOYDIR and DEPLOY_IMAGE_DIR. - The do_concat_dtb should be run after do_compile, but it doesn't have this dependency. Make u-boot install u-boot.dtb to ${datadir}, kernel copies u-boot.dtb from ${STAGING_DATADIR} to ${B} and deploy it can fix the problem. [YOCTO #12112] Reported-by: Christian Andersen <c.andersen@kostal.com> (From OE-Core rev: 493f70cfb177f1d452a13329647a38642bf2b161) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08strace: fix ptest fail and strip ptest host referencesChangqing Li
1. Add LDFLAGS_FOR_BUILD for strip host reference 2. Revert one previous replace operation for fix ptest fail. refer oe commit: 74b5088f1cc1708db43c33ac2dc7f01f4a4db9c1 (From OE-Core rev: e52eede3dfd7155e4e016734586b527932d1ef2a) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08u-boot-tools: fix compile errorKai Kang
It uses sandbox_defconfig to produce u-boot tools. But EFI is only supported by arm and x86, then it fails to run task do_compile on other arches: | include/config_distro_bootcmd.h:267:3: error: #error "sandbox EFI | support is only supported on ARM and x86" Only enable EFI support for u-boot-tools on x86 and arm to fix the issue. (From OE-Core rev: f79039497a6bb8521d5dc076924b6eb2626607c5) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08glibc: improve reproducibility with multilibHongxu Jia
Multilib builds specify several loaders which will end up embedded in some binaries or script files. To support reproducible builds, we must ensure the loaders are always in deterministic order. [YOCTO #2655] [YOCTO #12478] [YOCTO #12480] (From OE-Core rev: 3f839c0cdfe253677ebee47838fe476a0939e0aa) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Improve the fix and rebase it to 2.28 Here is the log of lib32-glibc [log.do_compile] |Adjust ldd script |ldd "/lib64/ld-linux-x86-64.so.2 /lib/ld-linux.so.2 /lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2" -> "/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2" [log.do_compile] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08recipeutils-test: Add missing LIC_FILES_CHKSUMKhem Raj
Fixes ERROR: QA Issue: recipeutils-test: Recipe file fetches files and does not have license file information (LIC_FILES_CHKSUM) [license-checksum] (From OE-Core rev: ee65f7ab11302982124bcd1974a05c87342ab28e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08libunwind: Enable building static archive on muslKhem Raj
This ensures that we have .a for libunwind on musl targets, this is used for stack unwinding infra e.g. in rust Help compiling rust compiler and standard library from meta-rust (From OE-Core rev: 37ddab09f0ed9b532fb9ac57f622c8609121aa65) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08kernel: don't assign the build user/hostFederico Sauter
The KBUILD_BUILD_USER and KBUILD_BUILD_HOST variables were assigned at the kernel class level, which made it impossible to override them in the local configuration. By setting only the default values of those variables in the kernel class, it is now possible to override them as expected. (From OE-Core rev: a3e8cdf9c3ba966fa4b5a21235540eb0b00fb487) Signed-off-by: Federico Sauter <federico.sauter@ableton.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08oeqa/selftest/runcmd: Increase timeout deltaRichard Purdie
Expecting 1s accuracy on a 2s timeout on a heavily loaded system has proven to be unreliable. Update this to a 5s timeout with a 3s delta which should be achievable. (From OE-Core rev: 5feecb639d49d72d8a6abc589b937e07ee72f252) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08image-buildinfo: Remove unused function argumentJoshua Watt
Removes the listvars argument to image_buildinfo_outputvars(). It doesn't appear that this argument ever did anything. (From OE-Core rev: 66ff9408291f3df98e8a6cb3e6e348d7ec8f401d) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08kernel-fitimage: Replace tabs with spaces in pythonAlex Kiernan
Fix: WARNING: python should use 4 spaces indentation, but found tabs in kernel-fitimage.bbclass, line 24 (From OE-Core rev: 4ec42465e9df8cef20a97be11243726aa7dfb8c1) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08oeqa/selftest/context: ensure log directory existsChen Qi
Ensure log directory exists to avoid the following error. FileNotFoundError: [Errno 2] No such file or directory: '/.../build-selftest/tmp/log/oe-selftest-results-20181207043431.log' (From OE-Core rev: 6c41de48db76087fee596d9440d8f05346ab1094) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08binutils: Fix build with clangKhem Raj
(From OE-Core rev: 208dadb8f1864aca88c69766f3bfb37a2ef4953c) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08libart-lgpl: removeRoss Burton
This is very dead, and nothing in oe-core or meta-oe depends on it anymore. (From OE-Core rev: 508746e28d971952b1153a4c24ee3c5a020f9ee9) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08bitbake.conf: Cleanup deprecated function usageRichard Purdie
This function was moved in bitbake a long time ago, use the preferred version to avoid a Deprecation warning. (From OE-Core rev: aeb189ac8bc6625ec936fd69f18974ebde758946) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08classes: Correctly markup regex stringsRichard Purdie
There are various escape characters in these stings which python warns about so use the correct regex markup for them. (From OE-Core rev: 252b69c9f2abe3258366c540f56b156ed63e5437) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08oeqa/selftest/esdk: Ensure parent directory existsRichard Purdie
INFO - ====================================================================== INFO - ERROR: setUpClass (eSDK.oeSDKExtSelfTest) INFO - ---------------------------------------------------------------------- INFO - Traceback (most recent call last): File "/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/core/case.py", line 32, in _oeSetUpClass clss.setUpClassMethod() File "/home/pokybuild/yocto-worker/oe-selftest-debian/build/meta/lib/oeqa/selftest/cases/eSDK.py", line 76, in setUpClass cls.tmpdirobj = tempfile.TemporaryDirectory(prefix="selftest-esdk-", dir=bb_vars["WORKDIR"]) File "/usr/lib/python3.5/tempfile.py", line 929, in __init__ self.name = mkdtemp(suffix, prefix, dir) File "/usr/lib/python3.5/tempfile.py", line 507, in mkdtemp _os.mkdir(file, 0o700) FileNotFoundError: [Errno 2] No such file or directory: '/home/pokybuild/yocto-worker/oe-selftest-debian/build/build/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/selftest-esdk-q7ln84gc' (From OE-Core rev: 48719bc4d108df7e357e7f22f9f356cd72b3ebbd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07bitbake: cache: Cleanup deprecated function usageRichard Purdie
Remove a deprecated warning and stop using our own deprecated API! (Bitbake rev: 83ece2c6f4b000e906fec9148f25bd1dff66cfb0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07bitbake: siggen: Split out stampfile hash fetchJoshua Watt
The mechanism used to get the hash for a stamp file is split out so that it can be overridden by derived classes [YOCTO #13030] (Bitbake rev: ce241534d19b2f1c51dbdb3b92419676d234e464) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07bitbake: bitbake-worker: Pass taskhash as runtask parameterJoshua Watt
Pass the task hash as a parameter to the 'runtask' message instead of passing the entire dictionary of hashes when the worker is setup. This is possible less efficient, but prevents the worker taskhashes from being out of sync with the runqueue in the event that the taskhashes in the runqueue change. [YOCTO #13030] (Bitbake rev: 1e86d8c1bec7ea5d016a5ad2097f999362e29033) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07bitbake: persist_data: Disable enable_shared_cacheJoshua Watt
Turns off the shared cache. It isn't a significant factor in performance (now that WAL is enabled), and is a really bad idea to have enabled in processes that fork() (as bitbake it prone to do). [YOCTO #13030] (Bitbake rev: 71b427bf01374973a971c10cb64024c8ef2a11eb) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07bitbake: persist_data: Enable Write Ahead LogJoshua Watt
Enabling the write ahead log improves database reliability, speeds up writes (since they mostly happen sequentially), and speeds up readers (since they are no longer blocked by most write operations). The persistent database is very read heavy, so the auto-checkpoint size is reduced from the default (usually 1000) to 100 so that reads remain fast. [YOCTO #13030] (Bitbake rev: 79100fa67539f9654af9bf6d3e6842eb5c12e989) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07bitbake: persist_data: Add key constraintsJoshua Watt
Constructs the "key" column in the persistent database as a non-NULL primary key. This significantly speeds up lookup operations in large databases. [YOCTO #13030] (Bitbake rev: f5ba7775cfcb90401522d977cc66fe0f5aeb7a66) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-07bitbake: persist_data: Fix leaking cursors causing deadlockJoshua Watt
The original implementation of persistent data executed all SQL statements via sqlite3.Connection.execute(). Behind the scenes, this function created a sqlite3 Cursor object, executed the statement, then returned the cursor. However, the implementation did not account for this and failed to close the cursor object when it was done. The cursor would eventually be closed when the garbage collector got around to destroying it. However, sqlite has a limit on the number of cursors that can exist at any given time, and once this limit is reached it will block a query to wait for a cursor to be destroyed. Under heavy database queries, this can result in Python deadlocking with itself, since the SQL query will block waiting for a free cursor, but Python can no longer run garbage collection (as it is blocked) to free one. This restructures the SQLTable class to use two decorators to aid in performing actions correctly. The first decorator (@retry) wraps a member function in the retry logic that automatically restarts the function in the event that the database is locked. The second decorator (@transaction) wraps the function so that it occurs in a database transaction, which will automatically COMMIT the changes on success and ROLLBACK on failure. This function additionally creates an explicit cursor, passes it to the wrapped function, and cleans it up when the function is finished. Note that it is still possible to leak cursors when iterating. This is much less frequent, but can still be mitigated by wrapping the iteration in a `with` statement: with db.iteritems() as it: for (k, v) in it: ... As a side effect, since most statements are wrapped in a transaction, setting the isolation_level when the connection is created is no longer necessary. [YOCTO #13030] (Bitbake rev: e8b9d3f534ef404780be23b601d5a4bb9cec928a) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>