summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk
AgeCommit message (Collapse)Author
2018-09-04oeqa/sdk: fixes related to hasPackage semanticsChen Qi
The current _hasPackage does a regex match when checking for the existence of packages. This will sometimes result in unexpected result. For example, the condition hasTargetPackage('gcc') is likely to be always true as it matches libgcc1. For most of the time, we should do exact match instead of regex match. So change _hasPackage function to do that. For the current sdk test cases, the only place that needs regex match is '^gcc-'. This is because there's no easy way to get multilib tune arch (e.g. i686) from testdata.json file. Besides, packagegroup-cross-canadian-xxx and gcc-xxx should be check in host manifest instead of the target one. So fix to use hasHostPackage. Also, as we are doing exact match, there's no need to use r'gtk\+3', just 'gtk+3' is enough. (From OE-Core rev: 595e9922cdbacf84cf35cc83f0d03cace042e302) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04sdk/buldgalculator.py: check against multilib for gtk+3Chen Qi
When determining whether to skip the test case, the check should be done with consideration of multilib. Otherwise, we will meet the following error when testing against lib32 environment. No package 'gtk+-3.0' found (From OE-Core rev: ce82ee46f4a7beb5663238b276e779e5c9657777) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04sdk/context.py: add ability to check for multilib version of target packageChen Qi
Add a named argument 'multilib' for the hasTargetPackage function. Its default value is False. When setting to True, it will try to get the correct multilib prefix from the sdk_env, the environment setup script. We need this because we don't want unexpected run of some sdk test cases. The following steps will generate error. 1. Enable multilib for qemux86-64 require conf/multilib.conf MULTILIBS ?= "multilib:lib32" DEFAULTTUNE_virtclass-multilib-lib32 ?= "core2-32" 2. bitbake core-image-sato -c populate_sdk 3. bitbake core-image-sato -c testsdk The error message is like below. No package 'gtk+-3.0' found RESULTS - buildgalculator.GalculatorTest.test_galculator - Testcase -1: FAILED As we don't have lib32-gtk+3 installed, the test case should be skipped when testing against the lib32 environment setup script. (From OE-Core rev: 163764ad4760a5fabf65640df5f968be98ad13d2) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21assimp.py: fix AttributeError in tearDownClassChen Qi
When running this test case, we will see the following error. AttributeError: type object 'BuildAssimp' has no attribute 'project' assimp.py test case does not make use of SDKBuildProject, so remove the import statement and the tearDownClass. (From OE-Core rev: ca0a40a852abed981d54503ef2d86708471c821e) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14oeqa/sdk/buildgalculator: check for nativesdk-gettext-devRoss Burton
We don't need target gettext to build, but nativesdk-gettext-dev (for nls.m4). (From OE-Core rev: 0474326d79b7675dabe63f691733e8c6b24b2fb0) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-07oeqa/sdk: add test that CMake worksRoss Burton
Add a new SDK testcase that builds assimp, a project that uses cmake. Using TARGET_ARCH and TARGET_OS which is now exported into the environment, check that the generated binaries match the ELF headers we expect. (From OE-Core rev: b4acfa11b35b47c86d2d83d7b0693284a8dc7495) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-26oeqa/sdk/sdkbuildproject: use os.path.joinRoss Burton
Instead of mushing two paths together and hoping that the slashes line up correctly, use os.path.join. (From OE-Core rev: ed0413babaf10ccf729472f603bbe32d84ba1931) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-26oeqa: rationalise Perl testsRoss Burton
As with the Python test, this can be both better and faster. No need to copy a file, just run a one-liner. (From OE-Core rev: c6eef46747fe58bb2310be4f06d2fa9b67901d72) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18oeqa/sdk/python: clean up Python testRoss Burton
For the same reasons as the runtime Python test, clean up the SDK test. Also port from Python 2 to Python 3, as that's what is supported now. (From OE-Core rev: bead742a3ffc0a53162fb0c36610d74a1422e7b3) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18testsdk: Enable multiprocess executionRichard Purdie
This uses the new concurrenttest code to enable parallel test execution if specified. (From OE-Core rev: 07d19fb3adab7a8d83ba83d9a16395f70d7b7a47) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18oeqa/core/threaded: Remove in favour of using concurrenttestsRichard Purdie
We have several options for parallel processing in oeqa, parallel execution of modules, threading and mulitple processes for the runners. After much experimentation is appears the most scalable and least invasive approach is multiple processes using concurrenttestsuite from testtools. This means we can drop the current threading code which is only used by the sdk test execution. oeqa/decorator/depends: Remove threading code Revert "oeqa/sdk: Enable usage of OEQA thread mode" This reverts commit adc434c0636b7dea2ef70c8d2c8e61cdb5c703b1. Revert "oeqa/core/tests: Add tests of OEQA Threaded mode" This reverts commit a4eef558c9933eb32413b61ff80a11b999951b40. Revert "oeqa/core/decorator/oetimeout: Add support for OEQA threaded mode" This reverts commit d3d4ba902dee8b19fa1054330cffdf73f9b81fe7. (From OE-Core rev: a98ab5e560e73b6988512fbae5cefe9e42ceed53) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-16oeqa/sdkbuildproject: Capture output to quieten selftest logsRichard Purdie
Only show the output in the failure case. (From OE-Core rev: 324785a99e3f2449cb443233e7ce224598c02a3b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-29oeqa/sdk/cases/buildgalculator.py: skip if gettext not availableChen Qi
We need to skip this testcase when gettext is not available. Otherwise, we will have the following error at configure. error: possibly undefined macro: AM_NLS (From OE-Core rev: ccc10e95c9fcdabcf4ae5e6f9cc34c1d632b4654) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08oeqa/sdk: Replace buildiptables for buildlzip testsJose Perez Carranza
Buildiptables test cases are conflicting with images built with “musl” as standard C library, in order to avoid those issues lzip package was selected to be used on the tests as this does not have any "musl" dependency. [YOCTO #11713] (From OE-Core rev: b798284f62b3cb171373716b1ee84403439314aa) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12oeqa/sdk/cases: Fix skip of buildgcalculator testAníbal Limón
The tc.hasTargetPackage uses a re.search to see if gtk+3 is on the manifest but + in regex means 1 or more causing the test to be skipped. (From OE-Core rev: 271cd99d00bde0b9f2aa27141acbe06812f34638) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12oeqa/sdk/cases: Added validation for SDK compatibility tests with eSDKFrancisco Pedraza
The manifests for eSDK are generated using shared states so there is a need to validate to different "packages names" into the test cases. For example for perl: SDK provides nativesdk-perl eSDK provides perl-native [YOCTO #9090] (From OE-Core rev: 8db06dd1290dd53d626050879c9c306f95d76ac2) Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-02oeqa/sdk: Enable usage of OEQA thread modeAníbal Limón
oeqa/sdk/context.py - Use OETestContextThreaded. classes/testsdk.bbclass - Enable bb event thread mode to avoid corrupt the PIPE when multiple threads writes. [YOCTO #11450] (From OE-Core rev: 598c6579932c2ca1dbdb022c8bec8af2e6c21e6b) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-02oeqa/sdk/context.py: Add return to OESDKTestContext.run() methodAníbal Limón
The run() methods of a OETestContext's are expected to return the results. (From OE-Core rev: c45546b771c3158e66b2df504576d6dc1758ea75) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-02oeqa/sdk/context.py: Import argparse_oe at OESDKTestContext.run methodAníbal Limón
This import was at level of OESDKTestContext.register_commands but OESDKTestContext.run method need it to raise exceptions. (From OE-Core rev: 35efb419de1dbebd269d87895645934707130746) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11oeqa/sdk/cases/buildcpio: enable use of cached cpio from DL_DIRJoshua Lock
All build project test cases will try to copy the requested source artefacts from DL_DIR before fetching. This testcase is referencing bzipped tarball whereas the recipe fetches a gzipped tarball. Switch to fetching the gzipped tarball in the test case so that we're able to use a cached tarball from DL_DIR (From OE-Core rev: 27a5883e8ae01e69f5425efe8b035bea7087b2f9) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22meta/lib/oeqa: change sdk test from cvs to cpiobrian avery
We currently fetch,configure,build, and install cvs as our test for the sdk. cvs unfortunately, requires a default editor in order to run. The change in 94790a8254d6 that checks to see if you have something like vi installed is fragile since you may have a different default editor. This patch switches from using cvs as a test to using cpio. cpio also uses autotools so the functionality tested is equivalent. (From OE-Core rev: 233d36b0382a8b2e430c3377e50885d1a0c3ba21) Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> 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-02-05oeqa/buildproject: Run gnu-configize by defaultRichard Purdie
The runtime oeqa tests were failing in the on-target case, only for aarch64. This was because an old config.sub was being used. Similar to the SDK testing, call gnu-configize in the on-target case too to resolve the failing tests. (From OE-Core rev: 7918fe08d8e48f46cf2402afa66d35063eb72545) 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-23classes/oeqa: Replace subprocess.check_call() with check_output()Richard Purdie
If you use subprocess.check_output() the traceback will contain the output when the command fails which is very useful for debugging. There is no good reason not to use this everywhere. (From OE-Core rev: ad750dd1cc9d789abe723daddd098ce41d8547f5) 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-23classes/testsdk: Remove the need of TEST_LOG_DIR variableAníbal Limón
The TEST_LOG_DIR was used for store sdk_target_log this log contains the output of the run of build commands now that information could be found also on log.do_testsdk under WORKDIR. The log will continue to store into SDK_DIR instead of TEST_LOG_DIR. (From OE-Core rev: 1c9ba4b698bab916d42b58255692a7bf3d773bbc) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23oeqa/sdk/cases: Migrate tests to the new OEQA frameworkAníbal Limón
Summary of the changes: - Remove auto extend_path using pkgutil at __init__, is not needed. - Change base class to OESDKTestCase. - Add td_vars attr to set dependencies of certain variables in test data. - Change skips from module level to class level because Test context (tc) now isn't at module level. - Variable names changes to be consistent (i.e. sdktestdir -> sdk_dir). [YOCTO #10599] - Don't use bb.utils functions use instead remove_safe and shutil for copy files. - SDKBuildProject pass test data variables instead of call getVar inside. [YOCTO #10231] (From OE-Core rev: 91cd1ed19a3f34c29cd77eb136036975fe465444) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23oeqa/utils: {Target,SDK,}BuildProject remove dependency of bbAníbal Limón
Don't use bitbake references inside utils modules, in order todo that changes getVar calls for arguments in the __init__ method like dl_dir for all the classes and testlogdir, builddatetime in SDKBUildProject. Also don't export proxies inside _download_archive method, a good practice is to setup the proxies at init of the process instead of do it in this helper module. [YOCTO #10231] [YOCTO #10599] (From OE-Core rev: 581c34d1efe9839f50ef322761269b4e4d8a56a6) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23oeqa/utils: Move targetbuild to buildproject moduleAníbal Limón
The new buildproject module will contain only BuildProject class a helper class for build source code. The remaining classes TargetBuildProject and SDKBuildProject was move to runtime and sdk respectively. [YOCTO #10599] (From OE-Core rev: 525fd2a5cda00890e921b63f7f608a10bc024d73) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23oeqa/sdk: Add case and context modules for the SDK componentAníbal Limón
Adds case and context modules for SDK based on oetest.py old code. Enables SDK Test component usage with oe-test, the SDK Test component adds command line options for specify sdk installed dir, sdk environment and target/hosts maniftest. [YOCTO #10599] (From OE-Core rev: 19e875dd81c42841666e6db5f6b665b4e1cddfe6) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23oeqa/{runtime,sdk}/files: Move testsdkmakefile from runtime to sdk moduleAníbal Limón
It doesn't make sense to have files related to sdk module into runtime module. [YOCTO #10599] (From OE-Core rev: 9a3be58b17afbe4ef00030b0e6ad8b20b03adc49) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23oeqa/sdk: 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: 57af8ee4021c302bd351adf03e6d85274ad7efd5) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-28lib/oeqa: Regenerate galculator configureJussi Kukkonen
galculator configure seems to be so old it does not recognise --with-libtool-sysroot: regenerate configure. Fixes [YOCTO #10191]. (From OE-Core rev: 3e838773462e77cb2e3ba9a69534260f89ca4904) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-23oeqa/buildiptables: Switch from netfilter.org to yoctoproject.org mirrorRichard Purdie
We've had some upstream mirror instability so use our own mirror for the iptables sources to ensure this doesn't affect the test results. (From OE-Core rev: 25f6af8895d5f5c6dcedde0a21285d63522769c8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20oeqa/sdk: remove buildsudoku testRoss Burton
This application needs GTK+ 2 which we're trying to move away from for Sato images. (From OE-Core rev: 5e52f208a17e7122209675fa96de6e7807c62feb) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-01lib/oeqa: add Galculator to SDK and runtime testsRoss Burton
This is a GTK+3 application, so we don't need to ship GTK+ 2 in Sato just for the SDK test suite. [ YOCTO #9780 ] (From OE-Core rev: 53fcfe4348a2ca727844f2b0bd3fca2902cbdda0) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-23oeqa: fix hasPackage, add hasPackageMatchRoss Burton
hasPackage() was looking for the string provided as an RE substring in the manifest, which resulted in a large number of false positives (i.e. libgtkfoo would match "gtk+"). Rewrite the manifest loader to parse the files into a proper data structure, change hasPackage to do full string matches, and add hasPackageMatch which does RE substring matches. (From OE-Core rev: b9409863af71899e02275439949e3f4cdfaf2d0f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-28oeqa/sdk/gcc: Fix makefile testRichard Purdie
The makefile test was hardcoding a test for gcc. In the SDK context, we need to use $(CC) to use the cross compiler. (From OE-Core rev: d28ddc23bbf232901ae07f7a01f821ecc4b79e32) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-29lib/oeqa: Add sdk tests for gcc/perl/pythonRichard Purdie
Enhance testing of the generated SDK tarballs by adding tests for gcc/perl/python based on the existing runtime tests. (From OE-Core rev: 18160403427b2aab4207c939312fb0981c3f2d1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-27oeqa/sdk/buildsudoku.py: add setUpModule method to run only when gtk+ in ↵Corneliu Stoicescu
installed. Adding setUpModule in order to skip the module when gtk+ is not installed in the toolchain. (From OE-Core rev: 97ac0fc33b9277825089ac36f9037d472d397b71) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-18oeqa/sdk/: add sdk tests for sudoku, iptables and cvsCorneliu Stoicescu
Add test modules for sdk tests. NOTE: Original patch made by: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: 1b18a33b1053902faaa5cb242d4c1c7d1fb6b064) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>