You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
On the legacy runner was different approach in listing avocado tests. The avocado had a default test directory under datadir.paths.test_dir variable and it was possible to run avocado list command to list all tests from this default directory. When we moved from the legacy architecture to the resolver architecture, we removed this functionality. Now users have to specify the path to the test directory in the avocado command like this avocado list examples/tests/
When you run many different sets of tests in one avocado job, it will save time to specific the path to the test directory where the tests are stored. This feature will bring back the datadir.paths.test_dir feature from the legacy architecture.
$ cat job.py
#!/usr/bin/env python3
import sys
from avocado.core.job import Job
from avocado.core.suite import TestSuite
job_config = {
"datadir.paths.test_dir": "examples/tests",
}
suite_pass_config = {
"resolver.references": ["/bin/true", "passtest.py"],
}
suite_fail_config = {
"resolver.references": ["failtest.py"],
}
with Job(
config=job_config,
test_suites=[
TestSuite.from_config(suite_pass_config, name="pass"),
TestSuite.from_config(suite_fail_config, name="fail"),
]
) as j:
sys.exit(j.run())
$ python job.py
JOB ID : af6e3bf63665ecf3a9d1e1b3a1111fe66ec7b76e
JOB LOG : /home/janrichter/avocado/job-results/job-2023-01-12T16.00-af6e3bf/job.log
(pass-2/2) examples/tests/passtest.py:PassTest.test: STARTED
(pass-1/2) /bin/true: STARTED
(pass-1/2) /bin/true: PASS (0.01 s)
(pass-2/2) examples/tests/passtest.py:PassTest.test: PASS (0.02 s)
(fail-1/1) examples/tests/failtest.py:FailTest.test: STARTED
(fail-1/1) examples/tests/failtest.py:FailTest.test: FAIL: This test is supposed to fail (0.04 s)
RESULTS : PASS 2 | ERROR 0 | FAIL 1 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML : /home/janrichter/avocado/job-results/job-2023-01-12T16.00-af6e3bf/results.html
JOB TIME : 2.56 s
Additional information
The legacy datadir.paths.test_dir variable still has some leftovers in code and documentation. Part of this issue should be removed unnecessary legacy code of test_dir feature.
Is your feature request related to a problem? Please describe.
On the legacy runner was different approach in listing avocado tests. The avocado had a default test directory under
datadir.paths.test_dir
variable and it was possible to runavocado list
command to list all tests from this default directory. When we moved from the legacy architecture to the resolver architecture, we removed this functionality. Now users have to specify the path to the test directory in the avocado command like thisavocado list examples/tests/
When you run many different sets of tests in one avocado job, it will save time to specific the path to the test directory where the tests are stored. This feature will bring back the
datadir.paths.test_dir
feature from the legacy architecture.Describe the solution you'd like
Job API usage:
Additional information
The legacy
datadir.paths.test_dir
variable still has some leftovers in code and documentation. Part of this issue should be removed unnecessary legacy code of test_dir feature.This issue is based on #5571
The text was updated successfully, but these errors were encountered: