| 1 | #!/bin/sh |
| 2 | |
| 3 | # |
| 4 | # Just start a ds9 instance, load a file, try to access this file, and then |
| 5 | # quit. |
| 6 | # |
| 7 | cp test.fits "${AUTOPKGTEST_TMP}" |
| 8 | cd "${AUTOPKGTEST_TMP}" |
| 9 | |
| 10 | xvfb-run --server-args="-screen 0 1024x768x24" python3 <<EOF |
| 11 | import time |
| 12 | import pyds9 |
| 13 | d = pyds9.DS9('test') |
| 14 | time.sleep(1) |
| 15 | print(pyds9.ds9_targets()) |
| 16 | d.set('file test.fits') |
| 17 | hdul = d.get_pyfits() |
| 18 | hdul.info() |
| 19 | hdul.writeto('test1.fits') |
| 20 | d.set('quit') |
| 21 | EOF |
| 22 | |
| 23 | res=$? |
| 24 | |
| 25 | |
| 26 | ls -l |
| 27 | |
| 28 | if [ $res = 0 ] ; then |
| 29 | echo "All OK" |
| 30 | exit 0 |
| 31 | else |
| 32 | echo "Failure" |
| 33 | exit $res |
| 34 | fi |