From a4e6fa86ce7b3e4c7795fb725fa1de1b8dff15b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Wed, 21 Jul 2010 20:49:41 +0000 Subject: [PATCH] regtest: simplify cleanup after each test Originally committed as revision 24396 to svn://svn.ffmpeg.org/ffmpeg/trunk --- tests/codec-regression.sh | 2 -- tests/lavf-regression.sh | 2 -- tests/lavfi-regression.sh | 2 -- tests/regression-funcs.sh | 5 +++-- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/codec-regression.sh b/tests/codec-regression.sh index ea49155a6a..7448c033dc 100755 --- a/tests/codec-regression.sh +++ b/tests/codec-regression.sh @@ -358,5 +358,3 @@ do_audio_enc_dec wav dbl pcm_f64le do_audio_enc_dec wav s16 pcm_zork do_audio_enc_dec 302 s16 pcm_s24daud "-ac 6 -ar 96000" fi - -rm -f "$bench" "$bench2" diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 77df8ed161..fb23cdde6b 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -226,5 +226,3 @@ for pix_fmt in $conversions ; do -f rawvideo -s 352x288 -pix_fmt yuv444p done fi - -rm -f "$bench" "$bench2" diff --git a/tests/lavfi-regression.sh b/tests/lavfi-regression.sh index 6ce3b41bb4..dbc986c406 100755 --- a/tests/lavfi-regression.sh +++ b/tests/lavfi-regression.sh @@ -97,5 +97,3 @@ fi # TODO: add tests for # direct rendering, # chains with feedback loops - -rm -f "$bench" "$bench2" diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh index 678965045e..970485c87e 100755 --- a/tests/regression-funcs.sh +++ b/tests/regression-funcs.sh @@ -34,6 +34,9 @@ pcm_ref="$datadir/$test_ref.ref.wav" crcfile="$datadir/$this.crc" target_crcfile="$target_datadir/$this.crc" +cleanfiles="$raw_dst $pcm_dst $crcfile $bench $bench2" +trap 'rm -f -- $cleanfiles' EXIT + mkdir -p "$datadir" mkdir -p "$outfile" mkdir -p "$logdir" @@ -89,7 +92,6 @@ do_ffmpeg_crc() $echov $ffmpeg $FFMPEG_OPTS $* -f crc "$target_crcfile" $ffmpeg $FFMPEG_OPTS $* -f crc "$target_crcfile" echo "$f $(cat $crcfile)" >> $logfile - rm -f "$crcfile" } do_ffmpeg_nocheck() @@ -105,7 +107,6 @@ do_ffmpeg_nocheck() do_video_decoding() { do_ffmpeg $raw_dst $1 -i $target_path/$file -f rawvideo $2 - rm -f $raw_dst } do_video_encoding()