summaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2019-02-25runqemu: add options for enabling virgl GL accelerationAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-25devtool: deploy-target: allow use of alternate sshOlaf Mandel
Allow the use of an alternate SSH executable for deploy-target and undeploy-target. The command can be specified with -e / --ssh-exec. Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-25resulttool/resultutils: Avoids tracebacks for missing logsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-21resulttool: Improvements to allow integration to the autobuilderRichard Purdie
This is a combined patch of the various tweaks and improvements I made to resulttool: * Avoid subprocess.run() as its a python 3.6 feature and we have autobuilder workers with 3.5. * Avoid python keywords as variable names * Simplify dict accesses using .get() * Rename resultsutils -> resultutils to match the resultstool -> resulttool rename * Formalised the handling of "file_name" to "TESTSERIES" which the code will now add into the json configuration data if its not present, based on the directory name. * When we don't have failed test cases, print something saying so instead of an empty table * Tweak the table headers in the report to be more readable (reference "Test Series" instead if file_id and ID instead of results_id) * Improve/simplify the max string length handling * Merge the counts and percentage data into one table in the report since printing two reports of the same data confuses the user * Removed the confusing header in the regression report * Show matches, then regressions, then unmatched runs in the regression report, also remove chatting unneeded output * Try harder to "pair" up matching configurations to reduce noise in the regressions report * Abstracted the "mapping" table concept used to pairing in the regression code to general code in resultutils * Created multiple mappings for results analysis, results storage and 'flattening' results data in a merge * Simplify the merge command to take a source and a destination, letting the destination be a directory or a file, removing the need for an output directory parameter * Add the 'IMAGE_PKGTYPE' and 'DISTRO' config options to the regression mappings * Have the store command place the testresults files in a layout from the mapping, making commits into the git repo for results storage more useful for simple comparison purposes * Set the oe-git-archive tag format appropriately for oeqa results storage (and simplify the commit messages closer to their defaults) * Fix oe-git-archive to use the commit/branch data from the results file * Cleaned up the command option help to match other changes * Follow the model of git branch/tag processing used by oe-build-perf-report and use that to read the data using git show to avoid branch change * Add ptest summary to the report command * Update the tests to match the above changes Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-21scripts/resulttool: enable manual execution and result creationMazliana
Integrated “manualexecution” operation to resulttool scripts. Manual execution script is a helper script to execute all manual test cases in baseline command, which consists of user guideline steps and the expected results. The last step will ask user to provide their input to execute result. The input options are passed/failed/blocked/skipped status. The result given will be written in testresults.json including log error from the user input and configuration if there is any.The output test result for json file is created by using OEQA library. The configuration part is manually key-in by the user. The system allow user to specify how many configuration they want to add and they need to define the required configuration name and value pair. In QA perspective, "configuration" means the test environments and parameters used during QA setup before testing can be carry out. Example of configurations: image used for boot up, host machine distro used, poky configurations, etc. The purpose of adding the configuration is to standardize the output test result format between automation and manual execution. To use these scripts, first source oe environment, then run the entry point script to look for help. $ resulttool To execute manual test cases, execute the below $ resulttool manualexecution <manualjsonfile> By default testresults.json store in <build_dir>/tmp/log/manual/ [YOCTO #12651] Signed-off-by: Mazliana <mazliana.mohamad@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-21resulttool: enable merge, store, report and regression analysisYeoh Ee Peng
OEQA outputs test results into json files and these files were archived by Autobuilder during QA releases. Example: each oe-selftest run by Autobuilder for different host distro generate a testresults.json file. These scripts were developed as a test result tools to manage these testresults.json file. Using the "store" operation, user can store multiple testresults.json files as well as the pre-configured directories used to hold those files. Using the "merge" operation, user can merge multiple testresults.json files to a target file. Using the "report" operation, user can view the test result summary for all available testresults.json files inside a ordinary directory or a git repository. Using the "regression-file" operation, user can perform regression analysis on testresults.json files specified. Using the "regression-dir" and "regression-git" operations, user can perform regression analysis on directory and git accordingly. These resulttool operations expect the testresults.json file to use the json format below. { "<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. $ resulttool To store test result from oeqa automated tests, execute the below $ resulttool store <source_dir> <git_branch> To merge multiple testresults.json files, execute the below $ resulttool merge <base_result_file> <target_result_file> To report test report, execute the below $ resulttool report <source_dir> To perform regression file analysis, execute the below $ resulttool regression-file <base_result_file> <target_result_file> To perform regression dir analysis, execute the below $ resulttool regression-dir <base_result_dir> <target_result_dir> To perform regression git analysis, execute the below $ resulttool regression-git <source_dir> <base_branch> <target_branch> [YOCTO# 13012] [YOCTO# 12654] Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-21oe-build-perf-report/gitarchive: Move common useful functions to libraryRichard Purdie
These functions can be reused by the resulttool code so move to the common function library for this purpose. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-18scripts/oe-git-archive: Separate out functionality to library functionRichard Purdie
This turns the core of the script into a library function. Ultimately this will let us call that code with custom 'keywords' rather than relying on the data parsed from bitbake metadata which can't be used when archiving historical results. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-16lib/buildstats: Improve error messageRichard Purdie
Just stating the recipe counts are different isn't helpful, showing the differences makes it much easier to understand what changed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-15runqemu: Make QB_MEM easier to setRobert Yang
It only could be set as the following in the past: QB_MEM = "-m 256" Now it also can be set as: QB_MEM = "-m 256M (or m)" QB_MEM = "256M (or m)" [YOCTO #11522] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-15runqemu: Let qemuparams override default settingsRobert Yang
Fixed: In meta/conf/machine/include/qemuboot-x86.inc: QB_CPU_x86-64 = "-cpu core2duo" $ runqemu qemux86-64 qemuparams="-cpu coreduo" Check /proc/cpuinfo, it should use coreduo rather than core2duo since user specifies it, but it doesn't, append qemuparams to the last can fix the problem. [YOCTO #11773] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-15wic/engine: Fix missing parted autobuilder failuresRichard Purdie
OE-Core rev: a88bcbae850a2e6d182291d3f8e167aabdbe4842 broke the ability to find parted as it may be in sbin which is not in PATH for some users on some distros. Iterate on the original patch to fix this and also fix the original problem. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-14wic/engine.py: Load paths from PATH environment variableWilliam Bourque
Load self.paths from environment variable and if it fails, fall back to hardcoded list. This is required for users that would need to load different e2fsprogs binaries if their system's ones are not recent enought Signed-off-by: William Bourque <wbourque@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-14scripts/lib/wic/engine: Fix cp's target path for ext* filesystemsLeonardo Augusto
Python subprocess' shell=True defaults to /bin/sh[1][2], which often refers to a POSIX-compliant shell. As the -e flag is not defined in the POSIX standard[3], some shells may interpret "-e" as the first argument to the echo command, causing the rest of the command line to fail. In this particular case, "echo -e 'cd {}'" is interpreted as "-e cd {}", which causes the first line of the command to fail, and causing cp to always place the source file in the filesystem's root. Replacing "echo -e" for a printf command makes this more portable. This issue only affects "wic cp" for ext* filesystems. [1] https://docs.python.org/2/library/subprocess.html [2] https://docs.python.org/3/library/subprocess.html [3] http://pubs.opengroup.org/onlinepubs/9699919799 Signed-off-by: Leonardo Augusto <leobsd@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-14checklayer: Avoid adding the layer if it is already presentRobert Yang
* Rename add_layer() to add_layers() so that add_layer_dependencies() can re-use it. * Avoid adding the layer if it is already present [YOCTO #13148] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-14yocto-check-layer-wrapper: Fix path for oe-init-build-envRobert Yang
We only could run it in top of oe-core dir since it assumed oe-init-build-env was in cwd, this patch fixes the problem. [YOCTO #13148] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-11oe-build-perf-report: Fix missing buildstats comparisionsRichard Purdie
Integers were being compared to strings leading to missing buildstats comparision data. Fix this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-11oe-build-perf-report: Improve branch comparision handlingRichard Purdie
When comparing branches, correctly filter the revisions corresponding to the specific branch specified. Also use the commit numbers as a way to gauge spatially related commits for comparision meaning comparisions for out of order build revisions becomes meaninful. This should improve the reporting for autobuilder generated builds. Also improve the branch option help text. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-08oe-build-perf-report: Allow commits from different branchesRichard Purdie
The code won't currently allow comparisions of two commits on different branches even if the commits are specified by their hashes. This updates the code to search two branches for any relavent commits, hence allowing comparisions to be made. A particularly useful case is master vs. master-next for example. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-08oe-build-perf-report: Allow branch without hostnameRichard Purdie
Allow the branch to be set without the hostname option. Previously if hostname wasn't set, branch would be overwritten regardless of whether it was set or not. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-05multilib_header_wrapper.h: Use #pragma onceKhem Raj
Avoid infinite include loops, especially with bits/wordsize.h which is now possible with the synthesized headers since we now also synthesize bits/wordsize.h itelf for some arches e.g. arm/aarch64 In cases where extra preprocessing tools are used such as clang-tidy e.g. and these tools are not passed the knowledge about architecture then case comes where we enter into header include loop for bits/wordsize.h, since this template does explicitly include bits/wordsize.h To fix this emits the pragma once at beginning of file, this is better solution than include guards, and pragma once is practically supported on all compilers except few e.g. cray c/c++ compiler Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-05send-error-report: Use https instead of http protocolKhem Raj
errors.yp.org can understand https Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-02devtool: add --all option to check-upgrade-statusRoss Burton
The default behaviour is to show just recipes needing upgrades, but for automated reports showing all recipes can be useful. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-31oe-git-proxy: Avoid resolving NO_PROXY against local filesJan Kiszka
NO_PROXY may contain * elements, and if we are unlucky (or want to match all hosts with *), we will pick up local files rather than doing the match in match_host. Quoting helps here. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-24devtool: add a command to print an overall list of recipes that can be updatedAlexander Kanavin
A sample portion of the output: $ devtool check-upgrade-status ... NOTE: acpid 2.0.30 2.0.31 Ross Burton <ross.burton@intel.com> NOTE: u-boot-fw-utils 2018.11 2019.01 Marek Vasut <marek.vasut@gmail.com> d3689267f92c5956e09cc7d1baa4700141662bff NOTE: u-boot-tools 2018.11 2019.01 Marek Vasut <marek.vasut@gmail.com> d3689267f92c5956e09cc7d1baa4700141662bff NOTE: u-boot 2018.11 2019.01 Marek Vasut <marek.vasut@gmail.com> d3689267f92c5956e09cc7d1baa4700141662bff NOTE: bind 9.11.5 9.13.5 Armin Kuster <akuster808@gmail.com> cannot be updated due to: 9.11 is LTS 2021 NOTE: iproute2 4.19.0 4.20.0 Changhyeok Bae <changhyeok.bae@lge.com> NOTE: ofono 1.25 1.27 Ross Burton <ross.burton@intel.com> NOTE: wpa-supplicant 2.6 2.7 Changhyeok Bae <changhyeok.bae@lge.com> NOTE: base-passwd 3.5.29 3.5.45 Anuj Mittal <anuj.mittal@intel.com> cannot be updated due to: Version 3.5.38 requires cdebconf for update-passwd utility NOTE: busybox 1.29.2 1.30.0 Andrej Valek <andrej.valek@siemens.com> NOTE: dbus-test 1.12.10 1.12.12 Chen Qi <Qi.Chen@windriver.com> NOTE: dbus 1.12.10 1.12.12 Chen Qi <Qi.Chen@windriver.com> NOTE: glib-2.0 2.58.0 2.58.3 Anuj Mittal <anuj.mittal@intel.com> NOTE: glib-networking 2.54.1 2.58.0 Anuj Mittal <anuj.mittal@intel.com> ... Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-21devtool: improve git repo checks before check_commits logicDan Dedrick
The check_commits logic assumes that both devtool-base and args.branch exist in the git repo that it is operating on. In order to prevent errors at that point it's best to first ensure that both of these refs actually exist. If they don't both exist then the check_commits logic should just be skipped, as it would be if the repo wasn't originally checked out by devtool. Previously if a user removed the args.branch branch from their devtool cloned repo this code would crash on adding the repo with -n. The crash would look like this: Traceback (most recent call last): File "/home/ddedrick/src/poky/scripts/devtool", line 344, in <module> ret = main() File "/home/ddedrick/src/poky/scripts/devtool", line 331, in main ret = args.func(args, config, basepath, workspace) File "/home/ddedrick/src/poky/scripts/lib/devtool/standard.py", line 812, in modify (stdout, _) = bb.process.run('git log devtool-base..%s' % branch, cwd=srctree) File "/home/ddedrick/src/poky/bitbake/lib/bb/process.py", line 178, in run raise ExecutionError(cmd, pipe.returncode, stdout, stderr) bb.process.ExecutionError: Execution of 'git log devtool-base..devtool' failed with exit code 128: fatal: ambiguous argument 'devtool-base..devtool': unknown revision or path not in the working tree. Use '--' to separate paths from revisions, like this: 'git <command> [<revision>...] -- [<file>...]' Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-21devtool: remove duplicate overridesDan Dedrick
DEVTOOL_EXTRA_OVERRIDES only needs one entry for each instance of overrides. Previous to these changes it would find every override to SRC_URI and add it to the list. This would duplicate instances where SRC_URI is modified multiple times with the same override like: SRC_URI_append_foo += "file://0001-foo.patch" SRC_URI_append_foo += "file://0002-bar.patch" A bbappend might also overwrite a SRC_URI override, which would also cause multiple instances to occur. When there are multiple instances of the same override in DEVTOOL_EXTRA_OVERRIDES it causes devtool modify to fail when creating override branches. The failure occurs when attempting to create the same override branch a second time and looks like this: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:devtool_post_patch(d) 0003: File: '/build/poky/meta/classes/devtool-source.bbclass', lineno: 202, function: devtool_post_patch 0198: 0199: for override in extra_override_list: 0200: localdata = bb.data.createCopy(d) 0201: if override in default_overrides: *** 0202: bb.process.run('git branch devtool-override-%s %s' % (override, devbranch), cwd=srcsubdir) 0203: else: 0204: # Reset back to the initial commit on a new branch 0205: bb.process.run('git checkout %s -b devtool-override-%s' % (initial_rev, override), cwd=srcsubdir) 0206: # Run do_patch function with the override applied File: '/build/poky/bitbake/lib/bb/process.py', lineno: 178, function: run 0174: if not stderr is None: 0175: stderr = stderr.decode("utf-8") 0176: 0177: if pipe.returncode != 0: *** 0178: raise ExecutionError(cmd, pipe.returncode, stdout, stderr) 0179: return stdout, stderr Exception: bb.process.ExecutionError: Execution of 'git branch devtool-override-foo devtool' failed with exit code 128: fatal: A branch named 'devtool-override-foo' already exists. Signed-off-by: Dan Dedrick <ddedrick@lexmark.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-20scripts/contrib/build-perf-test.sh: Remove itRichard Purdie
This is the older script which the code in lib/oeqa/buildperf replaces so delete the obsolete script to avoid confusion. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-20scripts/contrib/build-perf-test-wrapper.sh: Improve interaction with ↵Richard Purdie
autobuilder automation This tweaks the script to: * Ensure directories exist and can be written to * Allow the downloads directory to be specified * Error early if the phantomjs or optipng dependencies are not installed * Allow the location of the globalres.log file to be specified This means that the main build directory can be destroyed and any state from the script is stored elsewhere allowing it to be triggered automatically from the autobuilder infrastructure. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-16wic: sdimage-bootpart: Use mmcblk0 drive instead of bogus mmcblkAlexey Brodkin
Apparently either nobody ever used sdimage-bootpart.wks or fstab was kept untouched due to "--no-fstab-update" usage as some boards like IMX may have, see [1]. Otherwise addition of the following line to the target's fstab: ---------------------->8----------------- /dev/mmcblkp1 /boot vfat defaults 0 0 ---------------------->8----------------- gets us unusable target: ---------------------->8----------------- [* ] A start job is running for dev-mmcblkp1.device (23s / 1min 30s) [ TIME ] Timed out waiting for device dev-mmcblkp1.device. [DEPEND] Dependency failed for /boot. [DEPEND] Dependency failed for Local File Systems. You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, "systemctl default" or "exit" to boot into default mode. Press Enter for maintenance ---------------------->8----------------- Fix it with use of "mmcblk0" device name. [1] https://lists.yoctoproject.org/pipermail/meta-freescale/2018-February/022156.html Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Maciej Borzecki <maciej.borzecki@open-rnd.pl> Cc: Maciek Borzecki <maciek.borzecki@gmail.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-14wic: allow bitbake variables in kickstarter filesRasmus Villemoes
image_types_wic.bbclass has a mechanism for doing variable substitution on .wks files by simply letting the input file be called .wks.in. However, that doesn't allow using variables in files included via the include directive. This is unfortunate, because lacking either the ability to include other files or variable substitution leads to fragile and error-prone duplication between kickstarter files and recipes/configuration files used for various boards. This adds (somewhat naive) support for variable substitution in all files parsed by wic. The user should add all required variables to WICVARS to get them exported appropriately. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-07scripts/oe-git-archive: fix non-existent key referencing errorYeoh Ee Peng
Without installing gitpython package, oe-git-archive will face error below, where it was referencing key that was non-existent inside metadata object. Traceback (most recent call last): File "<poky_dir>/scripts/oe-git-archive", line 271, in <module> sys.exit(main()) File "<poky_dir>/scripts/oe-git-archive", line 229, in main 'commit_count': metadata['layers']['meta']['commit_count'], KeyError: 'commit_count' Fix this error by adding exception catch when referencing non-existent key (based on inputs provided by Richard Purdie). [YOCTO# 13082] Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-03runqemu-gen-tapdevs: Allow run --help without sudoRobert Yang
Then we can get user's UID and GID rather than hardcode to 1000, e.g.: - Without sudo $ runqemu-gen-tapdevs --help [snip] $ sudo ../poky/scripts/runqemu-gen-tapdevs 15220 100 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin [snip] - With sudo $ sudo ../poky/scripts/runqemu-gen-tapdevs --help [snip] $ sudo ../poky/scripts/runqemu-gen-tapdevs 15220 100 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin [snip] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-18scripts/distro: Remove as using obsolete APIs and need re-implementing sanelyRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-15runqemu: clean up subprocess usageRoss Burton
Where possible pass lists instead of strings, don't use a subshell, and call check*() instead of using Popen directly. Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-12-05patchreview: Various fixes/improvementsRoss Burton
Add various fixes and improvements including the ability to export patch statsitics as json data. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01scripts/runqemu: Improve lockfile handling for python with close_fd=TrueRichard Purdie
On python versions with close_fds=True (python 3.2 onwards), the tap device lockfile isn't passed to the child process. Since this guards against use of an active interface, we really want this here, so pass it in pass_fds. This means if the parent exits early, the child still holds the lock, avoiding messages like: runqemu - ERROR - Failed to run qemu: qemu-system-x86_64: could not configure /dev/net/tun (tap0): Device or resource busy Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01scripts/runqemu: Tidy up lock handling codeRichard Purdie
Various tweaks: - Balance up the aquire/release functions - Use debug messge for both acquiring and release message for consistency in logs - Use None instead of an empty string - Reset the value of the field if we don't have the lock any more Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01scripts/runqemu: Fix logic error causing failures with MACHINE from the ↵Richard Purdie
environment MACHINE=qemux86-64 oe-selftest -r runqemu.RunqemuTests.test_boot_machine_slirp_qcow2 fails yet oe-selftest -r runqemu.RunqemuTests.test_boot_machine_slirp_qcow2 with MACHINE in local.conf would work. It turns out that: runqemu slirp wic.qcow2 qemux86-64 works but: MACHINE=qemux86-64 runqemu slirp wic.qcow2 qemux86-64 does not. The reason are the misplaced return statements in runqemu, its skipping a block of logic when MACHINE is set in the environment when it shouldn't. Fix this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-27devtool: fix target-deploy --stripAdrian Freihofer
This is a fixup for: e1ba46109ea4be3d3b310abaf7f2da3c84a83930 devtool deploy-target --strip foo root@192.168.7.2 ended up with: Traceback (most recent call last): File "/home/user/bar_sdk/sysroots/x86_64-pokysdk-linux/usr/bin/ devtool", line 344, in <module> ret = main() File "/home/user/bar_sdk/sysroots/x86_64-pokysdk-linux/usr/bin/ devtool", line 331, in main ret = args.func(args, config, basepath, workspace) File "/home/user/bar_sdk/layers/poky/scripts/lib/devtool/ deploy.py", line 187, in deploy rd.getVar('base_libdir')) TypeError: strip_exbar() missing 1 required positional argument: 'd' Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16scripts: Remove deprecated imp module usageRichard Purdie
The imp module is deprecated, port the code over to use importlib as recently done for bb.utils as well. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16wic: bootimg-efi: add a title source parameterMing Liu
Sometimes the users might want to change the title showing on UEFI booting screen, so far it's hard-coded to 'boot'. There is not a easy way to customize it in current design, I tried firstly with '--configfile', but that does not work with --use-uuid, since the later option will generate a UUID and write it to boot config, only when the former option is not enabled. So a new source parameter 'titile' is added in this patch, it defaults to 'boot' to be consistent with the original title. Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16oepydevshell-internal.py: decode only when readdata is validChangqing Li
fix below problem: pydevshell raises exception when maximize the python shell window. when click maximize, rlist of select return ready object, but the pty.read is None, so throw exception of 'NoneType' object has no attribute 'decode', change to only decode when readdata is valid. [YOCTO #11875] Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-16checklayer: generate locked-sigs.inc under builddirChangqing Li
yocto-check-layer will find locked-sigs.inc under builddir, but locked-sigs.inc is generated under current bitbake working dir. if run yocto-check-layer outside builddir, we will met error like "No such file or directory: *locked-sigs.inc". change to run bitbake -S under builddir to fix this problem. [YOCTO #12973] Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-13scripts/autobuilder-worker-prereq-tests: Shore up qemu testingMichael Halstead
Check that yocto-autobuilder-helper has been cloned to the correct location. Check that vnc is running using the same script the autobuilder does. Set the DISPLAY enviroment variable to :1 the same way we do when building normally. Make the VM's serial console available so we can log in and power off allowing the tests to continue. Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-13scripts/runqemu: Replace subprocess.run() for compatibiltyMichael Halstead
subprocess.run() was introduced in Python 3.5. We currently support down to Python 3.4 so I've replaced it with subprocess.check_call() which is available in that version. Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-13scripts/runqemu: Add serialstdio modeRichard Purdie
Its currently not possible to have a console available whilst using qemu in graphics mode. This is causing some issues for testing autobuilder bringup so all a "serialstdio" mode to runqemu to accomodate this. The existing serialstdio internal variable is renamed to allow the new user visible option. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-06scripts/autobuilder-worker-prereq-tests: adjust max_user_watchesMichael Halstead
Temporarily modify path to run as non-privileged user on more distros. Change the recommended value to match what we use on the autobuilder. Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-06wic: use explicit errno importRoss Burton
os.errno doesn't work in Python 3.7 and shouldn't have ever worked, so use import errno explicitly. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-06oe-init-buildenv/base: Relax python version checks in favour of HOSTTOOLS ↵Richard Purdie
manipulation Several distros are now shipping "python" as python v3 contra to the original python guidelines. This causes users confusion/pain in trying to use our tools. We can just force "python" to "python2" within HOSTTOOLS to avoid this issue and hide the complexity from the user. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>