diff --git a/.testr.conf b/.testr.conf index 86458110..f83adfd5 100644 --- a/.testr.conf +++ b/.testr.conf @@ -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 diff --git a/contrib/devstack/run_tempest_tests.sh b/contrib/devstack/run_tempest_tests.sh index 2f7cabf6..c6cd1e6c 100755 --- a/contrib/devstack/run_tempest_tests.sh +++ b/contrib/devstack/run_tempest_tests.sh @@ -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 diff --git a/functionaltests/.testr.conf b/functionaltests/.testr.conf deleted file mode 100644 index c31512a3..00000000 --- a/functionaltests/.testr.conf +++ /dev/null @@ -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 diff --git a/functionaltests/common/config.py b/functionaltests/common/config.py index 56c88cae..dac9ca3d 100644 --- a/functionaltests/common/config.py +++ b/functionaltests/common/config.py @@ -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(): diff --git a/tox.ini b/tox.ini index d19d173a..130a069f 100644 --- a/tox.ini +++ b/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}