tests: drop mktemp(1) flags for better compatibility

$ mktemp --tmpdir tmp.XXXXXXXXXX.yuv
mktemp: illegal option -- -
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
$ gmktemp --tmpdir tmp.XXXXXXXXXX.yuv
/tmp/tmp.ddQTBn4XmE.yuv

$ mktemp -t tmp.XXXXXXXXXX.yuv
/tmp/tmp.XXXXXXXXXX.yuv.SYYNp8Ki
$ gmktemp -t tmp.XXXXXXXXXX.yuv
/tmp/tmp.2ena2nKgv5.yuv

$ mktemp -t yuv
/tmp/yuv.rX2UAbax
$ gmktemp -t yuv
gmktemp: too few X's in template ‘yuv’
This commit is contained in:
Jan Beich 2017-06-28 03:40:54 +00:00
parent 0280871287
commit adf0bfea07

View file

@ -5,11 +5,11 @@
set -eu${BASH+o pipefail} set -eu${BASH+o pipefail}
# Temporary files for encoder input and output. # Temporary files for encoder input and output.
yuvfile="$(mktemp --tmpdir tmp.XXXXXXXXXX.yuv)" yuvfile="$(mktemp)"
hevcfile="$(mktemp --tmpdir tmp.XXXXXXXXXX.hevc)" hevcfile="$(mktemp)"
cleanup() { cleanup() {
rm -rf ${yuvfile} ${hevcfile} rm -rf "${yuvfile}" "${hevcfile}"
} }
trap cleanup EXIT trap cleanup EXIT
@ -22,7 +22,7 @@ prepare() {
cleanup cleanup
print_and_run \ print_and_run \
ffmpeg -f lavfi -i "mandelbrot=size=${1}" \ ffmpeg -f lavfi -i "mandelbrot=size=${1}" \
-vframes "${2}" -pix_fmt yuv420p \ -vframes "${2}" -pix_fmt yuv420p -f yuv4mpegpipe \
"${yuvfile}" "${yuvfile}"
} }