File: run-unit-test

package info (click to toggle)
peptidebuilder 1.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,072 kB
  • sloc: python: 3,033; sh: 31; makefile: 11
file content (39 lines) | stat: -rw-r--r-- 882 bytes parent folder | download | duplicates (2)
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
#!/bin/bash
set -e

pkg="peptidebuilder"
CUR_DIR=`pwd`

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 ${CUR_DIR}/examples/* $AUTOPKGTEST_TMP
cd $AUTOPKGTEST_TMP
mv -f reconstructed_RMSDs.txt test.txt

echo "Test 1"
cd $AUTOPKGTEST_TMP
python3 simpleExample.py
[ -s example.pdb ] || exit 1 
cat example.pdb
echo "PASS"

echo "Test 2"
python3 evaluation.py 2>/dev/null
for f in PDBs/Aligned*.pdb PDBs/AllAngles*.pdb PDBs/Backbone*.pdb PDBs/PhiPsi*.pdb
do
	echo $f
	[ -s $f ] || exit 1
	rm -f $f
done

# The diff might not work as ecpected on architectures other than amd64
if [ "$(dpkg-architecture -qDEB_BUILD_ARCH)" = "amd64" ]
then
	echo "diff expected and generated"
	diff -u reconstructed_RMSDs.txt test.txt
fi
[ -s reconstructed_RMSDs.txt ] || exit 1
echo "PASS"