aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/buildperf
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-09-07 10:28:45 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-08 00:31:40 +0100
commit91d3fce1eb3e27d646afba8cf3c03ae560412d1d (patch)
tree1b2abac424dcbbd9575e84de823db7a9d4ce2bb5 /meta/lib/oeqa/buildperf
parent948583fcd328b53289c6735d3e355c8fe2da680e (diff)
downloadopenembedded-core-contrib-91d3fce1eb3e27d646afba8cf3c03ae560412d1d.tar.gz
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. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oeqa/buildperf')
-rw-r--r--meta/lib/oeqa/buildperf/base.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
index 2325cd1d6be..7dfb2bff374 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