Skip to content
Snippets Groups Projects
Commit 4ad34d82 authored by Alex Kanitz's avatar Alex Kanitz
Browse files

Merge branch 'verbose_tests' into 'master'

run tests in verbose mode

Closes #68

See merge request zavolan_group/pipelines/rnaseqpipeline!26
parents ba39b976 0d95577e
No related branches found
No related tags found
2 merge requests!29Add pipeline updates into MultiQC dev branch,!26run tests in verbose mode
Pipeline #10291 passed
...@@ -10,8 +10,8 @@ test: ...@@ -10,8 +10,8 @@ test:
# add code quality tests here # add code quality tests here
# add unit tests here # add unit tests here
# add script tests here # add script tests here
- bash tests/test_scripts_table_to_snakemake/test.sh - bash tests/test_scripts_labkey_to_snakemake_table/test.sh
- bash tests/test_scripts_labkey_to_snakemake/test.sh - bash tests/test_scripts_labkey_to_snakemake_api/test.sh
# add integration tests here # add integration tests here
- bash tests/test_create_dag_image/test.sh - bash tests/test_create_dag_image/test.sh
- bash tests/test_create_rule_graph/test.sh - bash tests/test_create_rule_graph/test.sh
......
#!/bin/bash #!/bin/bash
# Tear down test environment # Tear down test environment
trap 'rm -rf .snakemake && cd $user_dir' EXIT # quotes command is exected after script exits, regardless of exit status cleanup () {
rc=$?
rm -rf .snakemake
cd $user_dir
echo "Exit status: $rc"
}
trap cleanup EXIT
# Set up test environment # Set up test environment
set -eo pipefail # ensures that script exits at first command that exits with non-zero status set -eo pipefail # ensures that script exits at first command that exits with non-zero status
...@@ -18,5 +24,6 @@ snakemake \ ...@@ -18,5 +24,6 @@ snakemake \
--dag \ --dag \
--printshellcmds \ --printshellcmds \
--dryrun \ --dryrun \
--verbose \
| dot -Tsvg > "../../images/dag_test_workflow.svg" | dot -Tsvg > "../../images/dag_test_workflow.svg"
#!/bin/bash #!/bin/bash
# Tear down test environment # Tear down test environment
trap 'rm -rf .snakemake && cd $user_dir' EXIT # quotes command is exected after script exits, regardless of exit status cleanup () {
rc=$?
rm -rf .snakemake
cd $user_dir
echo "Exit status: $rc"
}
trap cleanup EXIT
# Set up test environment # Set up test environment
set -eo pipefail # ensures that script exits at first command that exits with non-zero status set -eo pipefail # ensures that script exits at first command that exits with non-zero status
...@@ -18,5 +24,6 @@ snakemake \ ...@@ -18,5 +24,6 @@ snakemake \
--rulegraph \ --rulegraph \
--printshellcmds \ --printshellcmds \
--dryrun \ --dryrun \
--verbose \
| dot -Tsvg > "../../images/rule_graph.svg" | dot -Tsvg > "../../images/rule_graph.svg"
#!/bin/bash #!/bin/bash
# Tear down test environment # Tear down test environment
trap 'rm -rf logs/ results/ .snakemake/ .java/ local_log/ && cd $user_dir' EXIT # quoted command is exected after script exits, regardless of exit status cleanup () {
rc=$?
rm -rf .java/
rm -rf .snakemake/
rm -rf local_log/
rm -rf logs/
rm -rf results/
cd $user_dir
echo "Exit status: $rc"
}
trap cleanup EXIT
# Set up test environment # Set up test environment
set -eo pipefail # ensures that script exits at first command that exits with non-zero status set -eo pipefail # ensures that script exits at first command that exits with non-zero status
...@@ -20,7 +30,8 @@ snakemake \ ...@@ -20,7 +30,8 @@ snakemake \
--printshellcmds \ --printshellcmds \
--rerun-incomplete \ --rerun-incomplete \
--use-singularity \ --use-singularity \
--singularity-args="--bind ${PWD}/../input_files" --singularity-args="--bind ${PWD}/../input_files" \
--verbose
# Check md5 sum of some output files # Check md5 sum of some output files
find results/ -type f -name \*\.gz -exec gunzip '{}' \; find results/ -type f -name \*\.gz -exec gunzip '{}' \;
......
#!/bin/bash #!/bin/bash
# Tear down test environment # Tear down test environment
trap 'rm -rf logs/ results/ .snakemake/ .java/ local_log/ && cd $user_dir' EXIT # quoted command is exected after script exits, regardless of exit status cleanup () {
rc=$?
rm -rf .java/
rm -rf .snakemake/
rm -rf local_log/
rm -rf logs/
rm -rf results/
cd $user_dir
echo "Exit status: $rc"
}
trap cleanup EXIT
# Set up test environment # Set up test environment
set -eo pipefail # ensures that script exits at first command that exits with non-zero status set -eo pipefail # ensures that script exits at first command that exits with non-zero status
...@@ -23,7 +33,8 @@ snakemake \ ...@@ -23,7 +33,8 @@ snakemake \
--printshellcmds \ --printshellcmds \
--rerun-incomplete \ --rerun-incomplete \
--use-singularity \ --use-singularity \
--singularity-args="--bind ${PWD}/../input_files" --singularity-args="--bind ${PWD}/../input_files" \
--verbose
# Check md5 sum of some output files # Check md5 sum of some output files
find results/ -type f -name \*\.gz -exec gunzip '{}' \; find results/ -type f -name \*\.gz -exec gunzip '{}' \;
......
...@@ -4,7 +4,17 @@ ...@@ -4,7 +4,17 @@
# 'LABKEY_PASS' to be set with the appropriate values # 'LABKEY_PASS' to be set with the appropriate values
# Tear down test environment # Tear down test environment
trap 'rm -rf ${HOME}/.netrc .snakemake config.yaml samples.tsv input_table.tsv && cd $user_dir' EXIT # quotes command is exected after script exits, regardless of exit status cleanup () {
rc=$?
rm -rf ${HOME}/.netrc
rm -rf .snakemake/
rm -rf config.yaml
rm -rf input_table.tsv
rm -rf samples.tsv
cd $user_dir
echo "Exit status: $rc"
}
trap cleanup EXIT
# Set up test environment # Set up test environment
set -eo pipefail # ensures that script exits at first command that exits with non-zero status set -eo pipefail # ensures that script exits at first command that exits with non-zero status
...@@ -36,6 +46,7 @@ snakemake \ ...@@ -36,6 +46,7 @@ snakemake \
--snakefile="../../Snakefile" \ --snakefile="../../Snakefile" \
--configfile="config.yaml" \ --configfile="config.yaml" \
--dryrun \ --dryrun \
--verbose
md5sum --check "expected_output.md5" md5sum --check "expected_output.md5"
# MD5 sums obtained with command: # MD5 sums obtained with command:
......
#!/bin/bash #!/bin/bash
# Tear down test environment # Tear down test environment
trap 'rm -rf .snakemake config.yaml samples.tsv && cd $user_dir' EXIT # quotes command is exected after script exits, regardless of exit status cleanup () {
rc=$?
rm -rf .snakemake/
rm -rf config.yaml
rm -rf samples.tsv
cd $user_dir
echo "Exit status: $rc"
}
trap cleanup EXIT
# Set up test environment # Set up test environment
set -eo pipefail # ensures that script exits at first command that exits with non-zero status set -eo pipefail # ensures that script exits at first command that exits with non-zero status
...@@ -25,6 +33,7 @@ snakemake \ ...@@ -25,6 +33,7 @@ snakemake \
--snakefile="../../Snakefile" \ --snakefile="../../Snakefile" \
--configfile="config.yaml" \ --configfile="config.yaml" \
--dryrun \ --dryrun \
--verbose
md5sum --check "expected_output.md5" md5sum --check "expected_output.md5"
# MD5 sums obtained with command: # MD5 sums obtained with command:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment