summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdkext
AgeCommit message (Collapse)Author
2024-02-27lib/oeqa: share get_json_result_dir helperAlexis Lothoré
Multiple places in oeqa need to get the log output path, and redefine a small helper to accomplish this Define this helper in lib/oeqa/utils/__init__.py and import it wherever needed to allow using it. (From OE-Core rev: 01b1a6a5a4e7cede4d23a981b5144ae9c8306274) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-01sdkext/cases/devtool: pass a logger to HTTPServiceRoss Burton
Pass our logger to the HTTPService instance so we can see the requests and any errors. (From OE-Core rev: 3485df2ff61143aac03d92300b7bac4e5d6b2427) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-11testsdk.py: Clean up the additions to PREMIRRORS and SSTATE_MIRRORSPeter Kjellerstedt
Since commit 044fb04d in bitbake (fetch2: Allow whitespace only mirror entries) there is no need to separate the entries in PREMIRRORS and SSTATE_MIRRORS with "\n". (From OE-Core rev: 3db607deea3b2982edb333f99056119490fcf5ea) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02Convert to new override syntaxRichard Purdie
This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30testsdk.py: remove workspace/sources to avoid failure in case of multilibChen Qi
When multilib is enabled, there are multiple environment scripts, and the test cases for eSDK are executed for each environment script. And we will have the following problem when executing test cases for the second environment script. ERROR: Source tree path /.../workspace/sources/librdfa already exists and is not empty So after executing test cases for one environment, we clean up the sources diretory to avoid such failure. (From OE-Core rev: f55924d8d2258ca8b60c46d78ae2de06add59798) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-07testsdkext/devtool: initialize the test component's git repoAlexander Kanavin
Devtool is relying on externalsrc class, which, in order to determine if a rebuild is needed, relies on git to checksum files (if the component tree is a git repo), or sets a flag to always rebuild if the component tree is not a git repo. This is problematic in testsdkext scenario, where the test component is inside a build directory, which itself is inside the poky repo checkout, and listed in .gitignore. What happens is that git walks up the tree and uses the index of the poky repo. This works okay with older versions of git, but git 2.26 complains that we're inside a directory that is ignored, and returns an error. To fix the issue, the git repository is initialized directly in the component directory, just prior to running the tests. (From OE-Core rev: a5b21af4884c322be173b045ec2fad57ef76e98e) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-11oeqa/testsdk: Use original PATHRichard Purdie
We want to test the SDK with PATH from the original host, not with our own tools injected via HOSTTOOLS. It even uses some tools which aren't in HOSTTOOLS. This is necessary after changing the SDK to not reset PATH to the system default which is bad for other reasons and brings the testing into sync with that change. (From OE-Core rev: 87c9602fd0dedc7bcf75b822aaf5f6ebfc17737c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-06sdkext: use simpler kernel module for devtool testMark Asselstine
The current devtool test for the building of an out-of-tree kernel module uses something which requires several "high order" kconfigs to be set. This results in the test failing, not for expected reasons, but rather because it depends on specific kernel configuration. You will get error messages such as ERROR: "video_ioctl2" [.../1.0-r5/testsdkext/workspace/sources/v4l2loopback-driver/v4l2loopback.ko] undefined! ERROR: "video_unregister_device" [.../1.0-r5/testsdkext/workspace/sources/v4l2loopback-driver/v4l2loopback.ko] undefined! Using a simpler hello-world kernel module example will only require that CONFIG_MODULE is enabled, thus avoiding a false positive. (From OE-Core rev: 48ad9cffa5f9412a8225c61be7e3528e2bdad095) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09meta/lib+scripts: Convert to SPDX license headersRichard Purdie
This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09oeqa: Drop OETestIDRichard Purdie
These IDs refer to testopia which we're no longer using. We would now use the test names to definitively reference tests and the IDs can be dropped, along with their supporting code. (From OE-Core rev: 8e2d0575e4e7036b5f60e632f377a8ab2b96ead8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13oeqa/sdk: show output if run() failsRoss Burton
Use oeqa.utils.subprocesstweak to monkey-patch the subprocess exception so that any output is shown, and remove any explicit try/catch handling that would have hidden this. (From OE-Core rev: 55964b33b561397287779ee474170790dfd03e85) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21classes/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) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14oeqa/esdk/devtool: Drop OETestDepends usageRichard Purdie
OETestDepends doesn't work with parallelism and in this case we don't really need this dependency, it would just short out some tests quickly in the rare case the esdk environment was broken. Currently this is masking tests which is a much worse problem and we can't make OETestDepends work reliably with parallelism so drop the dependencies. (From OE-Core rev: b3b1e1881240b8e2a32dd5c1dc3b7387f0819576) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-02oeqa/sdkext/cases: Move sdk_update test into devtool moduleAníbal Limón
With the new OEQA thread support there are problems running devtool twice at the same time because only one instance of bitbake/devtool is allowed. [YOCTO #11450] (From OE-Core rev: 44254caaef131402629d01f01cdee6722718adba) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-03oeqa/sdkext/devtool: Ensure dependencies for ↵Richard Purdie
test_extend_autotools_recipe_creation are present test_extend_autotools_recipe_creation needs libxml2 so ensure this is installed/present as it may not be in the minimal eSDK case. (From OE-Core rev: fb274c7fe588c556936a0df1ae583907875c2a76) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01oeqa/sdkext: don't skip tests if there isn't a toolchainRoss Burton
Skipping the tests if a toolchain wasn't installed out of the box (for example, a minimal eSDK) doesn't make sense as the first thing the tests should do is install a toolchain. (From OE-Core rev: 1e776c1a7f4827f5a14c00dbffae0bdfb027e21e) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01oeqa/sdkext/devtool: use finally instead of repeating cleanupRoss Burton
Use the finally: block to always to cleanup. Now that the test harness in testsdk.bbclass has monkey-patched CalledProcessException to display the output we don't need to do that in the test case. (From OE-Core rev: 9f0f6326083ee76b72b431fbfcbe12c1ab2793b2) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01oeqa/esdk/devtool: clean setUpClass/tearDownClassRoss Burton
These methods are class not instance methods, so the argument should be cls not self. Also don't put variables into cls that we don't need there. (From OE-Core rev: 6ecd671fb09486b5852c47f06b5db372a2eb082b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01oeqa/sdkext/context: Work around broken dependency checks to get sdk tests ↵Richard Purdie
running This is admitted a bit of a hack but it does allow a number of significant sdk tests to run successfully and hence improves testing of eSDK which is good. I'm therefore proposing we do this until we come up with a better solution since the current lack of testing is worrying and would have caught other issues had it been present. (From OE-Core rev: 633b95ea32bbccf59b341a9d37b0b11027b48a63) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01oeqs/sdk*/case: Use universal_newlines for subprocess callsRichard Purdie
This removes the need for some of the ugly decode calls with hardcoded locales. (From OE-Core rev: a14dddc77e553d2fa90d12576503dd3fc2e52bbc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01oeqa/sdkext: Ensure we run a deterministic set of testsRichard Purdie
The directory list of sdk tests to run can vary so this code effectively selects a random set of SDK tests to run in the eSDK. We want to attemp all the SDK tests so remove the element selection. (From OE-Core rev: 11365d869c03cb0e476ea43e75ce27090a33dfa7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01oeqa/sdkext/devtool: rename recipe name to match upstreamRoss Burton
Call the generated recipe librdfa instead of bb-example to make it clearer what is happening. (From OE-Core rev: c59b82ec151618bb4bcb1953b8ca7d23255d3357) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05sdkext/cases oeqa/selftest: Updates decoratorsFrancisco Pedraza
Updates decorators for eSDK in test cases at: sdkext/cases/devtool.py and oeqa/selftest/eSDK.py (From OE-Core rev: 36783b17085e73bbf47242e87bbf054352ae0a9d) Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31oeqa/sdk: Updates sanity tests for minimal eSDKFrancisco Pedraza
Updates sanity tests to cope with minimal eSDK installer 1. Skips the validation of sanity if packagegroup-cross-canadian is in host package. 2. Skips if SDK does not include toolchain at cases/devtool.py This should fix [YOCTO #10794] (From OE-Core rev: 59a99cd8661af594ee0c33e086578d29d50a6268) Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23oeqa/sdkext/cases: Migrate test case to new OEQA frameworkAníbal Limón
Summary, - Changes base case class to OESDKExtTest. - Changes decorator classes to new ones. - Chnages variable names sdktestdir -> sdk_dir. - Added missing license to MIT. (From OE-Core rev: 49568055df0a64e4228f27130b13ccafbba2a460) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23oeqa/sdkext: Adds case and context modules.Aníbal Limón
The extensible sdk context and case modules extends the sdk ones, this means that the tests from sdk are run also the sdkext tests. Enables support in context for use oe-test esdk command for run the test suites, the same options of sdk are required for run esdk tests. Removes old related to case and context inside oetest.py. [YOCTO #10599] (From OE-Core rev: 1f0bb99249744b87dd39227a4cf37f2341f5499c) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23oeqa/sdkext: Move test cases inside cases directoryAníbal Limón
For match with the new structure of the OEQA framework. In the new framework Test component base directory in this case sdk module will contain case and context implementations. [YOCTO #10599] (From OE-Core rev: bdb92fa4d9bd2e4a0a14e3adc62a6b9e9bf639d3) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-16oeqa/sdkext/devtool: use a smaller module to test node.js functionalityPaul Eggleton
The "forever" package, despite its innocent description, actually drags in a surprising number of dependencies and as a result the nodejs test takes up to 10 minutes as a result. Pick a different example with a much more reasonable set of dependencies. Addresses part of [YOCTO #10254]. (From OE-Core rev: 638ee71da967f093071ba25e0ea5c467dab65339) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03/oeqa/sdkext Adds verification for devtool on eSDK.Francisco Pedraza
The covered funcions are, build make, build esdk package, build cmake extend autotools recipe creation, kernel module, node.js installation and recipe creation. (From OE-Core rev: 574a5d4cf3e79815aecc4d198545119d3bbfb023) Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-21devtool: sdk-update: drop support for local updatesPaul Eggleton
Having two code paths here makes maintenance difficult, and it doesn't seem likely that you would use the local case in real usage anyway, so drop the local support entirely. This should allow us to resolve [YOCTO #9301]. (From OE-Core rev: 7a4c9c96fee4fb514c2b69b52e811c4f896a16f1) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-03sdk_update.py: Enable local sdk-update testsJuro Bystricky
Testing of local sdk updates was commented out. Local sdk updates are functional now, so the tests should be re-enabled. (From OE-Core rev: 0bc7cd0bd10f79907c4f41676801a113fb3df8a3) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-28oeqa/sdkext: Add sdk_update.SDKUpdateTest class.Aníbal Limón
The SDKUpdateTest class test devtool sdk-update mechanism inside eSDK. The SDKUpdateTest class search for new sdk if not found uses the main one then it publish the eSDK into known folder inside work and it starts a web server for serve the eSDK. Finally it executes sdk-update over http, the local test is commented due to bug [1]. [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=9043 [YOCTO #9089] (From OE-Core rev: be7f5036a7c86fe70d43526df529bc467a9cf7d9) Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10oeqa/sdkext/devtool.py: Add location test to ensure that devtool is the eSDK ↵Aníbal Limón
one. (From OE-Core rev: 3e3abf0753a3bf1737dc4f476df4e70d31070391) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10oeqa/sdkext: Add devtool basic tests for eSDK.Aníbal Limón
Add simple myapp application is a C app that prints hello world and exit. Add devtool test for that this app to the workspace, build and reset it. (From OE-Core rev: 2ec513c00ab2ae0f7df631d32f8f248446c90184) Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-10testsdkext: Add skeleton for support Extensible SDK tests.Aníbal Limón
oeqa/sdkext: Add module and __init__.py will contain eSDK tests. classes/testsdk: Add support for run eSDK tests. oeqa/oetest: Create oeSDKExtTest for now only inherit oeSDKTest, modified SDKExtTestContext now inherit SDKTestContext and set sdkext filesdir for store data fixtures. (From OE-Core rev: f3781544a5c077610498a6b7dc5244ee4c5bc6df) Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>