summaryrefslogtreecommitdiff
path: root/tests/fate
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-09-27 14:06:54 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-09-29 18:52:35 +0200
commited18c49f5ff8a124a805142fb9a1803890563822 (patch)
tree49bc3047e0aec1e0b95ec8c806493d3d0aa633bd /tests/fate
parentfc97b1f091ff38210699b2e5819c94e4f4ebd1fa (diff)
fate: Add basic license header check
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'tests/fate')
-rwxr-xr-xtests/fate/source-check.sh20
-rw-r--r--tests/fate/source.mak3
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/fate/source-check.sh b/tests/fate/source-check.sh
new file mode 100755
index 0000000000..fb7af981e7
--- /dev/null
+++ b/tests/fate/source-check.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+cd "$1"/..
+
+git --version > /dev/null || { cat tests/ref/fate/source ; exit 0; }
+
+echo Files without standard license headers:
+git grep -L -E "This file is part of FFmpeg|This file is part of libswresample|"\
+"Permission to use, copy, modify, and/or distribute this software for any|"\
+"Permission is hereby granted, free of charge, to any person|"\
+"Permission is hereby granted to use, copy, modify, and distribute this|"\
+"Permission is granted to anyone to use this software for any purpose|"\
+"This work is licensed under the terms of the GNU GPL|"\
+"Redistribution and use in source and binary forms, with or without modification|"\
+"This library is free software; you can redistribute it and/or|"\
+"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$'
+
+
+exit 0
diff --git a/tests/fate/source.mak b/tests/fate/source.mak
new file mode 100644
index 0000000000..465ef8525b
--- /dev/null
+++ b/tests/fate/source.mak
@@ -0,0 +1,3 @@
+
+FATE += fate-source
+fate-source: CMD = runlocal fate/source-check.sh