test: improve the framework

run_test.sh:
  * run pylint on virtualenv to enforce version 0.25.0 for now.
    (because pylint 0.25.1 doesn't work due to a bug)
  * output pep8.log for Jenkins integration.

pylint:
  * disable some noisy messages.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
FUJITA Tomonori 2012-06-27 17:21:46 +09:00
parent 8dc9bf8ae8
commit 4187f31ff4
4 changed files with 13 additions and 19 deletions

View File

@ -1,8 +1,15 @@
[Messages Control] [Messages Control]
# PyLint Messages http://pylint-messages.wikidot.com/all-messages
# C0111: Don't require docstrings on every method # C0111: Don't require docstrings on every method
# W0511: TODOs in code comments are fine. # W0511: TODOs in code comments are fine.
# W0142: *args and **kwargs are fine. # W0142: *args and **kwargs are fine.
disable=C0111,W0511,W0142 # E0602: Undefined variable %r
# C0103: Invalid name "%s" (should match %s)
# E1101: %s %r has no %r member
# R0903: Too few public methods (%s/%s)
# W0614: Unused import %s from wildcard import
# R0801: Similar lines in %s files
disable=C0111,W0511,W0142,E0602,C0103,E1101,R0903,W0614,R0801
output-format=parseable output-format=parseable
reports=yes reports=yes
files-output=no files-output=no

View File

@ -28,7 +28,7 @@ function process_option {
-f|--force) let force=1;; -f|--force) let force=1;;
-p|--pep8) let just_pep8=1;let never_venv=1; let always_venv=0;; -p|--pep8) let just_pep8=1;let never_venv=1; let always_venv=0;;
-P|--no-pep8) no_pep8=1;; -P|--no-pep8) no_pep8=1;;
-l|--pylint) let just_pylint=1; let never_venv=1; let always_venv=0;; -l|--pylint) let just_pylint=1;;
-c|--coverage) coverage=1;; -c|--coverage) coverage=1;;
-v|--verbose) verbose=1;; -v|--verbose) verbose=1;;
-*) noseopts="$noseopts $1";; -*) noseopts="$noseopts $1";;
@ -87,7 +87,7 @@ function run_pylint {
export PYTHONPATH=$PYTHONPATH:.ryu export PYTHONPATH=$PYTHONPATH:.ryu
PYLINT_LOG=pylint.log PYLINT_LOG=pylint.log
pylint $PYLINT_OPTIONS $PYLINT_INCLUDE > $PYLINT_LOG ${wrapper} pylint $PYLINT_OPTIONS $PYLINT_INCLUDE > $PYLINT_LOG
#BASE_CMD="pylint $PYLINT_OPTIONS $PYLINT_INCLUDE > $PYLINT_LOG" #BASE_CMD="pylint $PYLINT_OPTIONS $PYLINT_INCLUDE > $PYLINT_LOG"
#[ $verbose -eq 1 ] && $BASE_CMD || msg_count=`$BASE_CMD | grep 'ryu/' | wc -l` #[ $verbose -eq 1 ] && $BASE_CMD || msg_count=`$BASE_CMD | grep 'ryu/' | wc -l`
#if [ $verbose -eq 0 ]; then #if [ $verbose -eq 0 ]; then
@ -102,7 +102,8 @@ function run_pep8 {
PEP8_EXCLUDE="vcsversion.py,*.pyc" PEP8_EXCLUDE="vcsversion.py,*.pyc"
PEP8_OPTIONS="--exclude=$PEP8_EXCLUDE --repeat --show-source" PEP8_OPTIONS="--exclude=$PEP8_EXCLUDE --repeat --show-source"
PEP8_INCLUDE="bin/* ryu setup*.py" PEP8_INCLUDE="bin/* ryu setup*.py"
${wrapper} pep8 $PEP8_OPTIONS $PEP8_INCLUDE PEP8_LOG=pep8.log
${wrapper} pep8 $PEP8_OPTIONS $PEP8_INCLUDE | tee $PEP8_LOG
} }
#NOSETESTS="nosetests $noseopts $noseargs" #NOSETESTS="nosetests $noseopts $noseargs"

View File

@ -1,13 +1,4 @@
#Paste
#PasteDeploy==1.5.0
#Routes>=1.12.3
#eventlet>=0.9.12
#lxml
#mox==0.5.3
gevent>=0.13 gevent>=0.13
python-gflags==1.3 python-gflags==1.3
simplejson simplejson
#sqlalchemy
webob==1.0.8 webob==1.0.8
#-e git+https://review.openstack.org/p/openstack/python-quantumclient#egg=python-quantumclient

View File

@ -1,9 +1,4 @@
#distribute>=0.6.24
coverage coverage
#mock>=0.7.1
nose nose
#nosexcover
#openstack.nose_plugin
pep8==0.6.1 pep8==0.6.1
#webtest pylint==0.25.0