Add tox functional target

Create a formal tox target for functional tests.
Also we should not be overriding the user's localrc.

Closes-Bug: #1440125
Change-Id: Ide639ea89050cf3e1f1e9e40c687d506998f7587
This commit is contained in:
Davanum Srinivas 2015-04-05 21:12:56 -04:00
parent dbb3769fa3
commit 79ac06cc4b
3 changed files with 18 additions and 16 deletions

View File

@ -13,13 +13,6 @@ TENANT_VLAN_RANGE=
PHYSICAL_NETWORK=public PHYSICAL_NETWORK=public
OVS_PHYSICAL_BRIDGE=br-ex OVS_PHYSICAL_BRIDGE=br-ex
# Credentials
ADMIN_PASSWORD=password
DATABASE_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=password
enable_service rabbit enable_service rabbit
# Enable Neutron which is required by Magnum and disable nova-network. # Enable Neutron which is required by Magnum and disable nova-network.

View File

@ -32,20 +32,23 @@ echo_summary "magnum's post_test_hook.sh was called..."
sudo pip install -r test-requirements.txt sudo pip install -r test-requirements.txt
# Try a command line as a sanity check # Get admin credentials
source ../devstack/accrc/admin/admin pushd ../devstack
source openrc admin admin
popd
echo_summary "Running bay-list" echo_summary "Running bay-list"
magnum --debug bay-list magnum --debug bay-list
sudo OS_STDOUT_CAPTURE=-1 OS_STDERR_CAPTURE=-1 OS_TEST_TIMEOUT=500 OS_TEST_LOCK_PATH=${TMPDIR:-'/tmp'} \ # Run functional tests
python -m subunit.run discover -t ./ ./magnum/tests/functional | subunit-2to1 | tools/colorizer.py echo "Running magnum functional test suite"
RETVAL=$? sudo -H -u stack tox -e functional
EXIT_CODE=$?
# Restore xtrace
$XTRACE
# Save the logs # Save the logs
sudo mv ../logs/* /opt/stack/logs/ sudo mv ../logs/* /opt/stack/logs/
exit $RETVAL # Restore xtrace
$XTRACE
exit $EXIT_CODE

View File

@ -12,6 +12,12 @@ deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}' commands = python setup.py testr --slowest --testr-args='{posargs}'
[testenv:functional]
setenv = OS_TEST_PATH=./magnum/tests/functional
OS_TEST_TIMEOUT=500
deps =
{[testenv]deps}
[testenv:pep8] [testenv:pep8]
commands = flake8 commands = flake8