added a make test target which also checks for copyright headers
This commit is contained in:
parent
265d734ab8
commit
96c37dbd91
7
guh.pro
7
guh.pro
@ -8,4 +8,9 @@ tests.depends = libguh
|
||||
|
||||
doc.depends = libguh server
|
||||
doc.commands = cd $$top_srcdir/doc; qdoc config.qdocconf
|
||||
QMAKE_EXTRA_TARGETS += doc
|
||||
|
||||
licensecheck.commands = $$top_srcdir/tests/auto/checklicenseheaders.sh $$top_srcdir
|
||||
|
||||
test.depends = licensecheck check
|
||||
|
||||
QMAKE_EXTRA_TARGETS += licensecheck doc test
|
||||
|
||||
9
tests/auto/checklicenseheaders.sh
Executable file
9
tests/auto/checklicenseheaders.sh
Executable file
@ -0,0 +1,9 @@
|
||||
results=`licensecheck -r -c '\.(cpp|h)$' $1 | grep -v "GPL (v2)"`
|
||||
if test -z "$results"; then
|
||||
exit 0
|
||||
else
|
||||
echo "*** License check failed. Offending files:"
|
||||
licensecheck -r -c '\.(cpp|h)$' $1 | grep -v "GPL (v2)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user