799a925c1f
As part of the move of plugins to entrypoints, take advantage of the entrypoints based console scripts, which will make our command line scripts available for unittesting. Part of blueprint entrypoints-plugins Co-authored-by: Michael Still <mikal@stillhq.com> Change-Id: I5f17348b7b3cc896c92263dd518abb128757d81f
26 lines
1002 B
Bash
Executable File
26 lines
1002 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
# This is used by run_tests.sh and tox.ini
|
|
python tools/hacking.py --doctest
|
|
|
|
# Until all these issues get fixed, ignore.
|
|
PEP8='python tools/hacking.py --ignore=E12,E711,E721,E712,N303,N403,N404'
|
|
|
|
EXCLUDE='--exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*'
|
|
EXCLUDE+=',*egg,build,./plugins/xenserver/networking/etc/xensource/scripts'
|
|
EXCLUDE+=',./plugins/xenserver/xenapi/etc/xapi.d/plugins'
|
|
${PEP8} ${EXCLUDE} .
|
|
|
|
SCRIPT_ROOT=$(echo $(cd "$(dirname $0)"; pwd) | sed s/\\/tools//)
|
|
|
|
SCRIPTS_PATH=${SCRIPT_ROOT}/plugins/xenserver/networking/etc/xensource/scripts
|
|
PYTHONPATH=${SCRIPTS_PATH} ${PEP8} ./plugins/xenserver/networking
|
|
|
|
# NOTE(sirp): Also check Dom0 plugins w/o .py extension
|
|
PLUGINS_PATH=${SCRIPT_ROOT}/plugins/xenserver/xenapi/etc/xapi.d/plugins
|
|
PYTHONPATH=${PLUGINS_PATH} ${PEP8} ./plugins/xenserver/xenapi \
|
|
`find plugins/xenserver/xenapi/etc/xapi.d/plugins -type f -perm +111`
|
|
|
|
! pyflakes nova/ | grep "imported but unused\|redefinition of function"
|