Skip to content

Conversation

@marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Jun 21, 2021

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

@marc-hb
Copy link
Collaborator Author

marc-hb commented Jun 21, 2021

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.

@marc-hb marc-hb force-pushed the test-simpler-713 branch from ce6ee02 to 29e2b19 Compare June 21, 2021 19:13
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>
@marc-hb marc-hb force-pushed the test-simpler-713 branch from 29e2b19 to 1721a5f Compare June 21, 2021 19:13
@marc-hb marc-hb changed the title [TEST] sof-tplgreader: don't use RE for pipeline filtering sof-tplgreader: don't use RE for pipeline filtering Jun 21, 2021
@marc-hb marc-hb marked this pull request as ready for review June 21, 2021 19:15
@marc-hb marc-hb requested a review from a team as a code owner June 21, 2021 19:15
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
Copy link
Contributor

@fredoh9 fredoh9 Jun 21, 2021

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)

Copy link
Contributor

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.

Copy link
Collaborator Author

@marc-hb marc-hb Jun 21, 2021

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.

Copy link
Contributor

@fredoh9 fredoh9 Jun 21, 2021

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.

@fredoh9 fredoh9 requested a review from aiChaoSONG June 21, 2021 19:52
@marc-hb
Copy link
Collaborator Author

marc-hb commented Jun 21, 2021

Copy link
Contributor

@fredoh9 fredoh9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@marc-hb marc-hb merged commit ce58aed into thesofproject:main Jun 21, 2021
@marc-hb marc-hb deleted the test-simpler-713 branch June 21, 2021 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants