Open hjelmeland opened 2 weeks ago
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.
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.
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
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
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: