[gnome-continuous-yocto/gnomeostree-3.28-rocko: 2297/8267] oeqa.buildperf: try harder when splitting 'nevr' string
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 2297/8267] oeqa.buildperf: try harder when splitting 'nevr' string
- Date: Sat, 16 Dec 2017 23:01:57 +0000 (UTC)
commit d021889ba9afd5629b976a550010813762473178
Author: Markus Lehtonen <markus lehtonen linux intel com>
Date: Wed Sep 7 10:28:45 2016 +0300
oeqa.buildperf: try harder when splitting 'nevr' string
Try to be more intelligent when splitting out recipe name, epoch,
version and revision from the buildstat directory name. Previous
assumption was that package versions never contain a dash but obviously
that is not necessarily true. The new assumption is that the package
version starts with a number.
(From OE-Core rev: 91d3fce1eb3e27d646afba8cf3c03ae560412d1d)
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>
meta/lib/oeqa/buildperf/base.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
index 2325cd1..7dfb2bf 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -425,8 +425,10 @@ class BuildPerfTestCase(unittest.TestCase):
"""Save buildstats"""
def split_nevr(nevr):
"""Split name and version information from recipe "nevr" string"""
- name, e_v, revision = nevr.rsplit('-', 2)
- match = re.match(r'^((?P<epoch>[0-9]{1,5})_)?(?P<version>.*)$', e_v)
+ n_e_v, revision = nevr.rsplit('-', 1)
+ match = re.match(r'^(?P<name>\S+)-((?P<epoch>[0-9]{1,5})_)?(?P<version>[0-9]\S*)$',
+ n_e_v)
+ name = match.group('name')
version = match.group('version')
epoch = match.group('epoch')
return name, epoch, version, revision
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]