summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/targetbuild.py
AgeCommit message (Collapse)Author
2021-09-26oeqa/buildproject: Ensure temp directories are cleaned upRichard Purdie
(From OE-Core rev: d10aff865120a5feecc42c24726bd119364e0188) 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>
2018-12-05oeqa: don't litter /tmp with temporary directoriesRoss Burton
If we need to create a temporary directory in targetbuild or buildproject use tempfile.TemporaryDirectory so that when the test case is finished, the directory is deleted. Also synchronise the logic and don't possibly store the temporary directory in self.tmpdir as nothing uses that. (From OE-Core rev: db0e658097130d146752785d0d45f46a3e0bad71) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-28meta: Fix return value checks from subprocess.call()'sMikko Rapeli
Python function subprocess.call() returns the return value of the executed process. If return values are not checked, errors may go unnoticed and bad things can happen. Change all callers of subprocess.call() which do not check for the return value to use subprocess.check_call() which raises CalledProcessError if the subprocess returns with non-zero value. https://docs.python.org/2/library/subprocess.html#using-the-subprocess-module All users of the function were found with: $ git grep "subprocess\.call" | \ egrep -v 'if.*subprocess\.call|=\ +subprocess\.call|return.*subprocess\.call' Tested similar patch on top of yocto jethro. Only compile tested core-image-minimal on poky master branch. (From OE-Core rev: 578c8205fd14c48c6d30ef2889d86f1b4aee060a) Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-06oeqa/utils/targetbuild: tmp dir improvementsJoshua Lock
Don't hard-code /tmp as the tmpdir, instead use WORKDIR as the tmpdir if the instantiater doesn't specify a value. (From OE-Core rev: c43c966e0ed4ed836bdf90b1d4c3f2f45426f1ec) Signed-off-by: Joshua Lock <joshua.g.lock@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>
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-06-23oeqa/targetbuild: use os.path.join instead of string concatenationRoss Burton
(From OE-Core rev: 1d40f6e3d85d0cd3be6dd784677686ed4dec89c4) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-23oeqa/targetbuild: add extra_cmds argument to run_configureRoss Burton
Some upstreams need more than just gnu-configize ran before ./configure works, such as ./autogen.sh or autoreconf. Add extra_args (defaulting to gnu-configize) so that this can be done in test cases. (From OE-Core rev: 7096f2889f1623ce97a6696f6f4c7217f0efb972) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-23oeqa/targetbuild: fix folder name estimate logicRoss Burton
The re.sub() used to transform a tarball into a best guess folder name wasn't right, as there isn't enough escaping and tar.xz was missing. (From OE-Core rev: ac99135b009a1066486ed2afb2f298d0a5a3a854) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Complete transition to python3Richard Purdie
This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. (From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-12oeqa/targetbuild: Ensure we run gnu-configize so config files are up to dateRichard Purdie
On aarch64 we need to do this as the versions in the upstream source don't recognise the target triplet causing SDK test failures. (From OE-Core rev: 2374bfa3b98f787f4559f14a60647e4c2b051274) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19oeqa/targetbuild: Remove bashismRichard Purdie
Use '.' instead of 'source' so this works with dash as /bin/sh. (From OE-Core rev: 4114c904f173721c682f9ed1a593c77307ef9d35) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-29oeqa/targetbuild: Use DL_DIR for downloads if presentRichard Purdie
This isn't a test of wget so if the files we need are present in DL_DIR, use them from there and save a bit of speed/bandwidth and skip the wget. (From OE-Core rev: dc1d83d021afd77ca8fb948dc47bbd11e3844865) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-18oeqa/utils/targetbuild.py: add support for sdk testsCorneliu Stoicescu
- Create new abstract class BuildProject that provides basic functionality for a project/package building class * contains abstract method _run() that needs to be implemented by all extending classes. - The old TargetBuildProject class now extends the abstract BuildProjct class - Introducing new SDKBuildProject that extends the abstract BuildProjct class NOTE: Original patch made by: Richard Purdie <richard.purdie@linuxfoundation.org> (From OE-Core rev: bc8824fd361dbff96f5b5316ddfda36e96e8ea9b) Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-11oeqa/utils: targetbuild: take proxy into accountStefan Stanacar
A previous commit broke downloads when proxies are involved, let's fix it. (From OE-Core rev: 97e263b99cbe8184a74f80738fd471cfdef29e0c) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-09oeqa/utils: targetbuild: don't use bb.fetch anymoreStefan Stanacar
When running tests outside of the build system we can't use bb.fetch anymore. It was nice but tests and their modules need to rely on the data storage only as that gets exported. This module is used by the oeqa/runtime/build* tests. (From OE-Core rev: 3caf8e244ea94f62a93f3b40e73e15ea78fc2880) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26lib/oeqa/utils: targetbuild: Add helper class for building packages on targetMihai Prica
This class can be used for test cases that configure and build packages on target. (From OE-Core rev: 4b15e82c4fcb0c40b0e316ef2050944eee4418ef) Signed-off-by: Mihai Prica <mihai.prica@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>