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 690990 - Add tests/README
Add tests/README
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks:
 
 
Reported: 2013-01-02 09:33 UTC by Guillaume Desmottes
Modified: 2013-01-03 11:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add tests/README (649 bytes, patch)
2013-01-02 09:34 UTC, Guillaume Desmottes
needs-work Details | Review
HACKING: document how to run a single test (952 bytes, patch)
2013-01-03 09:18 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2013-01-02 09:33:28 UTC
I found myself wondering how to run/debug a single test. Having a tests/README file (like we have one in tp-glib) would be handy.
Comment 1 Guillaume Desmottes 2013-01-02 09:34:14 UTC
Created attachment 232504 [details] [review]
add tests/README
Comment 2 Guillaume Desmottes 2013-01-02 09:34:32 UTC
Note that for some reason the selected test seems to run twice.
Comment 3 Philip Withnall 2013-01-02 15:44:06 UTC
Review of attachment 232504 [details] [review]:

This looks good, but we’ve already got a (short) section on it in the HACKING file in the root directory. Could you merge your instructions into HACKING, and create README as stub file which just directs people to the relevant section(s) of HACKING? Thanks.
Comment 4 Philip Withnall 2013-01-02 15:58:26 UTC
(In reply to comment #2)
> Note that for some reason the selected test seems to run twice.

What command are you using which causes this?
Comment 5 Guillaume Desmottes 2013-01-03 09:18:00 UTC
Created attachment 232613 [details] [review]
HACKING: document how to run a single test
Comment 6 Guillaume Desmottes 2013-01-03 09:19:19 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > Note that for some reason the selected test seems to run twice.
> 
> What command are you using which causes this?


Oh, there is an error as well:

$ LANG=C make check TESTS=avatar-cache
Making check in folks
Making check in backends
Making check in key-file
Making check in telepathy
Making check in lib
Making check in libsocialweb
Making check in lib
Making check in eds
Making check in lib
Making check in ofono
Making check in tools
Making check in inspect
Making check in po
Making check in tests
Making check in data
Making check in lib
Making check in key-file
Making check in telepathy
Making check in contactlist
Making check in libsocialweb
Making check in eds
Making check in tools
Making check in folks
PASS: avatar-cache
=============
1 test passed
=============
PASS: avatar-cache
=============
1 test passed
=============
Making check in telepathy
../../valgrind.mk:2: warning: overriding recipe for target `check'
Makefile:888: warning: ignoring old recipe for target `check'
../../valgrind.mk:2: warning: overriding recipe for target `check'
Makefile:888: warning: ignoring old recipe for target `check'
../../valgrind.mk:2: warning: overriding recipe for target `check'
Makefile:888: warning: ignoring old recipe for target `check'
make[4]: *** No rule to make target `avatar-cache', needed by `check-TESTS'.  Stop.
make[3]: *** [check-am] Error 2
make[2]: *** [check] Error 2
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1
Comment 7 Philip Withnall 2013-01-03 10:16:04 UTC
Review of attachment 232613 [details] [review]:

Great! Please push to master.
Comment 8 Guillaume Desmottes 2013-01-03 10:33:55 UTC
Attachment 232613 [details] pushed as 562add0 - HACKING: document how to run a single test
Comment 9 Philip Withnall 2013-01-03 11:07:41 UTC
(In reply to comment #6)
> Oh, there is an error as well:

That’s because you’re setting TESTS to run the ‘avatar-cache’ test in every subdirectory of tests/, even though it doesn’t exist in some subdirectories.

(In reply to comment #2)
> Note that for some reason the selected test seems to run twice.

Fixed by:

commit 94e5bd0de196e8759b3654a0d56a475a7b5d3997
Author: Philip Withnall <philip@tecnocode.co.uk>
Date:   Thu Jan 3 11:04:11 2013 +0000

    build: Rewrite valgrind.mk to use GNU Make conditionals
    
    This means we’re not overwriting rules and potentially changing their
    prerequisites. Incorrectly overwriting check-* rules was causing tests to
    be run twice in the tests/folks directory.
    
    See: https://bugzilla.gnome.org/show_bug.cgi?id=690990

 NEWS        |  1 +
 valgrind.mk | 33 +++++++++++++++------------------
 2 files changed, 16 insertions(+), 18 deletions(-)
Comment 10 Philip Withnall 2013-01-03 11:08:35 UTC
(In reply to comment #9)
> Fixed by:
> 
> commit 94e5bd0de196e8759b3654a0d56a475a7b5d3997

Or even commit e3458da97be361570872f591b42e8bc51e847374.