From: Jens Georg Date: Wed, 3 Oct 2012 11:48:33 +0000 (+0200) Subject: test: Silence warnings in ItemCreator test X-Git-Tag: RYGEL_0_17_0~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5b262a94e8d4dbdc7417d79bce579cf057e90b2;p=profile%2Fivi%2Frygel.git test: Silence warnings in ItemCreator test --- diff --git a/tests/rygel-item-creator-test.vala b/tests/rygel-item-creator-test.vala index 53971c0..b11ac01 100644 --- a/tests/rygel-item-creator-test.vala +++ b/tests/rygel-item-creator-test.vala @@ -267,9 +267,29 @@ public class Rygel.EngineLoader { } } +public static void log_func (string? domain, + LogLevelFlags flags, + string message) { + + // Ignore critical of gee 0.6 and recent glib + if (message.has_prefix ("Read-only property 'read-only-view' on class")) { + Log.default_handler (domain, flags, message); + + return; + } + + if (LogLevelFlags.LEVEL_CRITICAL in flags || + LogLevelFlags.LEVEL_ERROR in flags || + LogLevelFlags.FLAG_FATAL in flags) { + print ("======> FAILED: %s: %s\n", domain ?? "", message); + assert_not_reached (); + } +} + public class Rygel.HTTPItemCreatorTest : GLib.Object { public static int main (string[] args) { + Log.set_default_handler (log_func); var test = new HTTPItemCreatorTest (); test.test_parse_args (); test.test_didl_parsing ();