Skip to content

Add --no-save command#358

Open
LouisLeNezet wants to merge 5 commits intoaskimed:mainfrom
LouisLeNezet:no_save
Open

Add --no-save command#358
LouisLeNezet wants to merge 5 commits intoaskimed:mainfrom
LouisLeNezet:no_save

Conversation

@LouisLeNezet
Copy link
Copy Markdown

This PR introduce the --no-save flag for the test subcommand.
When a test is successfully ran, the launch directory is deleted to save disk space.

This should be particularly useful for small machine like github action runner.

Closes #298
Closes #315

Comment thread src/main/java/com/askimed/nf/test/commands/RunTestsCommand.java Outdated
&& !debug
) {
try {
File launchDir = test.getLaunchDir();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too familiar with this part of the code. Is launchDir the part where you execute nf-test from or the path where the test is executed from?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

launchDir is the root of where the nf-test is launch from of the form .nf-test/tests/hash/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay perfect! Thanks for the clarification

Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@nvnieuwk nvnieuwk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @lukfor could you also do a quick check that I didn't miss anything?

assertEquals(0, exitCode);

}
}Expected test directories to exist without --no-save
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you double check this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the mistake.
This is done.

@lukfor
Copy link
Copy Markdown
Collaborator

lukfor commented Mar 24, 2026

LGTM. If the test case has been fixed, we can merge it. Thanks a lot! ✌️

@lukfor
Copy link
Copy Markdown
Collaborator

lukfor commented Mar 24, 2026

Great. Thanks Louis!

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

Successfully merging this pull request may close these issues.

Add a --clean option to nf-test test Saving resources with --no-save

3 participants