Add functional tox env
Change-Id: Idbb330111cf0f18371ec37d4c0b2c83a5bb06a65
This commit is contained in:
parent
44b7b51302
commit
664e111c04
@ -4,7 +4,7 @@ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
|
||||
OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \
|
||||
OS_DEBUG=${OS_DEBUG:-1} \
|
||||
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \
|
||||
${PYTHON:-python} -m subunit.run discover -t ./ ./designate/tests $LISTOPT $IDOPTION
|
||||
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./designate/tests} $LISTOPT $IDOPTION
|
||||
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
@ -26,19 +26,7 @@ echo "Successfully contacted the Designate API"
|
||||
DESIGNATE_DIR=${DESIGNATE_DIR:-/opt/stack/new/designate}
|
||||
TEMPEST_DIR=${TEMPEST_DIR:-/opt/stack/new/tempest}
|
||||
|
||||
# Install tempest
|
||||
pip install -e $TEMPEST_DIR
|
||||
|
||||
pushd $DESIGNATE_DIR
|
||||
export TEMPEST_CONFIG=$TEMPEST_DIR/etc/tempest.conf
|
||||
|
||||
pushd $DESIGNATE_DIR/functionaltests
|
||||
|
||||
# run the tests in parallel
|
||||
testr init
|
||||
testr run --parallel --subunit | subunit-trace --no-failure-debug -f
|
||||
retval=$?
|
||||
testr slowest
|
||||
|
||||
popd
|
||||
|
||||
exit $retval
|
||||
tox -e functional
|
||||
|
@ -1,4 +0,0 @@
|
||||
[DEFAULT]
|
||||
test_command=python -m subunit.run discover ./api $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
@ -61,7 +61,8 @@ cfg.CONF.register_opts([
|
||||
|
||||
|
||||
def find_config_file():
|
||||
return os.environ.get('TEMPEST_CONFIG', 'tempest.conf')
|
||||
return os.environ.get(
|
||||
'TEMPEST_CONFIG', '/opt/stack/tempest/etc/tempest.conf')
|
||||
|
||||
|
||||
def read_config():
|
||||
|
8
tox.ini
8
tox.ini
@ -11,8 +11,6 @@ usedevelop = True
|
||||
install_command = pip install {opts} {packages}
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
# Note the hash seed is set to 0 until designate can be tested with a
|
||||
# random hash seed successfully.
|
||||
setenv =
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
whitelist_externals = sh
|
||||
@ -64,6 +62,12 @@ deps = pip-check-reqs
|
||||
-r{toxinidir}/requirements.txt
|
||||
commands=pip-missing-reqs -d --ignore-file=designate/tests/* designate
|
||||
|
||||
[testenv:functional]
|
||||
usedevelop = False
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
OS_TEST_PATH=functionaltests/
|
||||
passenv = TEMPEST_CONFIG
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user