| 1 |
#!/bin/sh |
| 2 |
# |
| 3 |
# Need the package mktemp and python3-mecavideo |
| 4 |
# Based on <URL: https://bugs.launchpad.net/ubuntu/+source/oggvideotools/+bug/1462697 > |
| 5 |
# This test does not trigger the reported bug, but test oggCut that do |
| 6 |
# not crash. To crash, a different input file is needed, as only some |
| 7 |
# files seem cause the crash. |
| 8 |
|
| 9 |
set -e |
| 10 |
at_exit() { |
| 11 |
set +x |
| 12 |
echo "info: test exiting, removing $WORKDIR" |
| 13 |
rm -rf $WORKDIR |
| 14 |
} |
| 15 |
WORKDIR=$(mktemp -d) |
| 16 |
trap at_exit INT TERM EXIT |
| 17 |
set -x |
| 18 |
|
| 19 |
cd $WORKDIR |
| 20 |
|
| 21 |
if type valgrind >/dev/null 2>&1 ; then |
| 22 |
VALGRIND=valgrind |
| 23 |
fi |
| 24 |
|
| 25 |
echo "info: Running autopkgtest script $0" |
| 26 |
|
| 27 |
input=/usr/share/pymecavideo/data/video/Effet_force_magnetique.ogv |
| 28 |
|
| 29 |
${VALGRIND} ${TESTBINDIR}oggCut -s 500 -e 1000 "$input" out.ogv |
| 30 |
|
| 31 |
if [ -e out.ogv ] ; then |
| 32 |
echo "success: Ogg Theora file out.ogv created." |
| 33 |
else |
| 34 |
echo "error: No Ogg Theora file created by oggCut." |
| 35 |
exit 1 |
| 36 |
fi |
| 37 |
|
| 38 |
echo "info: test completed successfully" |