From adf0bfea07167c58b3358912c691296fa0cf4dfc Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Wed, 28 Jun 2017 03:40:54 +0000 Subject: [PATCH] tests: drop mktemp(1) flags for better compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $ 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’ --- tests/util.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/util.sh b/tests/util.sh index c7193206..89a1e0fc 100644 --- a/tests/util.sh +++ b/tests/util.sh @@ -5,11 +5,11 @@ set -eu${BASH+o pipefail} # Temporary files for encoder input and output. -yuvfile="$(mktemp --tmpdir tmp.XXXXXXXXXX.yuv)" -hevcfile="$(mktemp --tmpdir tmp.XXXXXXXXXX.hevc)" +yuvfile="$(mktemp)" +hevcfile="$(mktemp)" cleanup() { - rm -rf ${yuvfile} ${hevcfile} + rm -rf "${yuvfile}" "${hevcfile}" } trap cleanup EXIT @@ -22,7 +22,7 @@ prepare() { cleanup print_and_run \ ffmpeg -f lavfi -i "mandelbrot=size=${1}" \ - -vframes "${2}" -pix_fmt yuv420p \ + -vframes "${2}" -pix_fmt yuv420p -f yuv4mpegpipe \ "${yuvfile}" }