Skip to content
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

avocado list --filter-by-tags broken on version >= 106 #6066

Open
hjelmeland opened this issue Nov 6, 2024 · 4 comments
Open

avocado list --filter-by-tags broken on version >= 106 #6066

hjelmeland opened this issue Nov 6, 2024 · 4 comments
Assignees
Labels

Comments

@hjelmeland
Copy link

hjelmeland commented Nov 6, 2024

Describe the bug
avocado list --filter-by-tags list all tests in directory, no matter what tag expression is used.

Last good version: 105

System information:

  • OS:Ubuntu 22.04.3
  • Avocado version: 108
  • Avocado installation method: pip3
@hjelmeland hjelmeland added the bug label Nov 6, 2024
@mr-avocado mr-avocado bot moved this to Triage in Default project Nov 6, 2024
@richtja
Copy link
Contributor

richtja commented Nov 8, 2024

Hi @hjelmeland, thank you for opening this issue. Can you please provide some example with wrong behaviour? It will help me to reproduce this issue. Thank you very much.

@hjelmeland
Copy link
Author

Create test.py:

from avocado import Test

class filterByTags(Test):
    def test_filterByTags(self):
        pass

Then do avocado list -t sometag test.py

With avocado 105 no test is listed, as expected.

With avocado >= 106 the test is listed, not as expected.

Adding a tag like """:avocado: tags=disabled""" to the test makes no difference on avocado >= 106.

@hjelmeland
Copy link
Author

hjelmeland commented Nov 9, 2024

for the test I ran ubuntu 22:04 docker container and did

pip install --force-reinstall avocado-framework==105
pip install --force-reinstall avocado-framework==106

@richtja
Copy link
Contributor

richtja commented Nov 11, 2024

Hi @hjelmeland, thank you very much for the reproducer. I was able to reproduce it.

It looks like that it is located only to the list plugin, because the overall tag filtering works well. Also when I use the --verbose option the results are still wrong, but the test summary is correct.

$ avocado -V list -t fast examples/tests/
Type                 Test                                                                       Uri                                                                        Resolver             Tag(s)
avocado-instrumented examples/tests/abort.py:AbortTest.test                                     examples/tests/abort.py:AbortTest.test                                     avocado-instrumented failure_expected
avocado-instrumented examples/tests/assert.py:Assert.test_assert_raises                         examples/tests/assert.py:Assert.test_assert_raises                         avocado-instrumented
avocado-instrumented examples/tests/assert.py:Assert.test_fails_to_raise                        examples/tests/assert.py:Assert.test_fails_to_raise                        avocado-instrumented
avocado-instrumented examples/tests/assets.py:Hello.test_gpg_signature                          examples/tests/assets.py:Hello.test_gpg_signature                          avocado-instrumented
avocado-instrumented examples/tests/assets.py:Hello.test_build_run                              examples/tests/assets.py:Hello.test_build_run                              avocado-instrumented
avocado-instrumented examples/tests/cabort.py:CAbort.test                                       examples/tests/cabort.py:CAbort.test                                       avocado-instrumented requires_c_compiler
avocado-instrumented examples/tests/cancel_on_exception.py:CancelOnException.test               examples/tests/cancel_on_exception.py:CancelOnException.test               avocado-instrumented
avocado-instrumented examples/tests/cancel_test.py:CancelTest.test_iperf                        examples/tests/cancel_test.py:CancelTest.test_iperf                        avocado-instrumented
avocado-instrumented examples/tests/cancel_test.py:CancelTest.test_gcc                          examples/tests/cancel_test.py:CancelTest.test_gcc                          avocado-instrumented
avocado-instrumented examples/tests/cancelonsetup.py:CancelOnSetupTest.test_wont_be_executed    examples/tests/cancelonsetup.py:CancelOnSetupTest.test_wont_be_executed    avocado-instrumented
avocado-instrumented examples/tests/canceltest.py:CancelTest.test                               examples/tests/canceltest.py:CancelTest.test                               avocado-instrumented
avocado-instrumented examples/tests/cit_parameters.py:CitParameters.test                        examples/tests/cit_parameters.py:CitParameters.test                        avocado-instrumented fast
exec-test            examples/tests/custom_env_variable.sh                                      examples/tests/custom_env_variable.sh                                      exec-test
...
TEST TYPES SUMMARY
==================
avocado-instrumented: 4

TEST TAGS SUMMARY
=================
fast: 4
net: 2

@harvey0100 harvey0100 self-assigned this Nov 12, 2024
@richtja richtja moved this from Triage to Short Term (Current Q) Backlog in Default project Nov 12, 2024
@richtja richtja added this to the 109 - Codename TBD milestone Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Short Term (Current Q) Backlog
Development

No branches or pull requests

3 participants