set -e

#
# run normal mode
#
$NXF_RUN $WITH_DOCKER > stdout

[[ `grep INFO .nextflow.log | grep -c 'Submitted process > blast'` == 5 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > extract'` == 5 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Submitted process > align'` == 1 ]] || false

#
# run resume mode
#
$NXF_RUN $WITH_DOCKER -resume > stdout

[[ `grep INFO .nextflow.log | grep -c 'Cached process > blast'` == 5 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Cached process > extract'` == 5 ]] || false
[[ `grep INFO .nextflow.log | grep -c 'Cached process > align'` == 1 ]] || false
