File: test_extra.sh

package info (click to toggle)
andi 0.14-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 996 kB
  • sloc: ansic: 2,296; sh: 426; cpp: 99; makefile: 76; awk: 51
file content (35 lines) | stat: -rwxr-xr-x 1,059 bytes parent folder | download | duplicates (4)
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 -f

# Test if andi exists, and can be executed
./src/andi --version > /dev/null || exit 1

SEED=${RANDOM_SEED:-0}
SEED2=0
SEED3=0
if test $SEED -ne 0; then
        SEED=$((SEED + 1))
        SEED2=$((SEED + 2))
        SEED3=$((SEED + 3))
fi

# Test andi for more than just two sequences at a time
./test/test_fasta -s $SEED -l 100000 -d 0.01 -d 0.01 -d 0.01 -d 0.01 | ./src/andi > /dev/null || exit 1

# Test low-memory mode
./test/test_fasta -s $SEED2 -l 10000 > test_extra.fasta
./src/andi test_extra.fasta > extra.out
./src/andi test_extra.fasta --low-memory > extra_low_memory.out
diff extra.out extra_low_memory.out || exit 1

# Test file of filenames
./test/test_fasta -s $SEED3 -l 10000 > test_extra.fasta
echo "$PWD/test_extra.fasta" > fof.txt
./src/andi test_extra.fasta > extra.out
./src/andi --file-of-filenames fof.txt > fof.out
cat fof.txt | ./src/andi --file-of-filenames - > fof2.out
diff extra.out fof.out || exit 1
diff extra.out fof2.out || exit 1


rm -f test_extra.fasta extra.out extra_low_memory.out fof.out fof2.out fof.txt