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

All tests' meta/output/work directories are deleted and recreated unnecessarily #213

Closed
jmuhlich opened this issue Apr 30, 2024 · 0 comments · Fixed by #214
Closed

All tests' meta/output/work directories are deleted and recreated unnecessarily #213

jmuhlich opened this issue Apr 30, 2024 · 0 comments · Fixed by #214

Comments

@jmuhlich
Copy link
Contributor

When running nf-test list, or nf-test test on a specific list of tests, the entire sub-directory under .nf-test/tests/ is re-initialized to its original state. All generated test setup files and test outputs are deleted. This makes it very annoying to work on fixing tests as all output is deleted just by running nf-test list or running an unrelated test. Furthermore it makes parallelizing tests needlessly difficult -- an obvious trick like nf-test list --format=raw --silent | parallel nf-test test fails random tests due to the race condition of each instance potentially deleting files that other tests just wrote.

I believe the cause is that the directory re-initialization is run too aggressively even when the test case isn't going to be executed:

launchDir = initDirectory("Launch Directory", testDirectory, DIRECTORY_TESTS, getHash());
metaDir = initDirectory("Meta Directory", launchDir, DIRECTORY_META);
outputDir = initDirectory("Output Directory", launchDir, DIRECTORY_OUTPUT);
workDir = initDirectory("Working Directory", launchDir, DIRECTORY_WORK);

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 a pull request may close this issue.

1 participant