Fix vdsm pep8 job to check py.in files and files wihtout .py suffix

Eyal Edri eedri at redhat.com
Fri Dec 27 20:23:50 UTC 2013


done. 

On Dec 27, 2013 11:02 AM, Nir Soffer <nsoffer at redhat.com> wrote:
>
> Current version checks only .py files, skipping errors in py.in fCurrent 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
_______________________________________________
Infra mailing list
Infra at ovirt.org
http://lists.ovirt.org/mailman/listinfo/infra



More information about the Infra mailing list