Closed richtja closed 5 months ago
So there are a few possibilities here which can even be complementary:
Show where the resolution is coming from
In the case of having a good (`/tmp/good.json'):
{"kind": "avocado-instrumented", "uri": "examples/tests/passtest.py:PassTest.test"}
and /tmp/bad.json
:
{"kind": "avocado-instrumented", "uri": "examples/tests/passtes.py:PassTest.test"}
When doing a verbose list we currently have:
$ avocado -V list /tmp/good.json /tmp/bad.json
Type Test Tag(s)
avocado-instrumented examples/tests/passtest.py:PassTest.test
avocado-instrumented examples/tests/passtes.py:PassTest.test
What we could have is:
$ avocado -V list /tmp/good.json /tmp/bad.json
Type Test Resolver Tag(s)
avocado-instrumented examples/tests/passtest.py:PassTest.test runnable-recipe
avocado-instrumented examples/tests/passtes.py:PassTest.test runnable-recipe
A two-phase resolver feature
It maybe limited to resolvers such as runnable-recipe
and runnables-recipe
. This will require the resolvers that will implement this to be able to load new resolver classes based on the kind
of the resolution, and deduct the resolver that will perform the second phase. Further details bellow:
runnable-recipe
resolves bad.json
into:
{"kind": "avocado-instrumented", "uri": "examples/tests/passtest.py:PassTest.test"}
runnable-recipe
asks for the qualified resolver for avocado-instrumented
, receives a class that can perform the secondary resolutionrunnable-recipe
replaces its initial resolution with that from the secondary resolution, whether sucessful or notHi @clebergnu thank you for detailed description of possible solutions. Even tho I would like to have more robust solution, I think that two-phase resolver feature would add more complexity to resolvers implementation, and it will increase learning curve for avocado users, therefore I am satisfied with the first solution resolved in #5951. IMO, we can close this and come back in the future if it's needed.
Closing as resolved in #5951.
Describe the bug When you make a mistake in a test uri in a recipe file, avocado will resolve this file without any issues. This bug makes avocado raise errors during test runtime.
Steps to reproduce recipe file with wrong uri:
Expected behavior
Current behavior