Debian Codegraph @

debian/tests/gyoto-lorene

raw symbols SCIP
1 #!/bin/sh
2 set -e
3
4 # Name of this script
5 script=`basename "$0"`
6
7 # Handle case of manually running this script
8 if [ "$AUTOPKGTEST_TMP" = "" ]; then
9 AUTOPKGTEST_TMP=`mktemp -d --tmpdir "$script"-XXX`;
10 echo "AUTOPKGTEST_TMP is $AUTOPKGTEST_TMP";
11 fi
12 if [ "$ADT_ARTIFACTS" = "" ] ; then
13 ADT_ARTIFACTS=${AUTOPKGTEST_TMP}/artifacts
14 fi
15 mkdir -p "${AUTOPKGTEST_TMP}"
16 mkdir -p "${ADT_ARTIFACTS}"
17
18 # Save current directory (must be top of source tree)
19 SRC_ROOT=`pwd`
20
21 # Compute Lorene metric using Nrotstar "code"
22 export HOME_LORENE=/usr/lib/`dpkg-architecture -qDEB_HOST_MULTIARCH`/lorene
23 mkdir -p ${AUTOPKGTEST_TMP}/${script}
24 cd ${AUTOPKGTEST_TMP}/${script}
25 rm -Rf .check-lorene
26 cp -a ${HOME_LORENE}/Codes/Nrotstar ./.check-lorene
27 cd .check-lorene
28 rm -f nrotstar *.o
29 cp -f Parameters/GR/Kepler/*.d ./
30 sed -i.bak 's/1 graph/0 graph/' par_rot.d
31 make
32 ./nrotstar
33 cd ..
34
35 # Get list of Lorene examples
36 EXAMPLES_DIR=${SRC_ROOT}/doc/examples
37 BASE_NAMES=`basename -s.xml ${EXAMPLES_DIR}/*-rotstar3_1.xml`
38
39 # Build Gyoto command line
40 GYOTO="/usr/bin/gyoto --nprocesses=0 --nthreads=1 --resolution=32 --plugins=stdplug,lorene"
41
42 # Run each example in this environment
43 for base in ${BASE_NAMES} ; do
44 ${GYOTO} \
45 ${EXAMPLES_DIR}/${base}.xml \
46 \!${ADT_ARTIFACTS}/${base}.fits ;
47 done
48
49 exit 0