-
Notifications
You must be signed in to change notification settings - Fork 59
sof-tplgreader: don't use RE for pipeline filtering #715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
https://sof-ci.01.org/softestpr/PR715/build752/devicetest is all green. EDIT: I force-pushed 1721a5f which has the exact same code, I merely cleaned-up the commit message. |
ce6ee02 to
29e2b19
Compare
If we have two pipelines with id=1 and id=10, current RE is not able to filter these two pipelines from each other. This patch deprecates RE and use string comparison for pipeline filtering. v2 by Marc: don't add support for non-lists, see thesofproject#713 review for details. Signed-off-by: Chao Song <chao.song@linux.intel.com> Signed-off-by: Marc Herbert <marc.herbert@intel.com>
29e2b19 to
1721a5f
Compare
| check = True if key in line.keys() else False | ||
| else: | ||
| # match for 'keyword'/'keyword [0-9]' target line | ||
| check = len ([em for em in value if re.match(em + '$|' + em + '[^a-zA-Z]', str(line[key]), re.I)]) > 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK with this patch, but time to remove "import re"?
tools/sof-tplgreader.py:5:0: W0611: Unused import re (unused-import)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marc-hb Can you address this before 2 PM PST? So that we can merge this before daily cut-off time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed this (there are too many other, unrelated pylint warnings). I'll rebase doc fix #714 and add it (the removal!) there remove the import in rebase #714 after this one is merged OK? @plbossart said he needs this one ASAP to unblock Linux PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#714 still need re, can you rebase this?
I'm OK to merge this with or without this fix.
|
https://sof-ci.01.org/softestpr/PR715/build754/devicetest is all green again. |
fredoh9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
If we have two pipelines with id=1 and id=10, current
RE is not able to filter these two pipelines from each
other.
This patch deprecates RE and use string comparison for
pipeline filtering.
v2 by Marc: don't add support for non-lists, see #713 review for
details.
Signed-off-by: Chao Song chao.song@linux.intel.com
Signed-off-by: Marc Herbert marc.herbert@intel.com