[FFmpeg-devel] [PATCH] fate: add id3v2 test
Richard Shaffer
rshaffer at tunein.com
Sun Jan 28 04:20:00 EET 2018
Maybe a result of my mail client. Let me send from git send-email.
-Richard
On Thu, Jan 25, 2018 at 11:03 PM, Richard Shaffer <rshaffer at tunein.com> wrote:
> From f7398407c1f5822e1536ce03d46c885b2ad00c38 Mon Sep 17 00:00:00 2001
> From: Richard Shaffer <rshaffer at tunein.com>
> Date: Thu, 25 Jan 2018 19:54:59 -0800
> Subject: [PATCH] fate: add id3v2 test
>
> Adds basic unit test for parsing ID3v2 tags.
> ---
> This follows the suggestion to use the ffprobe utility instead of a
> test program.
>
> The required test sample is attached.
>
> -Richard
>
> tests/Makefile | 1 +
> tests/fate-run.sh | 4 ++++
> tests/fate/id3v2.mak | 6 ++++++
> tests/ref/fate/id3v2-read | 5 +++++
> 4 files changed, 16 insertions(+)
> create mode 100644 tests/fate/id3v2.mak
> create mode 100644 tests/ref/fate/id3v2-read
>
> diff --git a/tests/Makefile b/tests/Makefile
> index 14b9601378..327e3f4420 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -130,6 +130,7 @@ include $(SRC_PATH)/tests/fate/gapless.mak
> include $(SRC_PATH)/tests/fate/gif.mak
> include $(SRC_PATH)/tests/fate/h264.mak
> include $(SRC_PATH)/tests/fate/hevc.mak
> +include $(SRC_PATH)/tests/fate/id3v2.mak
> include $(SRC_PATH)/tests/fate/image.mak
> include $(SRC_PATH)/tests/fate/indeo.mak
> include $(SRC_PATH)/tests/fate/libavcodec.mak
> diff --git a/tests/fate-run.sh b/tests/fate-run.sh
> index 05f4ca5e20..82862b7ef4 100755
> --- a/tests/fate-run.sh
> +++ b/tests/fate-run.sh
> @@ -88,6 +88,10 @@ probefmt(){
> run ffprobe${PROGSUF} -show_entries format=format_name -print_format
> default=nw=1:nk=1 -v 0 "$@"
> }
> +probetags(){
> + run ffprobe${PROGSUF} -show_entries format_tags -v 0 "$@"
> +}
> +
> runlocal(){
> test "${V:-0}" -gt 0 && echo ${base}/"$@" ${base} >&3
> ${base}/"$@" ${base}
> diff --git a/tests/fate/id3v2.mak b/tests/fate/id3v2.mak
> new file mode 100644
> index 0000000000..af60ee12b5
> --- /dev/null
> +++ b/tests/fate/id3v2.mak
> @@ -0,0 +1,6 @@
> +ID3V2_TEST_FILE=tests/data/id3v2-test.mp3
> +
> +FATE_SAMPLES_ID3V2-$(CONFIG_MP3_DEMUXER) += fate-id3v2-read
> +fate-id3v2-read: CMD = probetags $(TARGET_SAMPLES)/id3v2/id3v2-test.mp3
> +
> +FATE_SAMPLES_FFPROBE += $(FATE_SAMPLES_ID3V2-yes)
> \ No newline at end of file
> diff --git a/tests/ref/fate/id3v2-read b/tests/ref/fate/id3v2-read
> new file mode 100644
> index 0000000000..965c8695e8
> --- /dev/null
> +++ b/tests/ref/fate/id3v2-read
> @@ -0,0 +1,5 @@
> +[FORMAT]
> +TAG:title=id3v2-test
> +TAG:id3v2_priv.testowner=testdata
> +TAG:id3v2_priv.testowner2=\x00\x01\x02
> +[/FORMAT]
> --
> 2.14.3 (Apple Git-98)
More information about the ffmpeg-devel
mailing list