File: run-unit-test

package info (click to toggle)
shasta 0.14.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 29,648 kB
  • sloc: cpp: 82,262; python: 2,348; makefile: 223; sh: 143
file content (54 lines) | stat: -rwxr-xr-x 1,556 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
#!/bin/bash
set -e

pkg=shasta

export LC_ALL=C.UTF-8
if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
  trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM
fi

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

cd "${AUTOPKGTEST_TMP}"

# We first test /usr/bin/shasta binary
echo "Testing /usr/bin/shasta"

gunzip TinyTest.fasta.gz
shasta --config Nanopore-Dec2019 --input TinyTest.fasta

# Now, test Python3 binding via invocation
echo "Alignment compression test"
python3 -c 'import shasta;shasta.testAlignmentCompression();'

echo "Base test"
python3 -c 'import shasta;shasta.testBase();'

echo "Compact undirected graph 1 test"
python3 -c 'import shasta;shasta.testCompactUndirectedGraph1();'

echo "Compact undirected graph 2 test"
python3 -c 'import shasta;shasta.testCompactUndirectedGraph2();'

echo "De-duplicate and count test"
python3 -c 'import shasta;shasta.testDeduplicateAndCount();'

echo "Long base sequence test"
python3 -c 'import shasta;shasta.testLongBaseSequence();'

echo "Median consensus caller test"
python3 -c 'import shasta;shasta.testMedianConsensusCaller();'

echo "Multi-threaded object test"
python3 -c 'import shasta;shasta.testMultithreadedObject();'

echo "Short base sequence test"
python3 -c 'import shasta;shasta.testShortBaseSequence();'

echo "Simple bayesian consensus test using guppy-2.3.1-a model"
python3 -c 'import shasta;shasta.testSimpleBayesianConsensusCaller("guppy-2.3.1-a");'

echo "Spoa test"
python3 -c 'import shasta;shasta.testSpoa();'