[FFmpeg-devel] [PATCH 4/4] tests: Add test for proper header guard
Clément Bœsch
u at pkh.me
Fri Jan 29 10:10:48 CET 2016
On Thu, Jan 28, 2016 at 06:33:56PM -0800, Timothy Gu wrote:
> ---
> tests/fate/source-check.sh | 11 +++++++++++
> tests/ref/fate/source | 12 ++++++++++++
> 2 files changed, 23 insertions(+)
>
> diff --git a/tests/fate/source-check.sh b/tests/fate/source-check.sh
> index fb7af98..5524236 100755
> --- a/tests/fate/source-check.sh
> +++ b/tests/fate/source-check.sh
> @@ -16,5 +16,16 @@ git grep -L -E "This file is part of FFmpeg|This file is part of libswresample|"
> "This program is free software; you can redistribute it and/or modify|"\
> "This file is placed in the public domain" | grep -E '\.c$|\.h$|\.S$|\.asm$'
>
> +echo Headers without standard inclusion guards:
> +for f in `git ls-files | grep '\.h$'` ; do
> + macro="`echo $f | sed \
> + -e '/\/\|^ff/!{s/\(.*\)/ffmpeg\/\1/}' \
> + -e 's/^lib//' \
> + -e 's/[^A-Za-z0-9]\{1\,\}/_/g' \
> + -e 's/_\(a\|v\|av\)f_/_/' \
> + | tr '[:lower:]' '[:upper:]'`"
Not sure about the portability of these arguments. I think it might be
safer to copy/use toupper() from the configure.
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160129/b7e85fbe/attachment.sig>
More information about the ffmpeg-devel
mailing list