-
Notifications
You must be signed in to change notification settings - Fork 343
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
Tags Filtering Fix #6083
Tags Filtering Fix #6083
Conversation
f814496
to
d441d2b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6083 +/- ##
==========================================
+ Coverage 68.63% 68.65% +0.02%
==========================================
Files 202 202
Lines 21910 21932 +22
==========================================
+ Hits 15037 15058 +21
- Misses 6873 6874 +1 ☔ View full report in Codecov by Sentry. |
d441d2b
to
5c20a23
Compare
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.
Hi @harvey0100, thanks for this! While it fixes the issue, I believe having the exact behavior of the filtering reused is a must.
Also, adding test coverage so that this doesn't happen again is appreciated. Something as simple as this:
diff --git a/selftests/functional/list.py b/selftests/functional/list.py
index 2be6213e3..71f0b1354 100644
--- a/selftests/functional/list.py
+++ b/selftests/functional/list.py
@@ -153,6 +153,23 @@ class ListTestFunctional(TestCaseTmpDir):
(f"Avocado did not return rc " f"{exit_codes.AVOCADO_ALL_OK}:\n{result}"),
)
stdout_lines = result.stdout_text.splitlines()
+ self.assertRegex(
+ stdout_lines[1],
+ r"avocado-instrumented\s.*examples/tests/cit_parameters.py:CitParameters.test\s.*examples/tests/cit_parameters.py:CitParameters.test\savocado-instrumented\sfast",
+ )
+ self.assertRegex(
+ stdout_lines[2],
+ r"avocado-instrumented\s.*examples/tests/passtest.py:PassTest.test\s.*examples/tests/passtest.py:PassTest.test\s.*avocado-instrumented\sfast",
+ )
+ self.assertRegex(
+ stdout_lines[3],
+ r"avocado-instrumented\s.*examples/tests/tags.py:FastTest.test_fast\s.*examples/tests/tags.py:FastTest.test_fast\s.*avocado-instrumented\snet,fast",
+ )
+ self.assertRegex(
+ stdout_lines[4],
+ r"avocado-instrumented\s.*examples/tests/tags.py:FastTest.test_fast_other\s.*examples/tests/tags.py:FastTest.test_fast_other\s.*avocado-instrumented\snet,fast",
+ )
+ self.assertEqual("", stdout_lines[5])
self.assertIn("TEST TYPES SUMMARY", stdout_lines)
self.assertIn("avocado-instrumented: 4", stdout_lines)
self.assertIn("TEST TAGS SUMMARY", stdout_lines)
Should do the trick.
Thanks!
d4624dd
to
51492c3
Compare
Filtering now properly handles both verbose and non-verbose output modes while checking for tag matches. without changing the existing behavior that users expect when using 'avocado list -t <tag>' Reference: avocado-framework#6066 Signed-off-by: Harvey Lynden <hlynden@redhat.com>
51492c3
to
b05ace0
Compare
Hi @clebergnu Thanks for your comments, in complete agreement I've made the changes as requested :) |
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.
LGTM, thanks!
Filtering now properly handles both verbose and non-verbose output modes while checking for tag matches.
without changing the existing behavior that users expect when using 'avocado list -t '
Reference: #6066