After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 652434 - Add ability to run any tests through gdb
Add ability to run any tests through gdb
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: folks-0.6.0
Assigned To: folks-maint
folks-maint
Depends on:
Blocks:
 
 
Reported: 2011-06-13 09:28 UTC by Travis Reitter
Modified: 2011-06-21 21:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Support running any test through gdb (2.01 KB, patch)
2011-06-13 09:53 UTC, Travis Reitter
reviewed Details | Review

Description Travis Reitter 2011-06-13 09:28:04 UTC
In case a test case crashes, there is a lot of environment variables, etc. to set to be able to run it in gdb.

We should put that work into our build system, so it's trivial to run any test through gdb.
Comment 1 Travis Reitter 2011-06-13 09:53:03 UTC
Created attachment 189813 [details] [review]
Support running any test through gdb

Patch from branch:

http://cgit.collabora.com/git/user/treitter/folks.git/log/?h=bgo652434-gdb-tests
Comment 2 Philip Withnall 2011-06-13 10:29:21 UTC
Review of attachment 189813 [details] [review]:

Might want to add the instructions for using it to HACKING.

::: check.mk
@@ +2,3 @@
+# gdb any given test by running make test.gdb
+%.gdb: %
+	CK_FORK=no \

Some quick Googling shows that this is only relevant to Check (http://check.sourceforge.net/), which GStreamer uses but we don't. Is there some reason it's here?
Comment 3 Travis Reitter 2011-06-21 21:11:20 UTC
(In reply to comment #2)
> Review of attachment 189813 [details] [review]:
> 
> Might want to add the instructions for using it to HACKING.
> 
> ::: check.mk
> @@ +2,3 @@
> +# gdb any given test by running make test.gdb
> +%.gdb: %
> +    CK_FORK=no \
> 
> Some quick Googling shows that this is only relevant to Check
> (http://check.sourceforge.net/), which GStreamer uses but we don't. Is there
> some reason it's here?

I googled it as well, but it looks like I misinterpreted it (I read some GStreamer docs that discussed it a little - it sounded like they were referring to 'make check'. Hooray, generic project names! Er.)

Anyway, I addressed both issues and pushed:

commit edb8daf44a810aaa3b9ca1ebfb701d6b9ff2cc7b
Author: Travis Reitter <travis.reitter@collabora.co.uk>
Date:   Tue Jun 21 14:08:47 2011 -0700

    Note closing of bgo#652434 — Add ability to run any tests through gdb
    
    Closes: bgo#652434

 NEWS |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

commit 506058011ec47ef14a03c9ce2fde35d82b7ba394
Author: Travis Reitter <travis.reitter@collabora.co.uk>
Date:   Fri Jun 10 10:39:27 2011 -0700

    Add ability to run any of our tests through gdb
    
    Run a test through gdb with:
    
        make -C tests/<dir> <test name>.gdb

 HACKING                        |   11 +++++++++++
 check.mk                       |    6 ++++++
 tests/folks/Makefile.am        |    1 +
 tests/key-file/Makefile.am     |    1 +
 tests/libsocialweb/Makefile.am |    1 +
 tests/telepathy/Makefile.am    |    1 +
 tests/tracker/Makefile.am      |    1 +
 7 files changed, 22 insertions(+), 0 deletions(-)