summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-06-27 17:21:46 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2012-06-27 20:57:07 +0900
commit4187f31ff44093c806bb18cbf4584361824b5386 (patch)
tree77c1adc17250c7b7b1621c3333aef0f90a1376db
parent8dc9bf8ae855dcc38b177e016fcb3cc12708b5ad (diff)
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>
-rw-r--r--.pylintrc9
-rwxr-xr-xrun_tests.sh7
-rw-r--r--tools/pip-requires9
-rw-r--r--tools/test-requires7
4 files changed, 13 insertions, 19 deletions
diff --git a/.pylintrc b/.pylintrc
index 177512f8..f4e55be3 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -1,8 +1,15 @@
[Messages Control]
+# PyLint Messages http://pylint-messages.wikidot.com/all-messages
# C0111: Don't require docstrings on every method
# W0511: TODOs in code comments 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
reports=yes
files-output=no
diff --git a/run_tests.sh b/run_tests.sh
index ee56f975..2ca8e45a 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -28,7 +28,7 @@ function process_option {
-f|--force) let force=1;;
-p|--pep8) let just_pep8=1;let never_venv=1; let always_venv=0;;
-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;;
-v|--verbose) verbose=1;;
-*) noseopts="$noseopts $1";;
@@ -87,7 +87,7 @@ function run_pylint {
export PYTHONPATH=$PYTHONPATH:.ryu
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"
#[ $verbose -eq 1 ] && $BASE_CMD || msg_count=`$BASE_CMD | grep 'ryu/' | wc -l`
#if [ $verbose -eq 0 ]; then
@@ -102,7 +102,8 @@ function run_pep8 {
PEP8_EXCLUDE="vcsversion.py,*.pyc"
PEP8_OPTIONS="--exclude=$PEP8_EXCLUDE --repeat --show-source"
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"
diff --git a/tools/pip-requires b/tools/pip-requires
index b599fb5b..39517c4c 100644
--- a/tools/pip-requires
+++ b/tools/pip-requires
@@ -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
python-gflags==1.3
simplejson
-#sqlalchemy
webob==1.0.8
-
-#-e git+https://review.openstack.org/p/openstack/python-quantumclient#egg=python-quantumclient
diff --git a/tools/test-requires b/tools/test-requires
index e8276058..30546276 100644
--- a/tools/test-requires
+++ b/tools/test-requires
@@ -1,9 +1,4 @@
-#distribute>=0.6.24
-
coverage
-#mock>=0.7.1
nose
-#nosexcover
-#openstack.nose_plugin
pep8==0.6.1
-#webtest
+pylint==0.25.0