1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#!/bin/sh
# autopkgtest check: Run goby in fasta-to-compact mode, first with a java call,
# then through the goby shell wrapper.
# (C) 2021 Pierre Gruet.
# Author: Pierre Gruet <pgt@debian.org>
set -e
pkg=libgoby-java
export LC_ALL=C.UTF-8
if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
# Double quote below to expand the temporary directory variable now versus
# later is on purpose.
# shellcheck disable=SC2064
trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
fi
TEMP_HOME=$(mktemp -d)
cp -a test-data/ "${AUTOPKGTEST_TMP}"
cd "${AUTOPKGTEST_TMP}/test-data/seq-var-test"
# We launch a command in fasta-to-compact mode without the wrapper.
java -Xmx100m -jar /usr/share/java/goby.jar -m fasta-to-compact -d -o small-synth.compact-reads small-synth.fa | grep "Total logical entries written: 1"
echo "Result file correctly outputted by the java invocation"
# Now we delete the output and try to launch a command in fasta-to-compact mode
# by invoking the shell launcher.
rm small-synth.compact-reads
HOME="${TEMP_HOME}" goby 100m fasta-to-compact -d -o small-synth.compact-reads small-synth.fa | grep "Total logical entries written: 1"
echo "Result file correctly outputted by the goby call"
|