File: run-unit-test

package info (click to toggle)
maqview 0.2.5-12
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,444 kB
  • sloc: ansic: 14,011; cpp: 1,295; java: 178; perl: 116; sh: 101; makefile: 23
file content (76 lines) | stat: -rw-r--r-- 1,854 bytes parent folder | download | duplicates (3)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
set -e

pkg=maqview

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

cp -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}"

cd "${AUTOPKGTEST_TMP}"

gunzip -r *
ls -R
cd data
echo -e "\e[93m\e[1mPREP INPUT FILES FOR MAQVIEW\e[0m"
maq fasta2bfa test.fa test.bfa
echo 1
maq fastq2bfq test.fastq part1.bfq
echo 2
maq fastq2bfq test.fastq part2.bfq
echo 3
maq map part1.map test.fa part1.bfq
echo 4
maq map part2.map test.fa  part2.bfq
echo 5
maq mapmerge aln.map part1.map part2.map
echo 6
maq assemble cns.cns test.fa aln.map
echo 7
gzip test.fa
echo -e "\e[92m\e[1mDone\e[0m"
echo

#do_stuff_to_test_package#
echo -e "\e[93m\e[1mTest 1\e[0m"
zrio make test.fa.gz
diff test.fa.gz.zr ../ref/test.fa.gz.zr
echo -e "\e[92m\e[1mPassed\e[0m"
echo

echo -e "\e[93m\e[1mTest 2\e[0m"
zrio use test.fa.gz 0 > zrio.use.out
diff zrio.use.out ../ref/zrio.use.out
echo -e "\e[92m\e[1mPassed\e[0m"
echo

echo -e "\e[93m\e[1mTest 3\e[0m"
maqindex -i part1.map
diff part1.map.vm ../ref/maqindex1/part1.map.vm
diff part1.map.zr ../ref/maqindex1/part1.map.zr
echo -e "\e[92m\e[1mPassed\e[0m"
echo

echo -e "\e[93m\e[1mTest 4\e[0m"
maqindex -c cns.cns -i part1.map
diff part1.map.vm ../ref/maqindex2/part1.map.vm
diff part1.map.zr ../ref/maqindex2/part1.map.zr
diff cns.cns.zr ../ref/maqindex2/cns.cns.zr
diff cns.cns.summary ../ref/maqindex2/cns.cns.summary
echo -e "\e[92m\e[1mPassed\e[0m"
echo

echo -e "\e[93m\e[1mTest 5\e[0m"
maqindex -i -c cns.cns
diff cns.cns.zr ../ref/maqindex3/cns.cns.zr
diff cns.cns.summary ../ref/maqindex3/cns.cns.summary
echo -e "\e[92m\e[1mPassed\e[0m"
echo