[oe-commits] [openembedded-core] 04/49: oe-build-perf-report: accept parenthesis in tag names
git at git.openembedded.org
git at git.openembedded.org
Sun Nov 5 22:42:23 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch pyro
in repository openembedded-core.
commit f2a7a52b7a0915bd9905b3244b7b0deb6795205d
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Thu May 4 14:49:57 2017 +0300
oe-build-perf-report: accept parenthesis in tag names
(From OE-Core rev: b1feae0e23300ea3894d14d2e7b1c1f8b419146e)
Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
scripts/oe-build-perf-report | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/scripts/oe-build-perf-report b/scripts/oe-build-perf-report
index ced5ff2..876e3b1 100755
--- a/scripts/oe-build-perf-report
+++ b/scripts/oe-build-perf-report
@@ -62,11 +62,13 @@ def get_test_runs(repo, tag_name, **kwargs):
log.debug("Found %d tags matching pattern '%s'", len(tags), tag_pattern)
# Parse undefined fields from tag names
- str_fields = dict([(f, r'(?P<{}>[\w\-.]+)'.format(f)) for f in field_names])
+ str_fields = dict([(f, r'(?P<{}>[\w\-.()]+)'.format(f)) for f in field_names])
str_fields['commit'] = '(?P<commit>[0-9a-f]{7,40})'
str_fields['commit_number'] = '(?P<commit_number>[0-9]{1,7})'
str_fields['tag_number'] = '(?P<tag_number>[0-9]{1,5})'
- str_fields.update(kwargs)
+ # escape parenthesis in fields in order to not messa up the regexp
+ fixed_fields = dict([(k, v.replace('(', r'\(').replace(')', r'\)')) for k, v in kwargs.items()])
+ str_fields.update(fixed_fields)
tag_re = re.compile(tag_name.format(**str_fields))
# Parse fields from tags
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list