summaryrefslogtreecommitdiffstats
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:32:43 +0100
commitd021889ba9afd5629b976a550010813762473178 (patch)
tree7603fd70fb36ffa8f1cb05aa2830d49f5697f4f9 /meta/lib/oeqa/buildperf
parent4594f25fb00a87296e6622d3a95d496166b81776 (diff)
downloadpoky-d021889ba9afd5629b976a550010813762473178.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. (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>
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 2325cd1d6b..7dfb2bff37 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -425,8 +425,10 @@ class BuildPerfTestCase(unittest.TestCase):
425 """Save buildstats""" 425 """Save buildstats"""
426 def split_nevr(nevr): 426 def split_nevr(nevr):
427 """Split name and version information from recipe "nevr" string""" 427 """Split name and version information from recipe "nevr" string"""
428 name, e_v, revision = nevr.rsplit('-', 2) 428 n_e_v, revision = nevr.rsplit('-', 1)
429 match = re.match(r'^((?P<epoch>[0-9]{1,5})_)?(?P<version>.*)$', e_v) 429 match = re.match(r'^(?P<name>\S+)-((?P<epoch>[0-9]{1,5})_)?(?P<version>[0-9]\S*)$',
430 n_e_v)
431 name = match.group('name')
430 version = match.group('version') 432 version = match.group('version')
431 epoch = match.group('epoch') 433 epoch = match.group('epoch')
432 return name, epoch, version, revision 434 return name, epoch, version, revision