summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk/cases
Commit message (Collapse)AuthorAgeFilesLines
* oeqa: sdk: Capture stderr outputJoshua Watt2020-09-105-5/+5
| | | | | | | | | | | | | | Redirect stderr to stdout when running subcommands while doing the SDK tests. The tests will show stdout when CalledProcessError is raised, but any output to stderr was lost. (From OE-Core rev: cf6cab12ca7ff40ac484cdaf27ea91ed49b901b0) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 7cb4e9ab8c1596281060e94a216966060103956e) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Use --disable-maintainer-mode configure optionKhem Raj2020-02-141-1/+1
| | | | | | | | | | | | | | | | | since the versions of autotools might differ on target and build host, plus difference in timestamps for configure and system can result in reconfigure lets avoid that by disabling maintainer mode Avoids error: newly created file is older than distributed files! [YOCTO #13779] Suggested-by: Andre McCurdy <armccurdy@gmail.com> (From OE-Core rev: 3dc4e27e7633ce3ca6b9647810d0996bdee48771) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Use cpio 2.13 as testcaseKhem Raj2020-02-081-2/+2
| | | | | | | | | | | | | | | | | | | | | cpio 2.12 was released in 2015 and might have used older autotools which could result in errors like https://bugzilla.yoctoproject.org/show_bug.cgi?id=13779 Bumping to 2.13 will help in matching the tool versions A good change on top would be to run aclocal -I .; autoheader; autoconf; automake --add-missing -c before running configure step perhaps [YOCTO #13779] (From OE-Core rev: 84eb1dc4fe8a11cd2d05b703070a6fb6de05b873) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: improve Meson testRoss Burton2019-10-091-1/+3
| | | | | | | | | Verify that the build inside the SDK is detected as a cross compilation. (From OE-Core rev: 3dc75ab44c23c4ff26502b96abded3c1c0b94e38) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib+scripts: Convert to SPDX license headersRichard Purdie2019-05-098-0/+32
| | | | | | | | | | | | | | | | | | | | | | | 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>
* oeqa/sdk: add test to exercise MesonRoss Burton2019-01-081-0/+35
| | | | | | | | | (From OE-Core rev: 29359493e391d68a5a6b4fa4d09ffdc1fe6db620) (From OE-Core rev: 237ed166f48b0e32684a5307d3b47b9485238ed9) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/assimp: cleanupRoss Burton2019-01-081-14/+16
| | | | | | | | | Unify style with the other tests. (From OE-Core rev: 545cde27b13f9d68211fd3a671182203ac47756d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/cases: clean up DL_DIR handlingRoss Burton2019-01-084-8/+4
| | | | | | | (From OE-Core rev: f56c62b9feacd6e08fee3507185261ab3f0180e0) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: rewrite cpio testRoss Burton2018-12-131-27/+22
| | | | | | | | | | | Don't use the helper class as it gets in the way more than it helps, exercise the out-of-tree paths, and verify the installed files match the expected architecture. (From OE-Core rev: 6d666b0413336de2e556b2722c5be97ae5cd40ad) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: rewrite lzip testRoss Burton2018-12-131-33/+28
| | | | | | | | | | | Don't use the helper class as it gets in the way more than it helps, exercise the out-of-tree paths, and verify the installed files match the expected architecture. (From OE-Core rev: 920ae8c6537c2469f21ab9439587fd094ecc40f6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: clean up galculator testRoss Burton2018-12-131-7/+4
| | | | | | | | | | Drop redundant imports and variables, and use os.makedirs() instead of bb.utils.mkdirhier(). (From OE-Core rev: 2de9b1e611e5047afb540f98756994925c22e446) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: show output if run() failsRoss Burton2018-12-135-18/+23
| | | | | | | | | | | 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>
* oeqa/sdk/galculator: rewrite to use new helpersRoss Burton2018-12-081-20/+27
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/python: fix version typoRoss Burton2018-12-081-1/+1
| | | | | | | (From OE-Core rev: 581b43d7b3566624e6b17d516755d8e7a5142ebf) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/assimp: use helpersRoss Burton2018-12-081-28/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk/python: add Python 2 and fix detectionRoss Burton2018-12-031-3/+17
| | | | | | | | | | | Add a Python 2 form to exercise that if present, and fix the setUp() so it actually looks for a package that exists (nativesdk-python3 is a virtual package, the interpretter is in nativesdk-python3-core). (From OE-Core rev: d286c2ad3eec24978557e16a8fa599476791109f) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk: fix skipped testcase output "UNKNOWN" status while multiprocess ↵Hongxu Jia2018-11-146-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | execution Usually skipped testcase output "SKIPPED" [snip serial execution] |RESULTS - buildgalculator.GalculatorTest.test_galculator - Testcase -1: SKIPPED (0.01s) |RESULTS - python.PythonTest.test_python3 - Testcase -1: SKIPPED (0.01s) [snip serial execution] But if enable multiprocess execution, skipped testcase output "UNKNOWN" status [snip enable multiprocess execution] |RESULTS - buildgalculator.GalculatorTest.test_galculator - Testcase -1: UNKNOWN |RESULTS - python.PythonTest.test_python3 - Testcase -1: UNKNOWN [snip enable multiprocess execution] Here is my investigation: There is a class pairs TestProtocolClient and TestProtocolServer provided by python3-subunit. The TestProtocolClient generates a subunit stream of TestResult from a test run, and TestProtocolServer parses the stream of subunit TestResult. The class ProtocolTestCase is a unittest.TestCase adapter and it uses TestProtocolServer to parse the stream of subunit TestResult. In Yocto testsdk, it forks multiple processes to execute testcases and use TestProtocolClient to generate TestResult stream; and then it creates multiple threads to use ProtocolTestCase to parse stream of subunit TestResult through pipe; finally it passes multiple ProtocolTestCase as TestCase instance to main process and output status result. The problem point is TestProtocolServer parses `skip:' directive after reading a `test:' directive. Without `test:' directive, `skip:' directive will be ignored. All above requires SkipTest should be raised inside a test method rather than setUpClass method. Throwing SkipTest inside setUp works correctly (From OE-Core rev: 4828a88556d59e4d06933164c2ebeb9361b7450e) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: fixes related to hasPackage semanticsChen Qi2018-09-043-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* sdk/buldgalculator.py: check against multilib for gtk+3Chen Qi2018-09-041-2/+2
| | | | | | | | | | | | | 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>
* assimp.py: fix AttributeError in tearDownClassChen Qi2018-08-211-5/+0
| | | | | | | | | | | | | | 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>
* oeqa/sdk/buildgalculator: check for nativesdk-gettext-devRoss Burton2018-08-141-3/+3
| | | | | | | | | 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>
* oeqa/sdk: add test that CMake worksRoss Burton2018-08-071-0/+68
| | | | | | | | | | | | 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>
* oeqa: rationalise Perl testsRoss Burton2018-07-261-18/+7
| | | | | | | | | | 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>
* oeqa/sdk/python: clean up Python testRoss Burton2018-07-181-25/+10
| | | | | | | | | | | 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>
* oeqa/sdk/cases/buildgalculator.py: skip if gettext not availableChen Qi2018-05-291-0/+2
| | | | | | | | | | | | | 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>
* oeqa/sdk: Replace buildiptables for buildlzip testsJose Perez Carranza2017-07-081-4/+4
| | | | | | | | | | | | | | | 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>
* oeqa/sdk/cases: Fix skip of buildgcalculator testAníbal Limón2017-06-121-1/+1
| | | | | | | | | | | 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>
* oeqa/sdk/cases: Added validation for SDK compatibility tests with eSDKFrancisco Pedraza2017-06-124-4/+8
| | | | | | | | | | | | | | | | | | 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>
* oeqa/sdk/cases/buildcpio: enable use of cached cpio from DL_DIRJoshua Lock2017-04-111-1/+1
| | | | | | | | | | | | | | 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>
* meta/lib/oeqa: change sdk test from cvs to cpiobrian avery2017-03-221-4/+4
| | | | | | | | | | | | | | | 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>
* oeqa/sdk: Updates sanity tests for minimal eSDKFrancisco Pedraza2017-01-312-0/+12
| | | | | | | | | | | | | | | 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>
* oeqa/sdkext/cases: Migrate test case to new OEQA frameworkAníbal Limón2017-01-232-3/+2
| | | | | | | | | | | | | | 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>
* classes/testsdk: Remove the need of TEST_LOG_DIR variableAníbal Limón2017-01-233-6/+6
| | | | | | | | | | | | | 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>
* oeqa/sdk/cases: Migrate tests to the new OEQA frameworkAníbal Limón2017-01-237-69/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* oeqa/sdk: Move test cases inside cases directoryAníbal Limón2017-01-237-0/+177
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>