summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* logging: use warning instead warnChen Qi2019-04-2513-42/+42
| | | | | | | | | | | | | | | | | The warn method is deprecated. We should use the documented warning instead. Quoting from the python's official doc: """ Note: There is an obsolete method warn which is functionally identical to warning. As warn is deprecated, please do not use it - use warning instead. """ (From OE-Core rev: cc771aa4b74f222f1bea38b0b50196b2fbc97ab4) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: use explicit errno importRoss Burton2019-04-251-4/+5
| | | | | | | | | | | | os.errno doesn't work in Python 3.7 and shouldn't have ever worked, so use import errno explicitly. (From OE-Core rev: 7b1dba1a464862e35295756ecf52b24d0962528b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/engine: Fix missing parted autobuilder failuresRichard Purdie2019-04-251-3/+5
| | | | | | | | | | | | | | | | 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. (From OE-Core rev: af3803e5189d7814f9dbd238fb6dab200f351e1a) (From OE-Core rev: 68f56a4967d3121940669ca9116e759081b0b73b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/engine.py: Load paths from PATH environment variableWilliam Bourque2019-04-251-2/+7
| | | | | | | | | | | | | | | | | 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 (From OE-Core rev: a88bcbae850a2e6d182291d3f8e167aabdbe4842) (From OE-Core rev: c8331fa157b83a3ed77f77a6e884c7fbc4f1d91b) Signed-off-by: William Bourque <wbourque@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/lib/wic/engine: Fix cp's target path for ext* filesystemsLeonardo Augusto2019-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (From OE-Core rev: 9a5b703d4e60c3ccdf80b5289b8e6fc91133fcde) (From OE-Core rev: b9ccf44edccd31264890fa790d6120fc9e2c0238) Signed-off-by: Leonardo Augusto <leobsd@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: search nonarch STAGING_DATADIR for multilibKai Kang2019-04-251-1/+9
| | | | | | | | | | | | | | | | | | | | It fails to build multilib image such as lib32-core-image-minimal with wic by set 'IMAGE_FSTYPES = "wic"': | ERROR: Couldn't find correct bootimg_dir, exiting When multilib is enabled, STAGING_DATADIR is expanded with MLPREFIX. But dependencies of images such as syslinux is still populated to nonarch STAGING_DATADIR. Search nonarch STAGING_DATADIR to fix the error. (From OE-Core rev: 6f53c61dd989045a7075b678c7030421d715bc16) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: make engine.py:get_partitions() resilient to parted/dmidecode stderr outputGeoff Parker2019-04-251-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Running wic commands on Debian 10 systems fail in scripts/lib/wic/engine.py:get_partitions() due to new stderr output captured when trying to parse the output from /sbin/parted as a non-root user. The parted command calls the dmidecode utility, which produces this error as a non-root user: /sys/firmware/dmi/tables/smbios_entry_point: Permission denied /dev/mem: Permission denied scripts/lib/wic/engine.py:get_partitions() calls misc.py:exec_cmd(), a subprocess wrapper which returns a combined stderr and sdtdout. These messages to stderr confuse the partition table parser in get_partitions(). This patch has the partition table parser ignore lines before the expected "BYT;" header string. Running wic in Debian 9 does not have this issue. (From OE-Core rev: 6b5681533eed4e6c00e1cc7ee442c93076f1c976) Signed-off-by: Geoff Parker <geoffhp@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/wic: Be consistent about how we call bitbakeRichard Purdie2019-04-251-11/+5
| | | | | | | | | | | | | | Whilst its tempting to call bitbake_main(), the script also directly executes bitbake. By doing both this creates all kinds of races. Therefore change to use subprocess execution in all cases. (From OE-Core rev: 0507ec4c6069490c9a503e9e2b65f0e7b1962d34) (From OE-Core rev: 2f2d52a958d3e9d511a2f5b8b14ed46466dd0d23) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Support for changing the imager.Davis, Michael2019-04-252-1/+3
| | | | | | | | | | (From OE-Core rev: 30b33d787595b8c3120b73c755a432a0f0f30fa7) Signed-off-by: Michael Davis <michael.davis@essvote.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/manualexecution: Refactor and simplify codebaseYeoh Ee Peng2019-04-251-36/+20
| | | | | | | | | | | | Simplify and removed unnecessary codes. Refactor to allow pythonic loop. (From OE-Core rev: 77ede7cbb7da2ed1b01d11441edcbd7dedad9b9a) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/manualexecution: Fixed step sorted by integerYeoh Ee Peng2019-04-251-1/+1
| | | | | | | | | | | | | | | Currently the manual execution display step by sorting the step as string, where steps were not being sorted correctly when there are more than 9 steps. Fixed the step sorting by sorting step as integer. (From OE-Core rev: 1e5fba51f022a9320e72b6df753a02bfc1732af8) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/manualexecution: Enable display full steps without press enterYeoh Ee Peng2019-04-251-2/+3
| | | | | | | | | | | | | | Current manualexecution required pressing enter button to show each step information, where this was wasting execution time. Enable display full steps without needing to any press enter button. (From OE-Core rev: c833aba64f26546894a0c58d8a59db75d18e2ff7) Signed-off-by: Mazliana <mazliana.mohamad@intel.com> Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/manualexecution: Standardize input checkYeoh Ee Peng2019-04-251-2/+2
| | | | | | | | | | | | | Current input checking does not match the standard input practiced by QA team. Change the input checking to match the standard input practiced by the QA team. (From OE-Core rev: 6eb041fd930a3731743cc715eb8d73b045cf8932) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool: Allow extraction of ptest dataRichard Purdie2019-04-252-9/+32
| | | | | | | | | | | | | | | Rather than simply discarding the ptest data, change the code to discard it when writing out the new testresult files, or optionally either preserve it, or write it as seperate discrete logs. This means the autobuilder should start writing out individual ptest log files as well as allowing ueers to extract these manually. (From OE-Core rev: 08c5471c5abd95616af8df862e96072d022a6f42) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool: Allow store to work on single filesRichard Purdie2019-04-251-9/+12
| | | | | | | | | | | | Store operations using a single file as a source weren't working as the os.walk command didn't like being given a single file. Fix the store operation to work for single files. (From OE-Core rev: 639598aa855df523e3dd1f8df1b0eacfa7fb13d6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool: Enable report for single result fileYeoh Ee Peng2019-04-251-10/+0
| | | | | | | | | | | | | | | Current validation check function inside resulttool disallow the report for single result file although the underlying library was able to handle both directory and file as source input to report. Removed the validation check as it was no longer needed and to enable report for single result file. (From OE-Core rev: 69ccfb9f978382f935c4d0609e09e00aab327188) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-build-perf-report/gitarchive: Move common useful functions to libraryRichard Purdie2019-03-261-80/+10
| | | | | | | | | | | These functions can be reused by the resulttool code so move to the common function library for this purpose. (From OE-Core rev: c66f848938c04e133259c5b6903dc592866ab385) (From OE-Core rev: 94a3ca85d30fc957f8f01a216a75342be49f9143) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-git-archive: Separate out functionality to library functionRichard Purdie2019-03-261-160/+6
| | | | | | | | | | | | | 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. (From OE-Core rev: 4820ca2b0850e29b04a4fd5659a6e9837d6714d0) (From OE-Core rev: ab5d49ba8bb02410fb9f3024f98ff19a04acb3ca) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-build-perf-report: Fix missing buildstats comparisionsRichard Purdie2019-03-261-2/+2
| | | | | | | | | | | Integers were being compared to strings leading to missing buildstats comparision data. Fix this. (From OE-Core rev: 2dbbf598192ae2b3aa488df042f56aa6c6634a00) (From OE-Core rev: e8651b2e01db0777b23a0359f9413c3b27bae77f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-build-perf-report: Improve branch comparision handlingRichard Purdie2019-03-261-8/+23
| | | | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 9f6f4ab6eec9dca07af7f53da5f737a6167bfb38) (From OE-Core rev: d6645c4c931565d62df85db0fa71f15d51265828) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-build-perf-report: Allow commits from different branchesRichard Purdie2019-03-261-0/+5
| | | | | | | | | | | | | | | 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. (From OE-Core rev: 2d835bb1570c515ae501442f3ce19fae8e249b27) (From OE-Core rev: c6351550a9bff3e0b0e3d3c0baefed4041c47b33) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-build-perf-report: Allow branch without hostnameRichard Purdie2019-03-261-2/+2
| | | | | | | | | | | | 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. (From OE-Core rev: 3ec43bf4c6c8f7730a67f63ad4e14903f289014e) (From OE-Core rev: e95277e859adb3e3ca26c8c618954ae52ec3bff4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/manualexecution: To output right test case idMazliana2019-03-261-9/+6
| | | | | | | | | | | | | | We found that manualexecution does not capture test suite values correctly if there are more than one test suite in test cases. After verification has made we found out we should retrieved full test cases value <test_module.test_suite.test_case> from oeqa/manual/ json file rather than split it them into new variables test_suite and test_cases. (From OE-Core rev: d1dee26b13dd565bf06307c99b02f6d57ff0ddef) Signed-off-by: Mazliana <mazliana.mohamad@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/report: Enable roll-up report for a commitYeoh Ee Peng2019-03-261-3/+13
| | | | | | | | | | Enable roll-up all test results belong to a commit and to provide a roll-up report. (From OE-Core rev: 8f23018bcb76c1b431f69183f993f08adb660fae) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/resulttool: Enable manual result store and regressionYeoh Ee Peng2019-03-262-19/+26
| | | | | | | | | | | | | | | To enable store for testresults.json file from manualexecution, add layers metadata to configuration and add "manual" map to resultutils.store_map. To enable regression for manual, add "manual" map to resultutils.regression_map. Also added compulsory configurations ('MACHINE', 'IMAGE_BASENAME') to manualexecution. (From OE-Core rev: 514a9165790dda2afb412c519cb1444493dff1f9) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/regression: Ensure regressoin results are sortedYeoh Ee Peng2019-03-261-4/+4
| | | | | | | | | Sorted regression results to provide friendly viewing of report. (From OE-Core rev: de222c3c9e3aa34e42e1ad6ba6cbb9e1a18ccd80) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/store: Fix missing variable causing testresult corruptionRichard Purdie2019-03-261-1/+1
| | | | | | (From OE-Core rev: 811d2be3cef340ee945335552892a2a49a46bf4b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/report: Ensure ptest results are sortedRichard Purdie2019-03-261-1/+1
| | | | | | (From OE-Core rev: f182217970029ba0260df3c3089101352da083ce) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/report: Ensure test suites with no results show up on the reportRichard Purdie2019-03-261-5/+8
| | | | | | | | | ptest suites with no results don't show up on the reports even though we have a duration for them. Fix this so the fact they report no tests is visible. (From OE-Core rev: a61ad19d5f997cb2377ca307c94ca2d53f8c0c49) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/report: Handle missing metadata sections more cleanlyRichard Purdie2019-03-261-3/+6
| | | | | | | | | Currently some older results files cause the code to give tracebacks. Handle these missing sections more cleanly. (From OE-Core rev: 829754c380ca2b614afa23500e53a8c5b850932f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/store: Handle results files for multiple revisionsRichard Purdie2019-03-261-16/+23
| | | | | | | | | Currently we cant store results if the results files span multiple different build revisons. Remove this limitation by iterating. (From OE-Core rev: 22a5982dbcb624ffcdbacef92b2a235851214663) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool/resultutils: Avoids tracebacks for missing logsRichard Purdie2019-03-261-1/+2
| | | | | | (From OE-Core rev: d5d62b31b192b88c6a829099b74bfb30583b066e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool: Improvements to allow integration to the autobuilderRichard Purdie2019-03-269-450/+482
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 (From OE-Core rev: e4195565d2a50046d4378c97f7a593c41bed51bd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/resulttool: enable manual execution and result creationMazliana2019-03-262-0/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: cd2ef260569a67907801299b1397db94aa871cb5) Signed-off-by: Mazliana <mazliana.mohamad@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* resulttool: enable merge, store, report and regression analysisYeoh Ee Peng2019-03-268-0/+688
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: bb0bc6368bb51ac0be77d13fe931601d493951ea) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu-gen-tapdevs: Allow run --help without sudoRobert Yang2019-02-251-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 446e7da7e56f9de3602498b5ef40e9e0f8f71837) (From OE-Core rev: e5bebaddab47b418013f3d329dbb105ce69118bf) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: clean up subprocess usageRoss Burton2019-02-251-34/+29
| | | | | | | | | | | | | | Where possible pass lists instead of strings, don't use a subshell, and call check*() instead of using Popen directly. (From OE-Core rev: d2374623444752af1ad748ed36b68ea58f629bf6) (From OE-Core rev: a2cbc5954d44b0922136fc3d75f891064a948298) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/oe-git-archive: fix non-existent key referencing errorYeoh Ee Peng2019-02-251-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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] (From OE-Core rev: 9a3cc9b8523b78dda6c3f3f2e12798b2b907d7e5) (From OE-Core rev: 89dcc555f57ce13645c3876b42be3846fe3b7863) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: Improve lockfile handling for python with close_fd=TrueRichard Purdie2018-12-161-1/+4
| | | | | | | | | | | | | | | | | 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 (From OE-Core rev: 17a0a067d597c445c5892ff9914e91a2187f7e09) (From OE-Core rev: d3b3c55ddc312039380ce8e23e68dd8bb2439388) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: Tidy up lock handling codeRichard Purdie2018-12-161-7/+9
| | | | | | | | | | | | 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 (From OE-Core rev: d3c052e6ccd81d544b23a3bee80ba00cafaedbbd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* scripts/runqemu: Replace subprocess.run() for compatibiltyMichael Halstead2018-12-161-2/+2
| | | | | | | | | | | 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. (From OE-Core rev: 1c61f3017a6a2d95747883c722c376763ec77c9d) Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: isoimage-isohybrid: fix UEFI spec breakageIoan-Adrian Ratiu2018-11-241-4/+6
| | | | | | | | | | | | | | | | | It's really good that OE supports multiple EFI_PROVIDERs and that commit 9a1709278de87 ("wic: isoimage-isohybrid: use grub-efi from deploy dir") makes re-use of the grub-efi built image, but we should still respect the standard otherwise the ISO will not boot, so install grub images as boot[x64|ia32].efi not ${PN}-boot[x64|ia32].efi. (From OE-Core rev: 1608129692d92c239b5fb9244b649a32b9009254) (From OE-Core rev: ce1815374254d1f23556b7fe2e46aa0e676d8d1a) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: fix handling of SIGTERM and the problem of line wrappingChen Qi2018-10-181-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | The current handling of SIGTERM is incorrect as the process pid returned by Popen call with shell setting to True is actualy the shell instead of the qemu process. So use shlex to split cmd so that we can avoid using shell=True. This ensures the child process is the actual qemu process. Also, as we install a SIGTERM handler, we need handle the situation of qemu terminated by SIGTERM, otherwise we will get ERROR message in such case. Besides, we have a problem that after running qemu, the terminal's behavior is incorrect regarding long lines or long commands. Long commands or long outputs should appear in multiple lines, but they appear in the same line, overriding previous output. Use `tput smam' to fix this problem. (From OE-Core rev: e8acef383767cfd1ef0c3d3c45d9d6eb1c83b3e7) (From OE-Core rev: a2ee5c8a1ff449250e6f37fccf01b85a7361b24c) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: exit gracefully with an error message if qemu system is not evaluatedJagadeesh Krishnanjanappa2018-10-181-0/+5
| | | | | | | | | | | | | | | | | | | It solves below error: -- snip -- return 'qemu-system-%s' % qbsys UnboundLocalError: local variable 'qbsys' referenced before assignment -- snip -- [YOCTO #12846] (From OE-Core rev: 519273f54c0b8a6fff36afeb7646d8e37717be22) (From OE-Core rev: bc030c9f5af4af5a8bad48bc8beca9324a65d25b) Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: add SIGTERM handler to make sure things are cleaned upChen Qi2018-10-181-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add SIGTERM handler so that runqemu could clean things up correctly when receving such signal. This problem was originally observed when running testimage. On some hosts, after running testimage task, the user has to manually operate on the tap interface (e.g. `sudo ip link del tap0') in order for the next runqemu command to launch successfully. The problem is about runqemu, SIGTERM and network manager on the host. In testimage task, the runqemu process will receive SIGTERM. In such situation, its cleanup() function is not run, resulting in tap interface not cleaned up. On some hosts, the network manager will bring down the tap interface automatically, thus this problem. I saw this problem on Fedora21. I think we'd better just clean up the tap interface ourselves. So this patch adds to runqemu a SIGTERM handler, in which the actual qemu process is terminated and other things cleaned up. (From OE-Core rev: 02709d4709c56f9b9095e3555da35b659b03a8a3) (From OE-Core rev: 05c2a590980819e31acee29e1e7282d2ed3586b7) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* checklayer: avoid recursive loop in add_layer_dependenciesNicolas Dechesne2018-10-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Layer A and Layer B depend on each other, then we will end up in a recursive loop in function recurse_dependencies(). To avoid such situation before making the recursive function call we check whether or not we have already processed this layer. e.g. without this patch, running this script on layers with dependency loops, we are seeing: $ yocto-check-layer -d /srv/work/oe/meta-openembedded/ INFO: Detected layers: INFO: meta-python: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-python INFO: meta-filesystems: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-filesystems INFO: meta-gnome: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-gnome INFO: meta-xfce: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-xfce INFO: meta-networking: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-networking INFO: meta-initramfs: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-initramfs INFO: meta-oe: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-oe INFO: meta-multimedia: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-multimedia INFO: meta-perl: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-perl INFO: meta-webserver: LayerType.SOFTWARE, /srv/work/oe/meta-openembedded/meta-webserver INFO: INFO: Setting up for meta-python(LayerType.SOFTWARE), /srv/work/oe/meta-openembedded/meta-python DEBUG: Processing dependencies core openembedded-layer for layer meta-python. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. DEBUG: Processing dependencies core networking-layer for layer meta-oe. DEBUG: Processing dependencies core openembedded-layer meta-python for layer meta-networking. ... ... ... [keep repeating] This patch fixes this situation. (From OE-Core rev: 759290ed5fedc1ce10639b3584d4532d688ea714) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 171900b4bcb06416685ce90b63114a10fefe0b94) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemux86-directdisk: remove mem= parameterAnuj Mittal2018-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | Remove usage of a specific amount of memory and let it be controlled by users. This was the default behaviour before it was changed by commit 3b79d9a78 that switched the wks file to be used for qemux86. Also fixes the bitbake parsing issues seen because of memory starvation using build appliance images. Fixes [YOCTO #12894] (From OE-Core rev: 18d6b668c52dc881cff7b107420e0de527eecce4) (From OE-Core rev: a53026f03a1d07cef1d1590c689e036f3ee21026) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* mkefidisk: fix installation of kernel imageChong Yi Chai2018-10-101-2/+10
| | | | | | | | | | | | | Kernel image can be 'vmlinuz' for 'bzImage' but the script is written to support 'vmlinuz' only. When building with meta-intel on sumo branch, the kernel image is now bzImage and the installation will fail. Add option to install bzImage as well. (From OE-Core rev: a702a5efdaece4197ceefec2a3b4c1e872e82f11) Signed-off-by: Chong Yi Chai <chong.yi.chai@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/qemux86: don't pass ip parameter to kernel in wksAnuj Mittal2018-08-291-1/+1
| | | | | | | | | | | | | | | | Images that rely on dhcp being used won't have network setup properly otherwise. Fixes [YOCTO #12804] (From OE-Core rev: fb4dd04f65ea78890c1102424765056d93e6ca65) (From OE-Core rev: ab3b00990434adc4fafc15379e1c2d8d0ed5f145) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* multilib_header: recognize BPF as a targetDaniel Díaz2018-08-161-1/+3
| | | | | | | | | | | | | | When building with `clang -target bpf` using the multilib_header, a recursion was unavoidable because bits/wordsize.h would #include itself, still lacking a definition for __MHWORDSIZE or __WORDSIZE. (From OE-Core rev: 70b41b3c335a80b4ac243f468f22331d261299db) (From OE-Core rev: b4738c5cf68a3a5d38dcd42f5b8361378f247db0) Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>