summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Harris <rconradharris@gmail.com>2012-06-27 22:52:41 +0000
committerRick Harris <rconradharris@gmail.com>2012-06-28 22:57:24 +0000
commit8a10d6bade79d000cb53b5f0464cfc8b4c9a8686 (patch)
treead5cde9224b78b3b521b8c188bcac50123c08445
parentb38840fdbd6d8d9e7da46ba91b40d20048b3fa2d (diff)
downloadnova-8a10d6bade79d000cb53b5f0464cfc8b4c9a8686.tar.gz
nova-8a10d6bade79d000cb53b5f0464cfc8b4c9a8686.tar.xz
nova-8a10d6bade79d000cb53b5f0464cfc8b4c9a8686.zip
Add PEP8 checks back for Dom0 plugins.
Fixes bug 1018641 Change-Id: Id61947252fe4d3f5b93279518128ba90100f3748
-rwxr-xr-xrun_tests.sh31
1 files changed, 17 insertions, 14 deletions
diff --git a/run_tests.sh b/run_tests.sh
index c814b1adf..f61979e0d 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -98,27 +98,30 @@ function run_tests {
return $RESULT
}
-# Files of interest
-# NOTE(lzyeval): Avoid selecting nova-api-paste.ini and nova.conf in nova/bin
-# when running on devstack.
-# NOTE(lzyeval): Avoid selecting *.pyc files to reduce pep8 check-up time
-# when running on devstack.
-# NOTE(dprince): Exclude xenapi plugins. They are Python 2.4 code and as such
-# cannot be expected to work with tools/hacking checks.
-xen_net_path="plugins/xenserver/networking/etc/xensource/scripts"
-srcfiles=`find nova -type f -name "*.py"`
-srcfiles+=" `find bin -type f ! -name "nova.conf*" ! -name "*api-paste.ini*"`"
-srcfiles+=" `find tools -type f -name "*.py"`"
-srcfiles+=" setup.py"
function run_pep8 {
echo "Running PEP8 and HACKING compliance check..."
- # Just run PEP8 in current environment
- #
+
+ # Files of interest
+ # NOTE(lzyeval): Avoid selecting nova-api-paste.ini and nova.conf in nova/bin
+ # when running on devstack.
+ # NOTE(lzyeval): Avoid selecting *.pyc files to reduce pep8 check-up time
+ # when running on devstack.
+ srcfiles=`find nova -type f -name "*.py"`
+ srcfiles+=" `find bin -type f ! -name "nova.conf*" ! -name "*api-paste.ini*"`"
+ srcfiles+=" `find tools -type f -name "*.py"`"
+ srcfiles+=" setup.py"
# Until all these issues get fixed, ignore.
ignore='--ignore=N4'
+
${wrapper} python tools/hacking.py ${ignore} ${srcfiles}
+
+ # NOTE(sirp): Dom0 plugins are written for Python 2.4, meaning some HACKING
+ # checks are too strict.
+ pep8onlyfiles=`find plugins -type f -name "*.py"`
+ pep8onlyfiles+=" `find plugins/xenserver/xenapi/etc/xapi.d/plugins/ -type f -executable`"
+ ${wrapper} pep8 ${pep8onlyfiles}
}