If option -p has been specified, run checkpatch on the split out patches instead

of the single large patch.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2359 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2010-10-06 18:25:58 +00:00
parent 6ced6c5338
commit 9eac25591f
+16 -5
View File
@@ -305,11 +305,22 @@ function run_checkpatch {
local outputfile="${outputdir}/checkpatch-$1-output.txt"
local patchfile="${outputdir}/scst-$1-kernel.patch"
if [ -e "${outputdir}/linux-$1/scripts/checkpatch.pl" ]
then
echo "Running checkpatch on the SCST kernel patch ..."
( cd "${outputdir}/linux-$1" \
&& scripts/checkpatch.pl --no-tree - < "${patchfile}" &> "${outputfile}")
if [ -e "${outputdir}/linux-$1/scripts/checkpatch.pl" ]; then
if [ "${multiple_patches}" = "false" ]; then
echo "Running checkpatch on the SCST kernel patch ..."
( cd "${outputdir}/linux-$1" \
&& scripts/checkpatch.pl --no-tree --no-signoff - < "${patchfile}" &> "${outputfile}")
else
echo "Running checkpatch on the SCST kernel patches ..."
rm -f "${outputfile}"
( cd "${outputdir}/linux-$1" \
&& for p in "${outputdir}/${patchdir}"/*
do
echo "==== $p" >>"${outputfile}"
scripts/checkpatch.pl --no-tree --no-signoff - < "$p" >> "${outputfile}" 2>&1
done
)
fi
local errors=$(grep -c '^ERROR' "${outputfile}")
local warnings=$(grep -c '^WARNING' "${outputfile}")
echo "${errors} errors / ${warnings} warnings."