File: fqzcomp.test

package info (click to toggle)
htscodecs 1.6.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,656 kB
  • sloc: ansic: 15,853; javascript: 2,907; makefile: 330; sh: 192
file content (31 lines) | stat: -rwxr-xr-x 840 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
#!/bin/sh
out=test.out
if test ! -d $out
then
    mkdir $out
fi

for f in `ls -1 $srcdir/dat/q* $srcdir/htscodecs-corpus/dat/q* 2>/dev/null`
do
    comp=${f%/*/*}/dat/fqzcomp/${f##*/}
    cut -f 1 $f > $out/fqz
    for s in 0 1 2 3
    do
        if [ ! -e "$comp.$o" ]
        then
            continue
        fi
        printf 'Testing fqzcomp_qual -r -s %s on %s\t' $s "$f"

        # Round trip
        ./fqzcomp_qual -r -s $s $out/fqz > $out/fqz.comp 2>>$out/fqz.stderr || exit 1
        wc -c < $out/fqz.comp
        ./fqzcomp_qual -r -d $out/fqz.comp > $out/fqz.uncomp  2>>$out/fqz.stderr || exit 1
        cmp $out/fqz $out/fqz.uncomp || exit 1

        # Precompressed data
        ./fqzcomp_qual -r -d $comp.$s > $out/fqz.uncomp  2>>$out/fqz.stderr || exit 1
        cmp $out/fqz $out/fqz.uncomp || exit 1
    done
    echo
done