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
|
#!/bin/sh
#
# Just start a ds9 instance, load a file, try to access this file, and then
# quit.
#
cp test.fits "${AUTOPKGTEST_TMP}"
cd "${AUTOPKGTEST_TMP}"
xvfb-run --server-args="-screen 0 1024x768x24" python3 <<EOF
import time
import pyds9
d = pyds9.DS9('test')
time.sleep(1)
print(pyds9.ds9_targets())
d.set('file test.fits')
hdul = d.get_pyfits()
hdul.info()
hdul.writeto('test1.fits')
d.set('quit')
EOF
res=$?
ls -l
if [ $res = 0 ] ; then
echo "All OK"
exit 0
else
echo "Failure"
exit $res
fi
|