From 1d3938fb6c0a8bb6979224343cde7b52b01c5730 Mon Sep 17 00:00:00 2001 From: Rob Hirschfeld Date: Fri, 4 Apr 2014 00:11:59 -0500 Subject: [PATCH] Now that we can execute_tests, we want to give some more information about debug options in the TCUP file and documentation. Change-Id: I232972c4074ddd04e1d2b7a08a63a75bd5a50a21 --- doc/tcup.md | 9 ++++++++- scripts/tcup.py | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/tcup.md b/doc/tcup.md index 813d9c7e..826d4663 100644 --- a/doc/tcup.md +++ b/doc/tcup.md @@ -29,6 +29,7 @@ There are several ways to trouble shoot, TCUP. 1. Check your environment variables include the OS_* values using `export` 1. Make sure you can access Keystone using `curl $OS_AUTH_URL` 1. Make sure your credentials are working using `keystone catalog` +1. `Export DEBUG=true` to turn on additional logging and force TCUP into manual run mode ## Docker Tips 1. You can run Docker without sudo! @@ -43,4 +44,10 @@ There are several ways to trouble shoot, TCUP. 1. exit from inside the container with `Ctrl-p` + `Ctrl-q` 1. Orphaned Containers: Over time, you may end up with [orphaned contaniers](http://jimhoskins.com/2013/07/27/remove-untagged-docker-images.html), use the following to clean them up 1. `sudo docker rm $(docker ps -a -q)` - 1. `sudo docker rmi $(docker images | grep "^" | awk "{print $3}")` \ No newline at end of file + 1. `sudo docker rmi $(docker images | grep "^" | awk "{print $3}")` + +## For Developers + +If you run TCUP in debug mode (`export DEBUG=true`) then TCUP will automatically mount your PWD as /dev. +If you run TCUP from your Refstack clone, then you can work directly in Refstack code from inside +a TCUP container from the /dev directory. \ No newline at end of file diff --git a/scripts/tcup.py b/scripts/tcup.py index db9b1243..fba430d5 100755 --- a/scripts/tcup.py +++ b/scripts/tcup.py @@ -89,8 +89,11 @@ if __name__ == "__main__": docker_run += ' -t %s' % (image) if "DEBUG" in user_env_vars: docker_run += " /bin/bash" + logger.info("""Debug mode does not start tests! + You must run `refstack/tools/execute_test.py \ + --tempest-home /tempest` to complete processing""") else: - docker_run += " cd refstack; python refstack/tools/execute_test.py" \ + docker_run += " cd refstack; refstack/tools/execute_test.py" \ " --tempest-home /tempest" \ " --callback ${api_addr} ${test_id}" if "DEBUG" in user_env_vars: