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 639366 - Optionally integrate valgrind into make check target
Optionally integrate valgrind into make check target
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: 2011-01-12 20:52 UTC by Eitan Isaacson
Modified: 2011-01-16 06:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Added valgrind support in make check. (6.41 KB, patch)
2011-01-12 20:53 UTC, Eitan Isaacson
reviewed Details | Review
Added valgrind support in make check. (12.12 KB, patch)
2011-01-14 09:35 UTC, Eitan Isaacson
accepted-commit_now Details | Review
Added valgrind support in make check. (12.14 KB, patch)
2011-01-16 06:33 UTC, Eitan Isaacson
committed Details | Review

Description Eitan Isaacson 2011-01-12 20:52:27 UTC
It would be nice if we always had an option of running tests with valgrind.
Currently some of the tests have a timeout that if it's reached it is considered a failure. The timeout period needs to be increased when running under valgrind.
Comment 1 Eitan Isaacson 2011-01-12 20:53:33 UTC
Created attachment 178179 [details] [review]
Added valgrind support in make check.
Comment 2 Philip Withnall 2011-01-13 09:44:00 UTC
Review of attachment 178179 [details] [review]:

Looks good apart from these two indentation problems. What about also changing the timeout code in telepathy/persona-store-capabilities.vala, telepathy/individual-properties.vala and key-file/individual-retrieval.vala?

::: tests/folks/aggregation.vala
@@ +40,3 @@
+
+	  if (Environment.get_variable ("FOLKS_TEST_VALGRIND") != null)
+		  this.test_timeout = 10;

Indentation problem.

::: tests/telepathy/individual-retrieval.vala
@@ +37,3 @@
+
+	  if (Environment.get_variable ("FOLKS_TEST_VALGRIND") != null)
+		  this.test_timeout = 10;

Indentation problem.
Comment 3 Eitan Isaacson 2011-01-14 09:35:56 UTC
Created attachment 178304 [details] [review]
Added valgrind support in make check.

Fixes the indentation issues (I'm new to emacs vala-mode).
Added the variable timeout to the other tests.
Comment 4 Philip Withnall 2011-01-14 16:26:09 UTC
Review of attachment 178304 [details] [review]:

Please feel free to push your changes once the comment below is fixed in all the relevant places (sorry, I missed this before). Thanks!

::: tests/folks/aggregation.vala
@@ +9,3 @@
   private HashSet<string> _default_individuals;
   private string _individual_id_prefix = "telepathy:protocol:";
+  private int test_timeout = 3;

I forgot to mention before: we've recently adopted a coding style which mandates the prefixing of private member variables with underscores, so this should be _test_timeout.
Comment 5 Eitan Isaacson 2011-01-16 06:33:55 UTC
Created attachment 178428 [details] [review]
Added valgrind support in make check.

Added underscore prefix to private field. Will merge this.
Comment 6 Eitan Isaacson 2011-01-16 06:36:38 UTC
Merged. Thanks for reviewing!