summaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2019-04-09pkgdata.py: avoid target-sdk-dummy-provides to mess things upChen Qi
Sometimes we meet the following failure for the test_lookup_recipe test case. AssertionError: 'zlib\nbusybox is in the RPROVIDES of target-sdk-provid[32 chars]ummy' != 'zlib\nbusybox' zlib + busybox- busybox is in the RPROVIDES of target-sdk-provides-dummy: - target-sdk-provides-dummy This is because target-sdk-provides-dummy rprovides busybox. So clean things up to avoid failure. (From OE-Core rev: 7b5a069d4f11e36a1c407c4212aba5aafaf4ee7f) 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>
2019-04-09oeqa/manual/toaster: updated test id namingYeoh Ee Peng
All test id (eg. @alias) inside manual testcase file shall follow the same test id naming convention from oeqa automated tests (eg. selftest, runtime, sdk, etc), where the test id consists of <test_module>.<test_suite>.<test_function>. Furthermore, there shall be only 1 unique test_module per each manual testcases file, where test_module match the file name itself. This file was using test_module name that does not match the file name itself. Fixed test_module name as well as the test_suite name. (From OE-Core rev: ebb3076c847c379d8c620d14927f696302fc4f26) 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>
2019-04-09oeqa/manual/toaster: transfer manual toaster test cases to oeqaYeoh Ee Peng
As part of the solution to replace Testopia, manual test cases need to be migrated to OEQA. These manual test case json files will serve two use cases. Use case#1: as input to the future commandline-based manual test runner script, where this script will display actions and expected result information in user friendly text, then it will capture user input for test result and log, finally it will write test result and log into existing standardize test result json format from OEQA framework for automated tests. Use case#2: QA will open and read these json file manually for planning manual test execution. Any reader interested in understanding manual test cases will open and read these files. (From OE-Core rev: 498f84fee3c85227ffb8dba9723c2acec00e03bd) 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>
2019-04-09oeqa/manual/kernel-dev.json: test id updatedsangeeta jain
All test id (eg. @alias) inside manual testcase file shall follow the same test id naming convention from oeqa automated tests (eg. selftest, runtime, sdk, etc), where the test id consists of <test_module>.<test_suite>.<test_function>. Furthermore, there shall be only 1 unique test_module per each manual testcases file. This file was using more than 1 unique test_module for testcases. Furthermore, some of the testcases were defined using different test_suite where it was not needed. This patch fix the manual testcases file to have only 1 unique test_module as well as test_suite to simplify test id naming. (From OE-Core rev: 879f5aeac3ca4d053347e5a86a6c0fb303cf0dc3) Signed-off-by: sangeeta jain <sangeeta.jain@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>
2019-04-09oeqa/manual/compliance-test.json: test id updated and missing test cases addedsangeeta jain
Two changes made in oeqa/manual/compliance-test.json: 1. All test id (eg. @alias) inside manual testcase file shall follow the same test id naming convention from oeqa automated tests (eg. selftest, runtime, sdk, etc), where the test id consists of <test_module>.<test_suite>.<test_function>. Furthermore, there shall be only 1 unique test_module per each manual testcases file. This file was using more than 1 unique test_module for testcases. Furthermore, some of the testcases were defined using different test_suite where it was not needed. This patch fix the manual testcases file to have only 1 unique test_module as well as test_suite to simplify test id naming. 2. Added 2 missing test cases for Beaglebone Stress Test. (From OE-Core rev: 2af492e8b34e59fc58fe267da05f0868cb13ea0f) Signed-off-by: sangeeta jain <sangeeta.jain@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>
2019-04-09oeqa/manual/bsp-hw.json: test id updated and obsolete test cases removedsangeeta jain
Two changes made in oeqa/manual/bsp-hw.json: 1. All test id (eg. @alias) inside manual testcase file shall follow the same test id naming convention from oeqa automated tests (eg. selftest, runtime, sdk, etc), where the test id consists of <test_module>.<test_suite>.<test_function>. Furthermore, there shall be only 1 unique test_module per each manual testcases file. This file was using more than 1 unique test_module for testcases. Furthermore, some of the testcases were defined using different test_suite where it was not needed. This patch fix the manual testcases file to have only 1 unique test_module as well as test_suite to simplify test id naming. 2. As per review by Intel and Windriver team, 7 testcases were found obsolete. Removed 7 testcases. (From OE-Core rev: cfadaf037788f59dce84d569abaf3b1fb2d78824) Signed-off-by: sangeeta jain <sangeeta.jain@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>
2019-04-09oeqa/manual/bsp-hw.json: add non-IA testsMazliana
QA team found that 10 manual bsp test cases from Testopia for Beaglebone, EdgeRouter, and MPC need to be up streamed [YOCTO #12650] (From OE-Core rev: f86542369fc5aabe4376e66b282981f35d437d5d) Signed-off-by: Mazliana <mazliana.mohamad@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>
2019-04-09oeqa/manual/sdk.json: Updated toolchain tarball to core-image-satosangeeta jain
Manual test step for SDK is updated. Previously toolchain was "poky-glibc-x86_64-core-image-sato-sdk<type-arch>-toolchain-<release-version>.sh" But toochain for core-image-sato-sdk is not available in releases after 2.1, hence changed it to "poky-glibc-x86_64-core-image-sato-<type-arch>-toolchain-<release-version>.sh Other less significant update is to add exepcted result in intermediate test steps. (From OE-Core rev: 88f9b2c5f86b05b42ae6429a5f74fa2f8b66e8ab) Signed-off-by: sangeeta jain <sangeeta.jain@intel.com> "poky-glibc-x86_64-core-image-sato-<type-arch>-toolchain-<release-version>.sh" 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>
2019-04-09oeqa/manual: Add manual runtime 'compliance' testcases to jsonSudhir Sharma
Added json file for compliance test cases to the manual runtime tests (From OE-Core rev: ff596eb0f0e84decdb5addadd3f1f16d62c25401) Signed-off-by: Sudhir Sharma <sudhirx.sharma@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>
2019-03-26oeqa/utils/gitarchive: Handle case where parent is only on originRichard Purdie
The parent code currently assumed that any parent branch is locally checked out which may not be the case. Use the local branch by default but fall back to the origin. This also means removing the later saftey check as the branch may not exist locally. This fixes the autobuilder resulttool test pushing code. (From OE-Core rev: 36624a17d382d84647c5811134fe76251fd64dc3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-26resulttool: 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 (From OE-Core rev: b4513e75f746a0989b09ee53cb85e489d41e5783) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-26resulttool: 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] (From OE-Core rev: 39cda3498ec68b91a671ead256231324d74f7d4c) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-25oe-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. (From OE-Core rev: c66f848938c04e133259c5b6903dc592866ab385) (From OE-Core rev: 4b1bd35030c5502873106782a35c4f5a9446e20c) 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>
2019-02-25scripts/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. (From OE-Core rev: 4820ca2b0850e29b04a4fd5659a6e9837d6714d0) (From OE-Core rev: e47c48768a01191ec36b9732288e05c9f5e80d52) 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>
2019-02-25logrotate.py: restore /etc/logrotate.d/wtmpMingli Yu
During the test logrotate.LogrotateTest.test_1_logrotate_setup, there is below logic: # mkdir $HOME/logrotate_dir # sed -i "s#wtmp {#wtmp {\n olddir $HOME/logrotate_dir#" /etc/logrotate.d/wtmp After all logrotate.LogrotateTest finished, only cleanup $HOME/logrotate_dir as below, but don't restore the config file /etc/logrotate.d/wtmp. [snip] def tearDownClass(cls): cls.tc.target.run('rm -rf $HOME/logrotate_dir') [snip] That's to say, there is one additional line added to /etc/logrotate.d/wtmp and will make the logrotate service start failed when run systemd.SystemdBasicTests.test_systemd_failed Take an example as below when run test as root: # cat /etc/logrotate.d/wtmp # no packages own wtmp -- we'll rotate it here /var/log/wtmp { olddir /root/logrotate_dir missingok monthly create 0664 root utmp minsize 1M rotate 1 } # ls /root/logrotate_dir ls: cannot access '/root/logrotate_dir': No such file or directory # systemctl start logrotate Job for logrotate.service failed because the control process exited with error code. See "systemctl status logrotate.service" and "journalctl -xe" for details. # systemctl status logrotate logrotate.service - Rotate log files Loaded: loaded (/lib/systemd/system/logrotate.service; static; vendor preset> Active: failed (Result: exit-code) since Wed 2019-02-13 03:35:19 UTC; 7s ago Docs: man:logrotate(8) man:logrotate.conf(5) Process: 540 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=1/FAILURE) Main PID: 540 (code=exited, status=1/FAILURE) Feb 13 03:35:18 qemumips systemd[1]: Starting Rotate log files... Feb 13 03:35:19 qemumips logrotate[540]: error: wtmp:9 error verifying olddir path /root/logrotate_dir: No such file or directory Feb 13 03:35:19 qemumips logrotate[540]: error: found error in file wtmp, skipping Feb 13 03:35:19 qemumips systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE Feb 13 03:35:19 qemumips systemd[1]: logrotate.service: Failed with result 'exit-code'. Feb 13 03:35:19 qemumips systemd[1]: Failed to start Rotate log files. Add the logic to restore /etc/logrotate.d/wtmp to make the cleanup complete to fix the above issue. (From OE-Core rev: a2db9320d97d12d87524ff16a329f9c38a8da33f) (From OE-Core rev: 9036f78bdfde1d79af6ce57db78e2cdff9fb5677) Signed-off-by: Mingli Yu <Mingli.Yu@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>
2019-02-25oeqa/runtime/ptest: Ensure OOM errors are loggedRichard Purdie
Currently processed being killed by the OOM killer may not be spotted by ptest-runner. After we complete the tests, check the logs and report if there were any. This ensures the user is aware of OOM conditions affecting the ptest results. (From OE-Core rev: 20a441d53817f80e0ce1597e77f6e794422ac49a) (From OE-Core rev: f922970b119849bcdd7f7df74bd2029816ff637c) 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>
2019-02-25oeqa/logparser: Various misc cleanupsRichard Purdie
Get rid of further unneeded code complications: * value mappings we could just direct use * ftools when we can write files easily ourself * test result status filtering we don't use * variable overwriting module imports (From OE-Core rev: d6065f136f6d353c3054cc3f440a4e259509f876) (From OE-Core rev: ba944a72302fa088c31c7b1eee4ad9f64f9769e4) 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>
2019-02-25oeqa/logparser: Improve results handlingRichard Purdie
Merge the results handling into the ptest log parser as a seperate method. Drop the weird "pass.skip.fail." prefix to the results filename, its just bizarre. Drop the code turning a list into a regex then searching the regex for an item, "x in y" is perfectly capable. Use a dict, sort the keys as needed and drop the list sorting code. (From OE-Core rev: f317800e950b4a37b4034133bc52e0c47f04dc29) (From OE-Core rev: 966ffaada3e9f43a25b1361c53d4b16a521aa517) 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>
2019-02-25oeqa/utils/logparser: Add in support for duration, exitcode and logs by sectionRichard Purdie
Allow parsing of the ptest duration, exit code and timeout keywords from the logs, returning data on each section. Also include the logs broken out per section. (From OE-Core rev: a9a67dccaa5be0f06eedcab46dcff7cbf9202850) (From OE-Core rev: dc49021f75ed7e82713d1c9a04e045718bb9a548) 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>
2019-02-25oeqa/logparser: Reform the ptest results parserRichard Purdie
Now we have a dedicated ptest parser, merge in the remaining ptest specific pieces to further clarify and simplify the code, moving to a point where we can consider extending/enhancing it. (From OE-Core rev: 05991bb5bc8018275d03fdeecee3d5a757840c7c) (From OE-Core rev: e514c34195a7e1b2b7a1916ebd8c8ef631c60a01) 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>
2019-02-25oeqa/logparser: Further simplification/clarificationRichard Purdie
Rename the paster to be ptest specific and apply some further cleanups to the code to simplify and clarify what its doing. (From OE-Core rev: 45a5886f1ec458d4c306b8d68fd31d568bc36b47) (From OE-Core rev: a4187e32f2cf90c0c7a155bef29fe558cea1edd9) 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>
2019-02-25oeqa/utils/logparser: Simplify ptest log parsing codeRichard Purdie
logparser is only used by ptest. Its slightly overcomplicated as it was intended to be reusable but wasn't. Simplify it as a dedicated parser is likely to me more readable and maintainable. (From OE-Core rev: c7478345b2b4a85cb1fec40e762633871f0e94cb) (From OE-Core rev: 1a6fcc97f3842deed3e78ededa8a21da274c0572) 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>
2019-02-25oeqa/runtime/ptest: Avoid traceback for tests with no sectionRichard Purdie
Some tests end up without a section, avoid tracebacks trying to use None as a string in that case. (From OE-Core rev: 86fb5d898a29761f120c2eaa538a32cf2e078487) (From OE-Core rev: fca18914013b2f05b36e6985a7ff4a7c8dddf8a5) 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>
2019-02-25selftest/wic: update test case test_qemuKai Kang
This test case boots the image in qemu and checks for mounted partitions. But the outputs of mount are different between sysvinit and systemd: sysvinit: /dev/root /\r\n/dev/sda1 /boot\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt systemd: /dev/sda1 /boot\r\n/dev/sda2 /\r\n/dev/sda3 /media\r\n/dev/sda4 /mnt So check mounted partitions by egrep rather than check output of runqemu. (From OE-Core rev: 8e3311d45ec68d74e934e966f67cf5102634981c) (From OE-Core rev: 828db9026c61d0a6ad12b8e05929eef31abfd57d) 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>
2019-02-25perl: add testdepends for sshArmin Kuster
fixes: DEBUG: [Running]$ ssh -l root -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR 192.168.7.4 export PATH=/usr/sbin:/sbin:/usr/bin:/bin; perl -e '$_="Uryyb, jbeyq"; tr/a-zA-Z/n-za-mN-ZA-M/;print' | DEBUG: time: 1548816904.4024463, endtime: 1548817204.397057 | DEBUG: Partial data from SSH call: ssh: connect to host 192.168.7.4 port 22: Connection refused for master/thud/sumo (From OE-Core rev: a590e7805e3bec5dd995f7ea0b9e79a21f82b48b) (From OE-Core rev: 7dbccf13493dad534c0cc604bc4c5ab16e5f0fc0) Signed-off-by: Armin Kuster <akuster808@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>
2019-02-06eSDK.py: unset BBPATH and BUILDDIR to avoid eSDK failureChen Qi
When executing eSDK test case, the following error appears. WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead. FileExistsError: [Errno 17] File exists: '/.../tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/selftest-esdk-fcuyzsqu/tmp/sysroots/x86_64/bin/pigz' -> '/.../tmp/hosttools/pigz' So unset these two vars to avoid messing things up. (From OE-Core rev: bc07d825ce8bb3b337623c232fef61f2781c82af) (From OE-Core rev: 748f946ee74f7480200a7eb0bb0b695467b08f0a) 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>
2019-02-06eSDK.py: avoid error in tearDownClass due to race condistionChen Qi
When removing the temporary directory, it's possible that bitbake.lock file is removed by bitbake during the cleanup. And this leads to the following error. FileNotFoundError: [Errno 2] No such file or directory: 'bitbake.lock' So add a check to remove this file before cleaning up the temporary directory. (From OE-Core rev: 984f56b37bd0014e5bf9509fc8ed181973e61773) (From OE-Core rev: 6a5cce862f1e950439dc8ee1d84a10397a7fac4f) 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>
2019-02-06oeqa/utils/buildproject: Only clean files if we've done somethingRichard Purdie
We should only be wiping out things on target if the tests have actually run. (From OE-Core rev: d38c3eac0a5a1a9b0eb98385832e92f48145655e) (From OE-Core rev: 34efb674999781448411a04f876d6b3423ebe26c) 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>
2019-02-06oeqa/selftest/runqemu: Enable kvm when QEMU_USE_KVM is setRobert Yang
(From OE-Core rev: 564de3681353fe8e203425388e8be9703a89d2da) (From OE-Core rev: ffea871575d0e80f73daf6b36c90798ce5e055e6) 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>
2019-02-06oeqa/manual/bsp-qemu.json: Update for QEMU_USE_KVMRobert Yang
Now QEMU_USE_KVM can only be boolean, can not contain MACHINE any more. (From OE-Core rev: 37e5035a2ba27595eeef22062580a5b04a73ba15) (From OE-Core rev: 63f0ce0e084d2d24daeacf226d9c432e4a53fd21) 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>
2019-02-06oeqa/qemu & runtime: qemu do not need ip input from externalYeoh Ee Peng
Qemu do not use the ip input from external. It will retrieve ip from QemuRunner instance and assign ip value. (From OE-Core rev: 14d99dc6c39c963ba3e0d9a30274846bd5369210) (From OE-Core rev: c3d51e92f412becd3e067c637ffbdc5ad13e8894) 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>
2019-02-06oeqa/runtime/cases: Improve dependencies of kernel/gcc/build testsRichard Purdie
Mark up these tests as needing a compiler, make and kernel source code as appropriate, the image feature requirements can then be retired. (From OE-Core rev: 9f64e6c25abdf494fb511e9cd401f8dcaa08be2a) (From OE-Core rev: e65d1680d406e50313f90e659527b9aa795eeb45) 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>
2019-02-06oeqa/runtime/cases: Improve test dependency informationRichard Purdie
Add the OEHasPackage decorator to a variety of tests so they determine automatically if they should run against a given image. To ensure tests can do this we need to move target operations such as scp commands into the tests and out of the class startup/teardown. (From OE-Core rev: 60d6580b85714b8960a964e775d76a7f937f5e5a) (From OE-Core rev: 601f87016c6772a4ec8410bccb195989bcf05b55) 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>
2019-02-06classes/testsdk: Split implementation into classesJoshua Watt
Splits the SDK test implementation into configurable Python classes. The classes used for the normal and extensible SDKs are ${TESTSDK_CLASS_NAME} and ${TESTSDKEXT_CLASS_NAME} respectively. This allows SDK machines to override the classes used to implement the tests. For the traditional SDK, a common "run()" function is provided by the class (oeqa.sdk.testsdk.TestSDK), with several hook member functions that can be overridden in child classes, making it easier to have consistent behavior. The extensible SDK class (oeqa.sdkext.testsdk.TestSDKEXT) also has a common "run()" function, but no hooks have yet been added as there is not currently a known use case for create derived classes. These changes should be purely organizational; no functional changes have been made to either the standard SDK or extensible SDK tests. [YOCTO #13020] (From OE-Core rev: a06d53928b22d5f88276023c4d57b206db2f27f9) (From OE-Core rev: d0828522fc3a4bd3f86488edcedcce10833c18dc) Signed-off-by: Joshua Watt <JPEWhacker@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>
2019-02-06oeqa: make it work for multiple usersRobert Yang
There are failures when multiple users run oe-selftest on the same host: PermissionError: [Errno 13] Permission denied: '/tmp/oe-saved- tests/201812250324_qemu' This is because /tmp/oe-saved-tests was created by user A, while user B tries to write data in it, then the error will happen. This patch can fix the problem. Move the dumped data to ${LOG_DIR}/runtime-hostdump/ rather than /tmp/oe-saved-tests/ to fix the problem. (From OE-Core rev: e219fe5329599cd6c3682f521eaee3852a2c8980) (From OE-Core rev: 310a2b137f2cb249885844fa12830365f94866f0) 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> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-06oeqa: Fix for QEMU_USE_KVMRobert Yang
Fixed: MACHINE = "qemux86" QEMU_USE_KVM = "qemux86" IMAGE_CLASSES += "testimage" $ oe-selftest -r runqemu.RunqemuTests.test_boot_rootfs [snip] File "/buildarea1/lyang1/poky/meta/lib/oe/types.py", line 122, in boolean raise ValueError("Invalid boolean value '%s'" % value) ValueError: Invalid boolean value 'qemux86' Now QEMU_USE_KVM can only be boolean, can not contain MACHINE any more, kvm will be enabled if target_arch == build_arch or both of them are x86 archs. (From OE-Core rev: 7c1a8a624cad8d967635c6cb5f99cf655bde3d44) (From OE-Core rev: 2c12e1d9c262fb7e5fe02ae2d092789d6536413f) 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>
2019-02-06oeqa/utils/qemurunner: set timeout to 60s for run_serialRobert Yang
The 5s timeout for non-kvm is too short, especially when the load is high, which leads to unexpected errors, so set timeout to 60s by default. (From OE-Core rev: 8197d0f638a760fc03062c7a9009117d083d7ead) (From OE-Core rev: 70e942e77493cb5851a78c5592b4e13de860d931) 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>
2019-02-06oeqa/utils/qemurunner: Print output when failed to loginRobert Yang
This is useful for debugging. (From OE-Core rev: da527d73f5eeae0f29b5f99aab757491d3f87ec7) (From OE-Core rev: b09f261867fbdf206afc1059fc5a84a52d49a97a) 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>
2018-12-16oeqa/selftest/esdk: Fix typo causing test failureRichard Purdie
2018-12-06 23:19:24,564 - oe-selftest - INFO - Traceback (most recent call last): File "/media/build1/poky-sumo/meta/lib/oeqa/core/case.py", line 32, in _oeSetUpClass clss.setUpClassMethod() File "/media/build1/poky-sumo/meta/lib/oeqa/selftest/cases/eSDK.py", line 78, in setUpClass cls.tmpdir_eSDKQA = cls.tempdirobj.name AttributeError: type object 'oeSDKExtSelfTest' has no attribute 'tempdirobj' (From OE-Core rev: 75cd4edaa8a42f76c0594ce26df05c7a51d620df) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-16oeqa/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: eca3c0a6aa4bce48f295ba25f613da8dcaefac20) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-16testimage/testsdk/selftest: Avoid platform.distro_identifier deprecation ↵Richard Purdie
warnings Use our own lsb function instead as used elsewhere by the codebase. (From OE-Core rev: acac45a6fd604d28ef7c23d67482af3d7e8bcfe3) (From OE-Core rev: 570256a64af5a3fa994a20a5cc4c74d59ffc361f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-16oeqa/concurrencytest: Avoid unclosed file warningsRichard Purdie
Avoid an unclosed file per thread warning when running selftests concurrently by closing the result stream. (From OE-Core rev: 33a4a076e8aa72a872807332501e7f5ae1cee0e2) (From OE-Core rev: a7dceca55b169bcdb8d1528238cbdedfd131f37f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-16oeqa/utils/qemurunner.py: Fix python regex warningsRichard Purdie
Fix the warnings: meta/lib/oeqa/utils/qemurunner.py:250: DeprecationWarning: invalid escape sequence \. ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1]) meta/lib/oeqa/utils/qemurunner.py:343: DeprecationWarning: invalid escape sequence \- if re.search("root@[a-zA-Z0-9\-]+:~#", output): poky/meta/lib/oeqa/utils/qemurunner.py:350: DeprecationWarning: invalid escape sequence \- if re.search("root@[a-zA-Z0-9\-]+:~#", output): meta/lib/oeqa/utils/qemurunner.py:448: DeprecationWarning: invalid escape sequence \- if re.search("[a-zA-Z0-9]+@[a-zA-Z0-9\-]+:~#", data): by correctly marking the regexs. (From OE-Core rev: 8e6987735002560fca714f77ea8ece9d4b28f7fa) (From OE-Core rev: a980cb8a0940d4db4bb5d338650cf848cd292f5b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-16oeqa/selftest/context: Replace deprecated imp module usageRichard Purdie
Avoid the warning: meta/lib/oeqa/selftest/context.py:8: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp In this case importlib is a direct replacement. (From OE-Core rev: db7a60c36a2d3eefc61ae6e1ede01680dc932035) (From OE-Core rev: 1e7bbdaf78fd2a75d03c6a0c48afed13fffd4397) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-16oeqa/utils/commands: Avoid unclosed file warningsRichard Purdie
Avoid warnings such as: meta/lib/oeqa/utils/commands.py:213: ResourceWarning: unclosed file <_io.BufferedReader name=4> return runCmd(cmd, ignore_status, timeout, output_log=output_log, **options) (From OE-Core rev: 6a68c42de08cffbadb59ebda63fa5e19f6e5acef) (From OE-Core rev: f65a5fbd4fd13a52b54c808a6f5d2afab426e050) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-16oeqa/core/runner: Correctly markup regexsRichard Purdie
Avoid the warning "DeprecationWarning: invalid escape sequence \(" by marking the regexs correctly. (From OE-Core rev: cb49980fa4a158d5529902df731dec61a8c9b3d4) (From OE-Core rev: bb2cddb08d7c4c6c56dfe6b2f0d26dce1cdf20e4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-16oeqa/loader: Fix deprecation warningRichard Purdie
Clean up the warning: meta/lib/oeqa/core/loader.py:27: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() _failed_test_args = inspect.getargspec(unittest.loader._make_failed_test).args (From OE-Core rev: d2deb66830be2d44532fea3d5db763b57778252a) (From OE-Core rev: e65e9492acad4861b22e6f29d5f470a82778f2b4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-16oeqa/runner: Sort the test result output by result classRichard Purdie
We want to see failures/errors listed last since this is the most easily visible part of the log on consoles or autobuilder output and makes human processing easier rather than having to scroll up and scan for a single failure. (From OE-Core rev: 7954b19020c28a4120bc1671aa81b9e1e2b05fa2) (From OE-Core rev: 260738158b09aea0beeca85b778aa4ab08ba1c4c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-16oeqa/runner: Always show a summary of success/fail/error/skip countsRichard Purdie
Its useful to have the counts of success/failure/error/skipped at the end of the results to allow for easier human reading of what happened. (From OE-Core rev: 080d8900d470a8e7f929b0c5c2765ad461744fbb) (From OE-Core rev: 5bc862d8f16df5611537cb51da95812e519c61f6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-16oeqa/selftest/esdk: run selftest inside workdir not /tmpRoss Burton
We've seen issues with rootfs size calculations and we've seen systems like opensuse which have btrfs mounted on /tmp causing selftest failures. (From OE-Core rev: 61be3cd748d1b7321a1fc4cfe84efa9b26a6aee0) (From OE-Core rev: 63eefbe21612e58e88f1eb3fde3d314da53927fa) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>