GNOME Bugzilla – Bug 690990
Add tests/README
Last modified: 2013-01-03 11:08:35 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.
Created attachment 232504 [details] [review] add tests/README
Note that for some reason the selected test seems to run twice.
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.
(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?
Created attachment 232613 [details] [review] HACKING: document how to run a single test
(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
Review of attachment 232613 [details] [review]: Great! Please push to master.
Attachment 232613 [details] pushed as 562add0 - HACKING: document how to run a single test
(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(-)
(In reply to comment #9) > Fixed by: > > commit 94e5bd0de196e8759b3654a0d56a475a7b5d3997 Or even commit e3458da97be361570872f591b42e8bc51e847374.