<@U03R5TJ77GF> I'm playing with the cleanup, did y...
# nf-test
m
@Jim Downie I'm playing with the cleanup, did you ever use this to delete the whole test folder after each test?
j
I did but I didn’t like it as it runs even if the test fails, so you can’t debug easily
m
I'm thinking that can be controlled
I find I often want to just update snapshot
especially for pipeline tests
and on my computer running all often eats up all space
So did a bash for loop on each file in tests to run the test and delete the test folder in between, but that's a bit clunky I believe
Copy code
for i in `ls -1 tests/ | grep nf | grep test | grep -v snap` ; do nf-test test --profile=+docker tests/$i --verbose --update-snapshot --clean-snapshot ; rm -rf ~/tests/ ; done
So I added:
Copy code
cleanup {
                new File("${launchDir}").deleteDir()
            }
But I have some weird errors happening at the cleanup step like:
Copy code
Error: java.lang.RuntimeException: Path /home/max/tests/befc7d85b57aa2a565f1a11b2d33f9b9/output/reports/multiqc_data/gatk-base-recalibrator-quality-scores-plot_Pre-recalibration_Count.txt not found.
so just wondering if you ever ran into this or similar issue
j
I’ve not seen that before but I quickly stopped trying after realising it nuked debugging
Could you try just deleting the work dir?
m
oh yeah, so not launchDir, but workDir and outputDir then
let me try that