summaryrefslogtreecommitdiffstats
path: root/tests/fate
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2016-01-28 18:33:06 -0800
committerTimothy Gu <timothygu99@gmail.com>2016-02-10 01:21:39 -0800
commit5f1aad68c4f5d3b04cd686bc61fbbcf722e31d35 (patch)
treef5754bb31c72b0117775b3a950eca50a991e6a07 /tests/fate
parent4ca8879d19893562040670f488a9c47aea77beb4 (diff)
downloadffmpeg-streaming-5f1aad68c4f5d3b04cd686bc61fbbcf722e31d35.zip
ffmpeg-streaming-5f1aad68c4f5d3b04cd686bc61fbbcf722e31d35.tar.gz
tests: Add test for proper header guard
Reviewed-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'tests/fate')
-rwxr-xr-xtests/fate/source-check.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/fate/source-check.sh b/tests/fate/source-check.sh
index fb7af98..1947b52 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 abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`"
+
+ grep -L "^#define $macro$" $f
+done
exit 0
OpenPOWER on IntegriCloud