diff --git a/.testr.conf b/.testr.conf index ec138ed33..2c8b3fa90 100644 --- a/.testr.conf +++ b/.testr.conf @@ -1,6 +1,6 @@ [DEFAULT] test_command= PYTHON=$(echo ${PYTHON:-python} | sed 's/--source senlin//g') - ${PYTHON} -m subunit.run discover -s . $LISTOPT $IDOPTION + ${PYTHON} -m subunit.run discover ${OS_TEST_PATH:-./senlin/tests} -t . $LISTOPT $IDOPTION test_id_option=--load-list $IDFILE test_list_option=--list diff --git a/tox.ini b/tox.ini index f7f0f3aff..d7dce1a94 100644 --- a/tox.ini +++ b/tox.ini @@ -9,6 +9,7 @@ skipsdist = True # random hash seed successfully. setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 + OS_TEST_PATH=senlin/tests/unit deps = -r{toxinidir}/test-requirements.txt @@ -16,16 +17,19 @@ usedevelop = True install_command = pip install {opts} {packages} commands = find . -type f -name "*.pyc" -delete - ostestr --slowest --regex '^((?!tests\.functional).)+$' {posargs} + ostestr --slowest {posargs} whitelist_externals = bash find [testenv:functional] +setenv = VIRTUAL_ENV={envdir} + PYTHONHASHSEED=0 + OS_TEST_PATH=senlin/tests/functional passenv = OS_USERNAME OS_PASSWORD OS_TENANT_NAME OS_USER_DOMAIN_NAME OS_PROJECT_DOMAIN_NAME OS_REGION_NAME OS_AUTH_URL commands = find . -type f -name "*.pyc" -delete - ostestr --slowest --concurrency 1 --regex '^(.*?tests\.functional)' {posargs} + ostestr --slowest --concurrency 1 {posargs} [testenv:pep8] commands =