Fix vdsm pep8 job to check py.in files and files wihtout .py suffix
Nir Soffer
nsoffer at redhat.com
Fri Dec 27 09:02:06 UTC 2013
Current version checks only .py files, skipping errors in py.in files, vdsm and supervdsmServer scripts.
Here is the script needed to fix this issue:
rm -f ${WORKSPACE}/violations.txt
pushd $WORKSPACE/vdsm
git diff HEAD~ | pep8 --diff --filename '*.py,*.py.in,vdsm,supervdsmServer' | sed 's%^./*%%' > ${WORKSPACE}/violations.txt
if [[ ${PIPESTATUS[1]} -ne 0 ]]; then
echo "PEP8 Failed"
cat ${WORKSPACE}/violations.txt
else
echo "PEP8 is ok"
fi
For testing this, trigger this job with patch http://gerrit.ovirt.org/22724 - you should see failure vdsm, supervdsmServer, bad.py, bad.py.in
More information about the Infra
mailing list