diff options
author | Travis Reitter <travis.reitter@collabora.co.uk> | 2011-06-10 10:39:27 -0700 |
---|---|---|
committer | Travis Reitter <travis.reitter@collabora.co.uk> | 2011-06-21 14:07:11 -0700 |
commit | 506058011ec47ef14a03c9ce2fde35d82b7ba394 (patch) | |
tree | 3c328f6d7c2f67355f14962f1ccbd91b1fd9c1b7 | |
parent | 68ae999ee44d13707e7773a3c7f58df45b38ef7d (diff) |
Add ability to run any of our tests through gdb
Run a test through gdb with:
make -C tests/<dir> <test name>.gdb
-rw-r--r-- | HACKING | 11 | ||||
-rw-r--r-- | check.mk | 6 | ||||
-rw-r--r-- | tests/folks/Makefile.am | 1 | ||||
-rw-r--r-- | tests/key-file/Makefile.am | 1 | ||||
-rw-r--r-- | tests/libsocialweb/Makefile.am | 1 | ||||
-rw-r--r-- | tests/telepathy/Makefile.am | 1 | ||||
-rw-r--r-- | tests/tracker/Makefile.am | 1 |
7 files changed, 22 insertions, 0 deletions
@@ -116,3 +116,14 @@ Build health 2. After commits have been pushed to mainline, all buildbots must successfully build and pass 'make check' on their next build of Folks. It's up to the committer to ensure this requirement is met and make necessary changes. + +Debugging tests +=============== + +If a test ever crashes, you'll probably want to run it through gdb. The exact +setup work for that is a bit complicated, so we've provided some convenience +hooks for each test. Simply run: + + make -C tests/<dir> <test name>.gdb + +Then use gdb as normal. diff --git a/check.mk b/check.mk new file mode 100644 index 0000000..34951c4 --- /dev/null +++ b/check.mk @@ -0,0 +1,6 @@ +# taken from gstreamer +# gdb any given test by running make test.gdb +%.gdb: % + $(TESTS_ENVIRONMENT) \ + $(LIBTOOL) --mode=execute \ + gdb $* diff --git a/tests/folks/Makefile.am b/tests/folks/Makefile.am index 31fa1f7..bc97b94 100644 --- a/tests/folks/Makefile.am +++ b/tests/folks/Makefile.am @@ -87,3 +87,4 @@ EXTRA_DIST = \ -include $(top_srcdir)/git.mk -include $(top_srcdir)/valgrind.mk +-include $(top_srcdir)/check.mk diff --git a/tests/key-file/Makefile.am b/tests/key-file/Makefile.am index 4df1f2a..65cccc7 100644 --- a/tests/key-file/Makefile.am +++ b/tests/key-file/Makefile.am @@ -63,3 +63,4 @@ EXTRA_DIST = \ -include $(top_srcdir)/git.mk -include $(top_srcdir)/valgrind.mk +-include $(top_srcdir)/check.mk diff --git a/tests/libsocialweb/Makefile.am b/tests/libsocialweb/Makefile.am index 2eae22b..92c87b5 100644 --- a/tests/libsocialweb/Makefile.am +++ b/tests/libsocialweb/Makefile.am @@ -83,3 +83,4 @@ EXTRA_DIST = \ $(NULL) -include $(top_srcdir)/git.mk +-include $(top_srcdir)/check.mk diff --git a/tests/telepathy/Makefile.am b/tests/telepathy/Makefile.am index 4d1c562..8974265 100644 --- a/tests/telepathy/Makefile.am +++ b/tests/telepathy/Makefile.am @@ -97,3 +97,4 @@ EXTRA_DIST = \ -include $(top_srcdir)/git.mk -include $(top_srcdir)/valgrind.mk +-include $(top_srcdir)/check.mk diff --git a/tests/tracker/Makefile.am b/tests/tracker/Makefile.am index dba97aa..bb11fd0 100644 --- a/tests/tracker/Makefile.am +++ b/tests/tracker/Makefile.am @@ -421,3 +421,4 @@ EXTRA_DIST = \ $(NULL) -include $(top_srcdir)/git.mk +-include $(top_srcdir)/check.mk |