| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | set -e |
| 3 | |
| 4 | pkg="seaview" |
| 5 | |
| 6 | if [scip-shell system . . `[`. "$AUTOPKGTEST_TMP" = "" ] ; then |
| 7 | AUTOPKGTEST_TMP=`mktempscip-shell system . . mktemp. -d /tmp/${pkg}-test.XXXXXX` |
| 8 | trap "rm -rf ${AUTOPKGTEST_TMP}" 0 INT QUIT ABRT PIPE TERM |
| 9 | fi |
| 10 | |
| 11 | cpscip-shell system . . cp. -a /usr/share/doc/${pkg}/examples/* $AUTOPKGTEST_TMP |
| 12 | |
| 13 | cd $AUTOPKGTEST_TMP |
| 14 | |
| 15 | gunzipscip-shell system . . gunzip. -r * |
| 16 | |
| 17 | seaview -build_tree -distance K2P -o tree.ph example.nxs |
| 18 | |
| 19 | # This requires PDF support |
| 20 | touchscip-shell system . . touch. test_status.log |
| 21 | timeoutscip-shell system . . timeout. 10s seaview -plotonly -svg tree.ph 2> test_status.log || truescip-shell system . . true. |
| 22 | |
| 23 | # Check if any stderr is logged into the log file |
| 24 | if [scip-shell system . . `[`. `catscip-shell system . . cat. test_status.log | wcscip-shell system . . wc. -l` != 0 ] |
| 25 | then |
| 26 | echoscip-shell system . . echo. 'Test2 failed, printing error log' |
| 27 | catscip-shell system . . cat. test_status.log |
| 28 | exit 1 |
| 29 | fi |
| 30 | |
| 31 | echoscip-shell system . . echo. "PASS" |