[Telepathy-commits] [telepathy-mission-control/master] test/twisted/README: Explain how to use environment variables for testing, and add support for refdbg

Alban Crequy alban.crequy at collabora.co.uk
Thu Nov 20 07:43:11 PST 2008


---
 test/twisted/README                    |   17 +++++++++++++++++
 test/twisted/tools/exec-with-log.sh.in |    7 +++++++
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/test/twisted/README b/test/twisted/README
index c9e23d1..93671bd 100644
--- a/test/twisted/README
+++ b/test/twisted/README
@@ -24,3 +24,20 @@ or:
         -- python test-basic.py -v
 
 
+To debug an individual test you can set one of the following env variable:
+
+  * MISSIONCONTROL_TEST_VALGRIND : to run Mission Control inside valgrind. The
+    report is added to tools/missioncontrol-testing.log.
+
+  * MISSIONCONTROL_TEST_REFDBG : to run Mission Control inside refdbg. The
+    report is written to tools/refdbg.log. You can change
+    MISSIONCONTROL_WRAPPER to use an alternative refdbg and change
+    REFDBG_OPTIONS to set your own parameters. Example:
+        export MISSIONCONTROL_TEST_REFDBG=1
+        export MISSIONCONTROL_WRAPPER="/path/to/refdbg"
+        export REFDBG_OPTIONS="btnum=16"
+
+  * MISSIONCONTROL_WRAPPER="nemiver" : to run Mission Control inside the
+    graphical debugger nemiver.  You'll be able to set up breakpoints; then hit
+    the "continue" button to launch Mission Control.
+
diff --git a/test/twisted/tools/exec-with-log.sh.in b/test/twisted/tools/exec-with-log.sh.in
index e65cc40..124c115 100644
--- a/test/twisted/tools/exec-with-log.sh.in
+++ b/test/twisted/tools/exec-with-log.sh.in
@@ -16,6 +16,13 @@ if test -n "$MISSIONCONTROL_TEST_VALGRIND"; then
 	export G_DEBUG=gc-friendly
 	export G_SLICE=always-malloc
 	MISSIONCONTROL_WRAPPER="valgrind --leak-check=full --num-callers=20"
+elif test -n "$MISSIONCONTROL_TEST_REFDBG"; then
+        if test -z "$REFDBG_OPTIONS" ; then
+                export REFDBG_OPTIONS="btnum=10"
+        fi
+        if test -z "$MISSIONCONTROL_WRAPPER" ; then
+                MISSIONCONTROL_WRAPPER="refdbg"
+        fi
 fi
 
 # Delete previous Mission Control accounts
-- 
1.5.6.5




More information about the Telepathy-commits mailing list