Updated requirements and unit tests config

Changes:

1) Updated from global requirements

2) Updated "run_tests.sh" script to be able to run unit tests
using Django 1.8.* removing "--verbosity" opt.

3) Added tox jobs 'py27dj17' and 'py27dj18' to be able to run
unit tests for Django 1.7.* and 1.8.* in separate envs.

Change-Id: I267c8e7a6cb8d67d7331f4f00cb79ad98832d0e7
Closes-Bug: #1496412
This commit is contained in:
vponomaryov 2015-09-11 17:56:59 +03:00 committed by Valeriy Ponomaryov
parent 94b8e4e5ea
commit 9175d98493
4 changed files with 27 additions and 16 deletions

View File

@ -2,12 +2,12 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr>=0.6,!=0.7,<1.0
pbr>=1.6,<2.0
# Horizon Core Requirements
Babel>=1.3
Django>=1.4.2,<1.8
Django>=1.7,<1.9
django_compressor>=1.4
django_openstack_auth>=1.1.7,!=1.1.8
django_openstack_auth>=1.4.0
iso8601>=0.1.9
python-keystoneclient>=1.1.0
python-manilaclient>=1.0.4
python-keystoneclient>=1.6.0
python-manilaclient>=1.2.0

View File

@ -331,22 +331,22 @@ function run_tests {
function run_tests_subset {
project=`echo $testargs | awk -F. '{print $1}'`
${command_wrapper} python $root/manage.py test --settings=$project.test.settings --verbosity 2 $testopts $testargs
${command_wrapper} python $root/manage.py test --settings=$project.test.settings $testopts $testargs
}
function run_tests_all {
echo "Running application tests"
echo "Running Manila-UI application tests"
export NOSE_XUNIT_FILE=manila_ui/nosetests.xml
if [ "$NOSE_WITH_HTML_OUTPUT" = '1' ]; then
export NOSE_HTML_OUT_FILE='manila_nose_results.html'
export NOSE_HTML_OUT_FILE='manila_ui_nose_results.html'
fi
if [ $with_coverage -eq 1 ]; then
${command_wrapper} python -m coverage.__main__ erase
coverage_run="python -m coverage.__main__ run -p"
fi
${command_wrapper} ${coverage_run} $root/manage.py test manila_ui --settings=manila_ui.test.settings --verbosity 2 $testopts
${command_wrapper} ${coverage_run} $root/manage.py test manila_ui --settings=manila_ui.test.settings $testopts
# get results of the Horizon tests
MANILA_RESULT=$?
MANILA_UI_RESULT=$?
if [ $with_coverage -eq 1 ]; then
echo "Generating coverage reports"
@ -363,7 +363,7 @@ function run_tests_all {
PEP8_RESULT=$?
fi
TEST_RESULT=$(($MANILA_RESULT || $PEP8_RESULT))
TEST_RESULT=$(($MANILA_UI_RESULT || $PEP8_RESULT))
if [ $TEST_RESULT -eq 0 ]; then
echo "Tests completed successfully."
else

View File

@ -7,13 +7,13 @@
hacking<0.11,>=0.10.0
coverage>=3.6
ddt>=0.7.0
django-nose
django-nose>=1.2
discover
mock>=1.0
mock>=1.2
mox3>=0.7.0
python-subunit>=0.0.18
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
oslosphinx>=2.2.0 # Apache-2.0
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
oslosphinx>=2.5.0 # Apache-2.0
testrepository>=0.0.18
testscenarios>=0.4
testtools>=0.9.36,!=1.2.0
testtools>=1.4.0

11
tox.ini
View File

@ -26,6 +26,17 @@ basepython = python2.7
commands = pip install django>=1.4,<1.5
/bin/bash run_tests.sh -N --no-pep8 {posargs}
[testenv:py27dj17]
basepython = python2.7
commands = pip install django>=1.7,<1.8
/bin/bash run_tests.sh -N --no-pep8 {posargs}
# Django-1.8 is LTS
[testenv:py27dj18]
basepython = python2.7
commands = pip install django>=1.8,<1.9
/bin/bash run_tests.sh -N --no-pep8 {posargs}
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'