diff --git a/test_scripts/test_abismal_threads.test b/test_scripts/test_abismal_threads.test new file mode 100755 index 0000000..c36f29a --- /dev/null +++ b/test_scripts/test_abismal_threads.test @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +f () { + error_code=$? # save exit code first + echo "error $error_code" + echo "command with error:" + echo "${BASH_COMMAND}" + echo "on line ${BASH_LINENO[0]}" + exit $error_code +} +trap f ERR + +infile=tests/reads_1.fq +infileidx=tests/tRex1.idx +if [[ -e "${infile}" && -e "${infileidx}" ]]; then + ./abismal -v -B -t 2 -i ${infileidx} ${infile} > /dev/null; +else + echo "missing input file(s); skipping test"; + exit 77; +fi + +infile1=tests/reads_pe_1.fq +infile2=tests/reads_pe_2.fq +if [[ -e "${infile1}" && -e "${infile2}" ]]; then + ./abismal -v -B -t 2 -i ${infileidx} ${infile1} ${infile2} > /dev/null; +else + echo "missing input file(s); skipping test"; + exit 77; +fi + +infile1=tests/reads_pbat_pe_1.fq +infile2=tests/reads_pbat_pe_2.fq +if [[ -e "${infile1}" && -e "${infile2}" ]]; then + ./abismal -v -B -t 2 -P -i ${infileidx} ${infile1} ${infile2} > /dev/null; +else + echo "missing input file(s); skipping tests"; + exit 77; +fi + +infile1=tests/reads_rpbat_pe_1.fq +infile2=tests/reads_rpbat_pe_2.fq +if [[ -e "${infile1}" && -e "${infile2}" ]]; then + ./abismal -v -B -t 2 -P -i ${infileidx} ${infile1} ${infile2} > /dev/null; +else + echo "missing input file(s); skipping test"; + exit 77; +fi