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

Interrupt to run post test workers #5871

Open
AdamWHuffman opened this issue Feb 22, 2024 · 2 comments
Open

Interrupt to run post test workers #5871

AdamWHuffman opened this issue Feb 22, 2024 · 2 comments

Comments

@AdamWHuffman
Copy link

I have implemented multiple pre and post test plugins to support various hosts.

When I run avocado run <test> -m <muxfile> for example, then I send an interrupt, I would like a way to run all of the post test workers so that my assets are cleaned up. These assets include hosts like ansible-created VMs that are left running.

An alternative is signal handlers inside of my plugins, but this causes quite a few issue as they must ignore the signals from the base avocado workers.

This may already be possible with configurations, but I have not yet found the option.

@AdamWHuffman AdamWHuffman changed the title Interrupt Runs Post Test Task Types Interrupt to run post test workers Feb 22, 2024
@richtja
Copy link
Contributor

richtja commented Feb 26, 2024

Hi @AdamWHuffman, thank you for creating this issue. You are right, this hasn't been implemented in avocado yet. Right now, avocado will terminate all the tasks and won't run the post test ones on terminated signal.

I agree with you that we should support post test plugins for clean-ups. IMO, we can create PostTestCleanup interface from PostTest plugins which will ensure the same behaviour as TearDown method in avocado-instrumented tests for post-test plugins. @clebergnu what do you think?

@richtja richtja added the bug label Feb 26, 2024
@clebergnu clebergnu removed the bug label Jul 24, 2024
@clebergnu
Copy link
Contributor

It's our understanding that Avocado currently does not offer the clean up for interrupted tests in a test-agnostic way (only avocado-isntrumented tests allow for that).

It'd a nice improvement, but not a bug per-se.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Long Term (Next Q) Backlog
Development

No branches or pull requests

3 participants