]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Getting ready for the client split.
authorMonty Taylor <mordred@inaugust.com>
Wed, 11 Jan 2012 01:44:27 +0000 (17:44 -0800)
committerMonty Taylor <mordred@inaugust.com>
Thu, 19 Jan 2012 00:43:18 +0000 (11:43 +1100)
Change-Id: Ic2e7d637d2c116dfda3d7ad958ccba39a8da7751

.gitignore
MANIFEST.in
run_tests.sh
setup.cfg [new file with mode: 0644]
tox.ini [new file with mode: 0644]

index 4a39e651d69c81fd3b9d15b55987bf3842547f27..1d97421c362362a412f04ab9e26feecfe5732cc6 100644 (file)
@@ -8,3 +8,4 @@ tests/
 .quantum-venv/
 .venv/
 quantum/vcsversion.py
+.tox/
index 7980b7a481137d5938597c5ef861791544f0a587..9ce200097196bfd6a1f34398f845d454b6222971 100644 (file)
@@ -3,4 +3,3 @@ include etc/*
 include etc/init.d/*
 include etc/quantum/plugins/openvswitch/*
 include etc/quantum/plugins/cisco/*
-include version.py
index e4adfde9415386c6b12deec768d2ea863cc0ddb7..6c62b5432f50e505b2cfcd2b2042491bc16a8127 100755 (executable)
@@ -9,6 +9,7 @@ function usage {
   echo "  -c, --coverage           Generate coverage report"
   echo "  -f, --force              Force a clean re-build of the virtual environment. Useful when dependencies have been added."
   echo "  -p, --pep8               Just run pep8"
+  echo "  -P, --no-pep8            Don't run pep8"
   echo "  -l, --pylint             Just run pylint"
   echo "  -v, --verbose            Run verbose pylint analysis"
   echo "  -h, --help               Print this usage message"
@@ -26,6 +27,7 @@ function process_option {
     -N|--no-virtual-env) let always_venv=0; let never_venv=1;;
     -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;;
     -c|--coverage) coverage=1;;
     -v|--verbose) verbose=1;;
@@ -39,6 +41,7 @@ with_venv=tools/with_venv.sh
 always_venv=0
 never_venv=0
 just_pep8=0
+no_pep8=0
 just_pylint=0
 force=0
 noseargs=
@@ -152,7 +155,13 @@ if [ $just_pylint -eq 1 ]; then
 fi
 
 RV=0
-run_tests && run_pep8 || RV=1
+if [ $no_pep8 -eq 1 ]; then
+    run_tests
+    RV=$?
+else
+    run_tests && run_pep8 || RV=1
+fi
+
 
 if [ $coverage -eq 1 ]; then
     echo "Generating coverage report in covhtml/"
diff --git a/setup.cfg b/setup.cfg
new file mode 100644 (file)
index 0000000..702a2fd
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,23 @@
+[nosetests]
+# NOTE(jkoelker) To run the test suite under nose install the following
+#                coverage http://pypi.python.org/pypi/coverage
+#                tissue http://pypi.python.org/pypi/tissue (pep8 checker)
+#                openstack-nose https://github.com/jkoelker/openstack-nose
+verbosity=2
+detailed-errors=1
+with-coverage=1
+cover-package=openstack.common
+cover-html=1
+cover-inclusive=1
+with-tissue=1
+tissue-repeat=1
+tissue-show-pep8=1
+tissue-show-source=1
+tissue-inclusive=1
+tissue-color=1
+with-openstack=1
+openstack-red=0.05
+openstack-yellow=0.025
+openstack-show-elapsed=1
+openstack-color=1
+
diff --git a/tox.ini b/tox.ini
new file mode 100644 (file)
index 0000000..0876fd1
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,31 @@
+[tox]
+envlist = py26,py27,pep8
+
+[testenv]
+deps = -r{toxinidir}/tools/pip-requires
+commands = /bin/bash run_tests.sh -N -P
+
+[testenv:pep8]
+commands = /bin/bash run_tests.sh -N --pep8
+
+[testenv:coverage]
+commands = /bin/bash run_tests.sh -N -P --with-coverage
+
+[testenv:hudson]
+downloadcache = ~/cache/pip
+
+[testenv:jenkins26]
+basepython = python2.6
+deps = file://{toxinidir}/.cache.bundle
+
+[testenv:jenkins27]
+basepython = python2.7
+deps = file://{toxinidir}/.cache.bundle
+
+[testenv:jenkinspep8]
+deps = file://{toxinidir}/.cache.bundle
+commands = /bin/bash run_tests.sh -N --pep8
+
+[testenv:jenkinscoverage]
+deps = file://{toxinidir}/.cache.bundle
+commands = /bin/bash run_tests.sh -N --with-coverage