diff --git a/test/common/strip_error b/test/common/strip_var similarity index 100% rename from test/common/strip_error rename to test/common/strip_var diff --git a/test/decompose_blocksub/_run.sh b/test/decompose_blocksub/_run.sh index f4a6211..767a223 100755 --- a/test/decompose_blocksub/_run.sh +++ b/test/decompose_blocksub/_run.sh @@ -6,15 +6,16 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) . ${DIR}/../common/_helpers.sh # put path to vt binary into handy variable VT=${DIR}/../../vt +STRIP_VAR=${DIR}/../common/strip_var # immediately quit on errors set -e # create temporary directory and ensure cleanup on termination -#export TMPDIR=$(mktemp -d) export TMPDIR=${DIR}/tmp mkdir -p ${TMPDIR} trap "set -x; rm -rf ${TMPDIR}" EXIT KILL TERM INT HUP +echo "-------------------------------" >&2 echo "Tests for vt decompose_blocksub" >&2 echo "-------------------------------" >&2 @@ -24,14 +25,13 @@ echo "-------------------------------" >&2 # --------------------------------------------------------------------------- set -x -#mkdir -p ${TMPDIR}/01 # call program ${VT} \ decompose_blocksub \ ${DIR}/01_IN_even_length.vcf \ - >${TMPDIR}/01_OUT_even_length.vcf \ - 2> >(strip_stderr > ${TMPDIR}/01_OUT_even_length.stderr) + -o ${TMPDIR}/01_OUT_even_length.vcf \ + 2>&1 | ${STRIP_VAR} > ${TMPDIR}/01_OUT_even_length.stderr # compare results diff ${DIR}/01_OUT_even_length.vcf ${TMPDIR}/01_OUT_even_length.vcf @@ -44,14 +44,13 @@ set +x # --------------------------------------------------------------------------- set -x -#mkdir -p ${TMPDIR}/02 # call program ${VT} \ decompose_blocksub -a \ ${DIR}/02_IN_uneven_length.vcf \ - >${TMPDIR}/02_OUT_uneven_length.vcf \ - 2> >(strip_stderr > ${TMPDIR}/02_OUT_uneven_length.stderr) \ + -o ${TMPDIR}/02_OUT_uneven_length.vcf \ + 2>&1 | ${STRIP_VAR} > ${TMPDIR}/02_OUT_uneven_length.stderr \ # compare results diff ${DIR}/02_OUT_uneven_length.vcf ${TMPDIR}/02_OUT_uneven_length.vcf diff --git a/test/normalize/_run.sh b/test/normalize/_run.sh index 8629d9e..d52527c 100755 --- a/test/normalize/_run.sh +++ b/test/normalize/_run.sh @@ -8,35 +8,36 @@ DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) VT=${DIR}/../../vt # put path to vt binary into handy variable REF=${DIR}/../ref/20.fa.gz +STRIP_VAR=${DIR}/../common/strip_var # immediately quit on errors set -e # create temporary directory and ensure cleanup on termination -#export TMPDIR=$(mktemp -d) export TMPDIR=${DIR}/tmp mkdir -p ${TMPDIR} trap "set -x; rm -rf ${TMPDIR}" EXIT KILL TERM INT HUP +echo "----------------------" >&2 echo "Tests for vt normalize" >&2 echo "----------------------" >&2 - # --------------------------------------------------------------------------- # Test 01: normalization of indels from Mills et al. chromosome 20 # --------------------------------------------------------------------------- +# call program + set -x -# call program ${VT} \ normalize \ ${DIR}/01_IN.vcf \ -r ${REF} \ - >${TMPDIR}/01_OUT.vcf \ - 2> >(strip_stderr > ${TMPDIR}/01_OUT.stderr) + -o ${TMPDIR}/01_OUT.vcf \ + 2>&1 | ${STRIP_VAR} > ${TMPDIR}/01_OUT.stderr # compare results diff ${DIR}/01_OUT.vcf ${TMPDIR}/01_OUT.vcf diff ${DIR}/01_OUT.stderr ${TMPDIR}/01_OUT.stderr - + set +x