File: run-unit-test

package info (click to toggle)
bamtools 2.5.2%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,588 kB
  • sloc: cpp: 19,086; ansic: 39; sh: 37; makefile: 28
file content (50 lines) | stat: -rw-r--r-- 1,607 bytes parent folder | download
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
#!/bin/sh -e

pkg=bamtools

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

cd $AUTOPKGTEST_TMP

cp -a /usr/share/doc/${pkg}/sam_spec_example.bam .
cp -a /usr/share/doc/${pkg}/filter_script .
gunzip -r *

bamtools convert -format fastq -in sam_spec_example.bam -out test.fastq

bamtools convert -format json -in sam_spec_example.bam -out test.json

bamtools count -in sam_spec_example.bam

bamtools coverage -in sam_spec_example.bam -out out

# This test fails on ppc64el for whatever reason and is for the moment (see bug #933505)
# The test is also problematic for armel (see bug #992143)
ARCH=$(dpkg --print-architecture)
if [ "$ARCH" != "ppc64el" -a "$ARCH" != "arm64" -a "$ARCH" != "armel"-a "$ARCH" != "armhf" -a "$ARCH" != "s390x"  ] ; then
   bamtools filter -script filter_script -in sam_spec_example.bam -out out.bam
else
   if [ "$ARCH" = "ppc64el" ] ; then
      echo "The following test is known to fail on ppc64el architecture (see bug #933505)"
   else
      echo "The following test is known to time out on $ARCH architecture (see bug #953939)"
   fi
   echo "bamtools filter -script filter_script -in sam_spec_example.bam -out out.bam"
fi

bamtools header -in sam_spec_example.bam

bamtools index -in sam_spec_example.bam

bamtools random -n 100 -in sam_spec_example.bam -out out.bam

bamtools revert -in sam_spec_example.bam -out out.bam

bamtools sort -in sam_spec_example.bam -out out.bam

bamtools split -mapped -in sam_spec_example.bam

bamtools stats -in sam_spec_example.bam