| 1 | #!/bin/sh |
| 2 | # |
| 3 | # Depend on debconf to get a simple png file |
| 4 | |
| 5 | set -e |
| 6 | set -x |
| 7 | |
| 8 | at_exit() { |
| 9 | set +x |
| 10 | echo "info: test exiting, removing $WORKDIR" |
| 11 | rm -rf $WORKDIR |
| 12 | } |
| 13 | WORKDIR=$(mktemp -d) |
| 14 | trap at_exit INT TERM EXIT |
| 15 | set -x |
| 16 | |
| 17 | cd $WORKDIR |
| 18 | |
| 19 | # 2025-01-16: valgrind detects a SIGSEGV wheras neither gdb nor a normal run cause one. Disabling |
| 20 | # all hardening fixes the spurious valgrind error. So do not test with valgrind on armhf - hardning |
| 21 | # is more important. |
| 22 | if [ "$(dpkg --print-architecture)" != "armhf" ] && type valgrind >/dev/null 2>&1 ; then |
| 23 | VALGRIND=valgrind |
| 24 | fi |
| 25 | |
| 26 | $VALGRIND theora_png2theora -o test.ogv /usr/share/pixmaps/debian-logo.png |
| 27 | |
| 28 | $VALGRIND theora_dump_video test.ogv > test-video.dump |
| 29 | |
| 30 | # FIXME figure out how to test these too: |
| 31 | # theora_encoder_example |
| 32 | # theora_player_example |