summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-09-08 19:47:46 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-13 15:18:42 +0100
commit936eb9aac055f1d4f41bb351477a0f5bebf76a0e (patch)
tree8961fbcf997ea95ec7bb82e73fb125ac7e840e67 /meta/lib
parent0445e68fdbbba5c4efb6422c89ee864e4273b114 (diff)
downloadopenembedded-core-936eb9aac055f1d4f41bb351477a0f5bebf76a0e.tar.gz
openembedded-core-936eb9aac055f1d4f41bb351477a0f5bebf76a0e.tar.bz2
openembedded-core-936eb9aac055f1d4f41bb351477a0f5bebf76a0e.zip
oeqa.buildperf: another fix for splitting 'nevr' string
When processing buildstats we determine recipe name, epoch, version and revision from the per-recipe buildstat directory name. One previous patch made an assumption that package version starts with a number. That might not be true because of a packaging mistake or whatever reason. Thus, if a version starting with a number is not found, fall back to the "old" method of just taking the second-last dash-delimited part (the one before revision). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/buildperf/base.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py
index 9700c05925..2c102554b9 100644
--- a/meta/lib/oeqa/buildperf/base.py
+++ b/meta/lib/oeqa/buildperf/base.py
@@ -428,6 +428,11 @@ class BuildPerfTestCase(unittest.TestCase):
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)
+ if not match:
+ # If we're not able to parse a version starting with a number, just
+ # take the part after last dash
+ match = re.match(r'^(?P<name>\S+)-((?P<epoch>[0-9]{1,5})_)?(?P<version>[^-]+)$',
+ n_e_v)
name = match.group('name')
version = match.group('version')
epoch = match.group('epoch')