From ddbab0509442e55ca6a68b9ef9a879e49e0e4f67 Mon Sep 17 00:00:00 2001 From: Thiago da Silva Date: Fri, 5 Aug 2016 14:22:28 -0400 Subject: [PATCH] add reminder how to run debug func tests added comments on how to run in_process and specific test cases Change-Id: I485755996b15753323d30de09914d35e262fcedc Signed-off-by: Thiago da Silva --- .functests | 3 +++ doc/source/development_guidelines.rst | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.functests b/.functests index af989f50ff..5e3b177176 100755 --- a/.functests +++ b/.functests @@ -1,5 +1,8 @@ #!/bin/bash +# How-To debug functional tests: +# SWIFT_TEST_IN_PROCESS=1 tox -e func -- --pdb test.functional.tests.TestFile.testCopy + SRC_DIR=$(python -c "import os; print os.path.dirname(os.path.realpath('$0'))") set -e diff --git a/doc/source/development_guidelines.rst b/doc/source/development_guidelines.rst index 8097abf8b2..17e4aed984 100644 --- a/doc/source/development_guidelines.rst +++ b/doc/source/development_guidelines.rst @@ -132,6 +132,12 @@ tox environment:: tox -e func-in-process-fast-post +To debug the functional tests, use the 'in-process test' mode and pass the +``--pdb`` flag to tox:: + + SWIFT_TEST_IN_PROCESS=1 tox -e func -- --pdb \ + test.functional.tests.TestFile.testCopy + The 'in-process test' mode searches for ``proxy-server.conf`` and ``swift.conf`` config files from which it copies config options and overrides some options to suit in process testing. The search will first look for config @@ -236,4 +242,3 @@ another year added, and date ranges are not needed.:: # implied. # See the License for the specific language governing permissions and # limitations under the License. -