Add nose to run_tests and tox for python 2.6
This commit adds python 2.6 to both tox and run_tests. 2 new tox jobs
are added py26-full and py26-smoke, which will use nose as the test
runner. run_tests.sh is also modified to detect whether python2.6 is
being used, and if so it will use nose instead of testr.
Change-Id: Ia7cecbea99ba2f995a726def6f775a313c4e94ba
diff --git a/run_tests.sh b/run_tests.sh
index f8636c1..f995cde 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -108,6 +108,21 @@
fi
}
+function run_tests_nose {
+ NOSE_WITH_OPENSTACK=1
+ NOSE_OPENSTACK_COLOR=1
+ NOSE_OPENSTACK_RED=15.00
+ NOSE_OPENSTACK_YELLOW=3.00
+ NOSE_OPENSTACK_SHOW_ELAPSED=1
+ NOSE_OPENSTACK_STDOUT=1
+ if [[ "x$noseargs" =~ "tempest" ]]; then
+ noseargs="$testrargs"
+ else
+ noseargs="$noseargs tempest"
+ fi
+ ${wrapper} nosetests $noseargs
+}
+
function run_pep8 {
echo "Running pep8 ..."
${wrapper} flake8
@@ -162,7 +177,13 @@
run_coverage_start
fi
-run_tests
+
+py_version=`${wrapper} python --version 2>&1`
+if [[ $py_version =~ "2.6" ]] ; then
+ run_tests_nose
+else
+ run_tests
+fi
retval=$?
if [ $nova_coverage -eq 1 ]; then