summaryrefslogtreecommitdiffstats
path: root/meta/classes/testsdk.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* testsdk.bbclass: Clean up comments, clarify image choices.Robert P. J. Day2016-11-161-6/+8
| | | | | | | | | | | | | | Make it clear that SDK testing can use any valid image. (From OE-Core rev: d190c69347921a626665a53469dcf99b3c86994b) (From OE-Core rev: 7c16202e8c532f4d6ae78ac4bd324f7d975e8a76) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> 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>
* testsdk.bbclass: Use bb.fatal() instead of raising FuncFailedUlf Magnusson2016-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This sets a good example and avoids unnecessarily contributing to perceived complexity and cargo culting. Motivating quote below: < kergoth> the *original* intent was for the function/task to error via whatever appropriate means, bb.fatal, whatever, and funcfailed was what you'd catch if you were calling exec_func/exec_task. that is, it's what those functions raise, not what metadata functions should be raising < kergoth> it didn't end up being used that way < kergoth> but there's really never a reason to raise it yourself FuncFailed.__init__ takes a 'name' argument rather than a 'msg' argument, which also shows that the original purpose got lost. (From OE-Core rev: 086240468265dc15c5b4cdb2594d5aa7c3114dda) Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/populate_sdk_ext: eliminate double execution on installPaul Eggleton2016-07-081-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the new BB_SETSCENE_ENFORCE functionality to avoid having to run bitbake twice on installing the extensible SDK - we can now do it all in one invocation which not only takes less time, but we should also get more meaningful errors for some types of failure, in particular where downloading from an sstate mirror fails. One result of this change is that you get the errors printed on the console during normal output rather than this going to the preparing_build_system.log file first. In OE-Core revision 227d2cbf9e0b8c35fa6644e3d72e0699db9607fa, we changed to always print the contents of preparing_build_system.log on failure, but now at least the error contents of that log is duplicated. Besides, I intentionally didn't print out the contents of that log during normal usage because it's quite verbose - the bug that we were attempting to fix was about not getting this information when seeing failures in the automated tests, thus I've moved printing the log to the test handling code instead. Part of the implementation of [YOCTO #9367]. (From OE-Core rev: e1390c1ef85862b91b067ab24f3c06ca506155ad) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testsdk: print output correctly on failurePaul Eggleton2016-07-081-2/+2
| | | | | | | | | | | With Python 3 we get a bytes object from the command output and not a string, which gives some ugly formatting for error messages unless you decode it first. (From OE-Core rev: 798bec6fe43116b51247284eb4e415337b2e8e04) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testsdk: Pass tcname to SDK and SDKExt contextsAníbal Limón2016-02-281-1/+1
| | | | | | | | | | | tcname is needed for eSDK update testcase will be used for publish it and then try to update (From OE-Core rev: a75944a63482597be88ff0f3ce55025647b78e2c) 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>
* classes/testsdk: Move the removal of bitbake PATH to eSDK context onlyAníbal Limón2016-02-281-5/+4
| | | | | | | | | | | | | | The removal of bitbake and scripts PATH is only needed by eSDK tests so move to eSDK context only. This also it's a support for eSDK update test because it needs to execute oe-publish-sdk from scripts. (From OE-Core rev: 4ae0c84568f39661722cbceba8ddab22cffe5003) 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>
* classes/testsdk: Move code for avoid PATHs to oeqa.utilsAníbal Limón2016-02-281-14/+4
| | | | | | | | | | Due to the neeed to use in other modules. (From OE-Core rev: a25aef2bdefae54c8b3eb2bd4afec5a86110ddc7) 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>
* classes/testsdk: do_testsdkext avoid STAGING_DIR/BASE_WORKDIR in PATHAníbal Limón2016-02-111-1/+10
| | | | | | | | | | | The inclusion of STAGING_DIR/BASE_WORKDIR in PATH is contaminating the environment, i.e. when try to sanity check perl (check_perl_modules) it takes perl from STAGING_DIR causing eSDK install to fail. (From OE-Core rev: 32611395e1da21f6f7f7916fb8077e35ee81bb23) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testsdk: Add help information on how to run tests.Aníbal Limón2016-02-101-0/+10
| | | | | | | | (From OE-Core rev: fcf0dc253f914418e15e2c6afc6f649b9270824a) 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>
* oeqa/oetest: Fix compatibility SDK tests using eSDK.Aníbal Limón2016-02-101-3/+3
| | | | | | | | | | | | | | | | | When run SDK tests over eSDK we need to use SDKExtTestContext instead of SDKTestContext because if we use SDKTestContext search for SDK manifest and depends on the SDK manifest generation so populate_sdk needs to be executed. Adds a compatibility mode flag to SDKExtTestContext for search tests over sdk module instead of sdkext module and change testsdk calls to comply with this new param. (From OE-Core rev: ebe743235b383b17225553d84bf8e6f80d364dcd) 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>
* testsdkext: Add skeleton for support Extensible SDK tests.Aníbal Limón2016-02-101-1/+9
| | | | | | | | | | | | | | 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>
* classes/testsdk: Add compatibility SDK testsuite to eSDKAníbal Limón2016-02-101-5/+19
| | | | | | | | | | | Extensible SDK is compatible with SDK test suite so it need to execute the same tests over it. (From OE-Core rev: fb9db1698039ca51ae52ea623d2ca845753f8260) 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>
* classes/testsdk: Add function run_test_contextAníbal Limón2016-02-101-30/+32
| | | | | | | | | | | This helper functions will be serve as well to run extensible sdk tests so generalize it to get function context as arg. (From OE-Core rev: 51782e5f77cb3f32a31a221c6e0f9b33cf3a33c9) 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>
* oetest.py/TestContext: Move loadTests and runTests inside it.Aníbal Limón2016-02-101-3/+3
| | | | | | | | | | | | Method's for loadTests and runTests make sense to define inside TestContext because it can be different around Image, SDK, SDKExt. (From OE-Core rev: 03af7b99e3ce36ce3e29dc31e33d2cc74eb14849) 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>
* testimage/testsdk: Move get test suites routine inside TestContext.Aníbal Limón2016-02-101-17/+2
| | | | | | | | | | | In order to provide better abstraction move functions to get the test suite inside the TestContext. (From OE-Core rev: 552285688441330440bd1bc138aeaea87549024a) 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>
* testimage/testsdk: Modularize TestContext.Aníbal Limón2016-02-101-26/+3
| | | | | | | | | | | | Move anonymous duplicated class TestContext from testimage/testsdk to oeqa/oetest now we have two new classes ImageTestContext and SDKTestContext with common code in TestContext class. (From OE-Core rev: 593f2fdf6ee94c5f91761a669048da3598cbe3fa) 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>
* classes/testsdk: Add call to export_proxies on testsdkext.Aníbal Limón2016-02-101-0/+3
| | | | | | | | | | | Extensible SDK needs to use network and some networks requires proxies then export it. (From OE-Core rev: 1c79fce34a02fee696bccb085a09957d71d87d56) 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>
* classes/testsdk: Add testsdkext task only install.Aníbal Limón2016-02-101-0/+45
| | | | | | | | | | Add task for test extensible sdk for now only install the SDK. (From OE-Core rev: d5061e07c4fd6ea37a0ceacedb83c7878f5bfd6d) 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>
* classes/testsdk: Add new class testsdk.Aníbal Limón2016-02-101-0/+100
Moves all the testsdk code from testimage in order to have it's own class because new tests will be added for extensible SDK. The old paths for store logs "${WORKDIR}/testimage" and sdk "${WORKDIR}/testimage-sdk" was maintained for compatibility may be change to point testsdk after review the codebase. The dependency of QEMU was removed because isn't needed. (From OE-Core rev: b30edc18866865ec757b3fd86eb84de530720acf) 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>