Skip to content

Commit

Permalink
Update e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
  • Loading branch information
bentsherman committed Dec 12, 2024
1 parent 69dfe54 commit aa50499
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
75 changes: 75 additions & 0 deletions tests/checks/output-dsl.nf/.checks
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#
# run normal mode
#
echo First run
$NXF_RUN --save_bam_bai | tee stdout

[[ `grep INFO .nextflow.log | grep -c 'Submitted process > fastqc'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > align'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > quant'` == 3 ]] || false

[[ -f results/fastqc/alpha.fastqc.log ]] || false
[[ -f results/fastqc/beta.fastqc.log ]] || false
[[ -f results/fastqc/delta.fastqc.log ]] || false
[[ -f results/align/alpha.bai ]] || false
[[ -f results/align/alpha.bam ]] || false
[[ -f results/align/beta.bai ]] || false
[[ -f results/align/beta.bam ]] || false
[[ -f results/align/delta.bai ]] || false
[[ -f results/align/delta.bam ]] || false
[[ -L results/quant/alpha ]] || false
[[ -L results/quant/beta ]] || false
[[ -L results/quant/delta ]] || false
[[ -f results/samples.csv ]] || false


#
# one more time to make sure 'overwrite' is fine
#
echo Second run
$NXF_RUN --save_bam_bai | tee stdout

[[ `grep INFO .nextflow.log | grep -c 'Submitted process > fastqc'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > align'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > quant'` == 3 ]] || false

[[ -f results/fastqc/alpha.fastqc.log ]] || false
[[ -f results/fastqc/beta.fastqc.log ]] || false
[[ -f results/fastqc/delta.fastqc.log ]] || false
[[ -f results/align/alpha.bai ]] || false
[[ -f results/align/alpha.bam ]] || false
[[ -f results/align/beta.bai ]] || false
[[ -f results/align/beta.bam ]] || false
[[ -f results/align/delta.bai ]] || false
[[ -f results/align/delta.bam ]] || false
[[ -L results/quant/alpha ]] || false
[[ -L results/quant/beta ]] || false
[[ -L results/quant/delta ]] || false
[[ -f results/samples.csv ]] || false


#
# clean & run resume mode
#
echo Third run
rm -rf results

$NXF_RUN --save_bam_bai -resume | tee stdout

[[ `grep INFO .nextflow.log | grep -c 'Submitted process > fastqc'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > align'` == 3 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > quant'` == 3 ]] || false

[[ -f results/fastqc/alpha.fastqc.log ]] || false
[[ -f results/fastqc/beta.fastqc.log ]] || false
[[ -f results/fastqc/delta.fastqc.log ]] || false
[[ -f results/align/alpha.bai ]] || false
[[ -f results/align/alpha.bam ]] || false
[[ -f results/align/beta.bai ]] || false
[[ -f results/align/beta.bam ]] || false
[[ -f results/align/delta.bai ]] || false
[[ -f results/align/delta.bam ]] || false
[[ -L results/quant/alpha ]] || false
[[ -L results/quant/beta ]] || false
[[ -L results/quant/delta ]] || false
[[ -f results/samples.csv ]] || false
2 changes: 1 addition & 1 deletion tests/output-dsl.nf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ process quant {

workflow {
main:
ids = Channel.of('1', '2', '3')
ids = Channel.of('alpha', 'beta', 'delta')
ch_fastqc = fastqc(ids)
(ch_bam, ch_bai) = align(ids)
ch_quant = quant(ids)
Expand Down

0 comments on commit aa50499

Please sign in to comment.