diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2017-01-13 15:12:39 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-19 22:45:45 +0000 |
commit | fce531c21f5e56d0f416b3405a0b0fc5ba567679 (patch) | |
tree | 918ee49b0d3bf5a81abdcaea0886ac41befe69dd /scripts/oe-selftest | |
parent | 0156ef46ccf5334ee72f0202f1089249c62af37b (diff) | |
download | openembedded-core-fce531c21f5e56d0f416b3405a0b0fc5ba567679.tar.gz openembedded-core-fce531c21f5e56d0f416b3405a0b0fc5ba567679.tar.bz2 openembedded-core-fce531c21f5e56d0f416b3405a0b0fc5ba567679.zip |
oeqa.utils.metadata: drop 'unknown' git data elements
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]
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/oe-selftest')
-rwxr-xr-x | scripts/oe-selftest | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/oe-selftest b/scripts/oe-selftest index c3c491f20a..78806a6a22 100755 --- a/scripts/oe-selftest +++ b/scripts/oe-selftest @@ -603,7 +603,7 @@ def main(): r_branches = set(r_branches.replace('origin/', '').split()) l_branches = {str(branch) for branch in repo.branches} branch = '%s/%s/%s' % (metadata['hostname'], - metadata['layers']['meta']['branch'], + metadata['layers']['meta'].get('branch', '(nogit)'), metadata['machine']) if branch in l_branches: @@ -631,7 +631,7 @@ def main(): layer_info = '' for layer, values in metadata['layers'].items(): layer_info = '%s%-17s = %s:%s\n' % (layer_info, layer, - values['branch'], values['revision']) + values.get('branch', '(nogit)'), values.get('revision', '0'*40)) msg = 'Selftest for build %s of %s for machine %s on %s\n\n%s' % ( log_prefix[12:], metadata['distro']['pretty_name'], metadata['machine'], metadata['hostname'], layer_info) |