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

Add -t / --test override for execute #3362

Open
comps opened this issue Nov 14, 2024 · 0 comments
Open

Add -t / --test override for execute #3362

comps opened this issue Nov 14, 2024 · 0 comments

Comments

@comps
Copy link
Contributor

comps commented Nov 14, 2024

Currently, we are able to split tmt execution by simply specifying the steps one-at-a-time, using --before, --after, or just manually specifying them, ie.

$ tmt \
    -c distro=rhel-9.5 -c arch=x86_64 \
    run -i /var/tmp/tmt/unique_test_dir \
        plans -n /plans/default \
        discover -h fmf \
        prepare -e SOME_VAR=123 \
        provision -h connect -k ~/.ssh/id_rsa -u user -g some_hostname

$ tmt \
    run -i /var/tmp/tmt/unique_test_dir \
        execute -h tmt

...

and this would be great in a use case where we want to execute multiple tests, possibly one-at-a-time, on the given guest, ie. when using snapshotting or re-running on failure, or just having multiple (dynamically added/removed) guests and load-balancing test execution amongst them.

This is doable by specifying all tests for discover (so they are all present in discover/tests.yaml), but then there is no way to run only one of those tests for execute, we would need to restart discover + prepare (which can take a long time).

Would it be possible to add some "filter" to execute -h tmt that would simply further filter discover/tests.yaml with the given expression? Kind of like discover is able to do --test / --filter / --exclude on top of what the plan specifies?

(Yes, the obvious hack is to modify tests.yaml, but I was hoping for a more standard solution.)

Thanks!

@comps comps changed the title Add -t / --tests override for execute Add -t / --test override for execute Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant