summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/metadata.py
Commit message (Collapse)AuthorAgeFilesLines
* oeqa/utils/metadata: Allow to function without the git moduleRichard Purdie2018-10-291-2/+15
| | | | | | | | | | The python git module may or may not be enabled, allow this code to function without it, falling back to the same method as metadata_scm.bbclass uses. This will be cleaned up in the next round of feature development. (From OE-Core rev: 6350586ba9f4a4107a2d457590824cd4d662d5b9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe.lsb: add get_os_release()Markus Lehtonen2017-05-161-13/+3
| | | | | | | | | | | | Move get_os_release() from oeqa.utils.metadata to oe.lsb, merging the code with release_dict_osr() from oe.lsb. This removes some code duplication and makes get_os_release() more robust. (From OE-Core rev: 56b883f7765f6bd72e83dec26a5db8c7108c835d) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.utils.metadata: include BB_NUMBER_THREADS and PARALLEL_MAKEMarkus Lehtonen2017-01-191-1/+1
| | | | | | | | | | | | Inlude values of BB_NUMBER_THREADS and PARALLEL_MAKE in the metadata. [YOCTO #10590] (From OE-Core rev: 97c07a55815c2fc3915705317b6f30d212fa1d45) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.utils.metadata: allow storing any bitbake config variablesMarkus Lehtonen2017-01-191-3/+9
| | | | | | | | | | | | | | | | | | | Make it possible to store any bitbake config variables in the metadata. Config values will be stored under a new config element in the xml report: <config> <variable name="MACHINE">qemux86</variable> </config> The value of MACHINE is moved there instead of having a dedicated <machine> element. [YOCTO #10590] (From OE-Core rev: 6e7e6e37664b0a86111272f5f6f4a4e1d0f23302) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.utils.metadata: add bitbake revision informationMarkus Lehtonen2017-01-191-13/+19
| | | | | | | | | | [YOCTO #10590] (From OE-Core rev: 71ca7dab08fc500b231054249aacc90ae4aa85da) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.utils.metadata: have layer name as an attribute in xmlMarkus Lehtonen2017-01-191-3/+5
| | | | | | | | | | | | | | Have the layer name as an attribute instead of of the name of the element itself. That is, have <layer name="layer_name"/> instead of <layer_name/>. A bit better XML design. [YOCTO #10590] (From OE-Core rev: 50ea44c19005b536a2791113f8b536fd10548ead) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.utils.metadata: add commit count informationMarkus Lehtonen2017-01-191-1/+2
| | | | | | | | | | | | Makes it easier to put the commits into a timeline. [YOCTO #10590] (From OE-Core rev: 7757970bced4ecd6503991c0cf11f4d9158f650c) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.utils.metadata: rename 'revision' to 'commit'Markus Lehtonen2017-01-191-1/+1
| | | | | | | | | | | | | | Revision is a bit vague and could point to a tag, for example. Git commit objects are unambiguous and persistent so be explicit that the element should contain git commit hash. [YOCTO #10590] (From OE-Core rev: a6521b89e86ddba6bd646dd3974d7b0390323b56) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.utils.metadata: fix retrieval of git branch and revisionMarkus Lehtonen2017-01-191-3/+5
| | | | | | | | | | | | | | | Always return a valid branch name, or, '(nobranch)' if the current HEAD is detached. Also, always return the hash of the commit object that HEAD is pointing to. Previous code returned an incorrect branch name (or crashed) e.g. in the case of detached HEAD. [YOCTO #10590] (From OE-Core rev: 02d3ba17a8090bd088beb973980651d664f713bb) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.utils.metadata: drop 'unknown' git data elementsMarkus Lehtonen2017-01-191-4/+3
| | | | | | | | | | | | | It's better just to not have the xml elements than to have elements with faux data. One could have git branch named 'unknown', for example. [YOCTO #10590] (From OE-Core rev: fce531c21f5e56d0f416b3405a0b0fc5ba567679) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.utils.metadata: re-organise distro informationMarkus Lehtonen2017-01-191-7/+10
| | | | | | | | | | | | | Use the same format, based on /etc/os-release, as for host distro information. [YOCTO #10590] (From OE-Core rev: 0156ef46ccf5334ee72f0202f1089249c62af37b) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa.utils.metadata: re-organise host distro informationMarkus Lehtonen2017-01-191-5/+21
| | | | | | | | | | | | | | | | Put all host distro data under one <host_distro> element. In addition take the data directly from /etc/os-release instead of the "lsb API". The /etc/os-release file is virtually ubiquitous, now, and using its field names and values provides a more standardized and extensible format. [YOCTO #10590] (From OE-Core rev: 98cad0b4063772dad94fea96edce1a5422256c32) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: import git module only when neededEd Bartosh2016-12-201-1/+1
| | | | | | | | | | | | | | | | | git module is not included into standard Python library and therefore causes import errors on the systems where PythonGit is not installed. As git module only used in the code implementing --repository functionality it's better to import git only in the scope that requires it. [YOCTO #10821] (From OE-Core rev: 66be32c1a075201d6ee0e9b9e10b84e6a2ace745) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/metadata.py: Add metadata libraryMariano Lopez2016-12-131-0/+83
Adds functions to get metadata from the host running the tests. [YOCTO #9954] (From OE-Core rev: 10b05794254886e55c76f29f7778d783c550befa) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>