From 4b39ec1f0ffb3b8f8971d1d9e38ce0249d03cf22 Mon Sep 17 00:00:00 2001 From: Andy Yan Date: Fri, 6 Jan 2017 14:24:03 +0800 Subject: [PATCH] Make functional tests out of Jenkin's verification Make functional tests out of Jenkins verification because Jenkins has no real environment for functional tests. And "# tox -e functional" should be used for local functional tests. Change-Id: Idad4eb055ffdc077269facbc1f6dd97c6d3a9b52 Signed-off-by: Andy Yan --- .testr.conf | 3 +-- tox.ini | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.testr.conf b/.testr.conf index e6d96c8..32dc624 100644 --- a/.testr.conf +++ b/.testr.conf @@ -2,7 +2,6 @@ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \ - ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./valence/tests} $LISTOPT $IDOPTION - ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./valence/tests/functional} $LISTOPT $IDOPTION + ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./valence/tests/unit} $LISTOPT $IDOPTION test_id_option=--load-list $IDFILE test_list_option=--list diff --git a/tox.ini b/tox.ini index 2579720..d703671 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,8 @@ install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} -deps = -r{toxinidir}/test-requirements.txt +deps = -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:common-constraints] @@ -23,6 +24,10 @@ commands = flake8 {posargs} install_command = {[testenv:common-constraints]install_command} commands = flake8 {posargs} +[testenv:functional] +setenv = OS_TEST_PATH=./valence/tests/functional +deps = {[testenv]deps} + [testenv:venv] commands = {posargs}