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. -