Re: [FFmpeg-devel] [PATCH 4/4] tests: Add test for proper header guard

2016-02-10 Thread Timothy Gu
On Sun, Jan 31, 2016 at 3:47 PM Timothy Gu  wrote:

> On Fri, Jan 29, 2016 at 10:10:48AM +0100, Clément Bœsch wrote:
> > 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.
>
> Changed locally.
>

Reviewed by Clément on IRC and pushed.

01:07 <@ubitux> Timothy_Gu: no other comment from me, i like the idea

Timothy
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 4/4] tests: Add test for proper header guard

2016-01-31 Thread Timothy Gu
On Fri, Jan 29, 2016 at 10:10:48AM +0100, Clément Bœsch wrote:
> 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.

Changed locally.

Timothy
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 4/4] tests: Add test for proper header guard

2016-01-28 Thread Timothy Gu
---
 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:]'`"
+
+grep -L "^#define $macro$" $f
+done
 
 exit 0
diff --git a/tests/ref/fate/source b/tests/ref/fate/source
index 450e064..f6cacb6 100644
--- a/tests/ref/fate/source
+++ b/tests/ref/fate/source
@@ -17,3 +17,15 @@ libswresample/log2_tab.c
 libswscale/log2_tab.c
 tools/uncoded_frame.c
 tools/yuvcmp.c
+Headers without standard inclusion guards:
+cmdutils_common_opts.h
+compat/avisynth/avisynth_c.h
+compat/avisynth/avs/capi.h
+compat/avisynth/avs/config.h
+compat/avisynth/avs/types.h
+compat/avisynth/avxsynth_c.h
+compat/avisynth/windowsPorts/basicDataTypeConversions.h
+compat/avisynth/windowsPorts/windows2linux.h
+compat/float/float.h
+compat/float/limits.h
+libavutil/x86_cpu.h
-- 
1.9.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel