diff options
author | Thibault Saunier <thibault.saunier@collabora.com> | 2012-06-29 14:51:20 -0400 |
---|---|---|
committer | Thibault Saunier <thibault.saunier@collabora.com> | 2012-06-29 14:53:26 -0400 |
commit | 4746ccff75418183816c77267983b817bddee368 (patch) | |
tree | 531e3908c67edb12c2ab23219fff45acf8250c07 | |
parent | b6734d9f1e5444a344f595abcfc4b4b115ed4788 (diff) |
lib: Switch off GST_DEBUG output coloration by default, add a way to switch it on
-rw-r--r-- | lib/insanity-gst/insanitygsttest.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/insanity-gst/insanitygsttest.c b/lib/insanity-gst/insanitygsttest.c index 39ceb4d..aba2732 100644 --- a/lib/insanity-gst/insanitygsttest.c +++ b/lib/insanity-gst/insanitygsttest.c @@ -132,6 +132,7 @@ insanity_gst_test_setup (InsanityTest * test) { const char *registry; gchar *loglevel; + gboolean color; if (!INSANITY_TEST_CLASS (insanity_gst_test_parent_class)->setup (test)) return FALSE; @@ -139,6 +140,10 @@ insanity_gst_test_setup (InsanityTest * test) insanity_test_get_string_argument (test, "global-gst-debug-level", &loglevel); g_setenv ("GST_DEBUG", loglevel, TRUE); + insanity_test_get_boolean_argument (test, "gst-debug-color", &color); + if (color == FALSE) + g_setenv ("GST_DEBUG_NO_COLOR", "1", TRUE); + /* Set GST_REGISTRY to the target filename */ registry = insanity_test_get_output_filename (test, "gst-registry"); g_setenv ("GST_REGISTRY", registry, TRUE); @@ -204,6 +209,8 @@ insanity_gst_test_init (InsanityGstTest * gsttest) "Default GStreamer debug level to be used for the test", "This argument is used when no debug log level has been specified" " between the various iteration of start/stop", TRUE, "0"); + insanity_test_add_boolean_argument (test, "gst-debug-color", + "Switch on colouring in GST_DEBUG output", NULL, TRUE, FALSE); insanity_test_add_string_argument (test, "gst-debug-level", "The GStreamer debug level to be used for the test", "This argument is used when you need more control over the debug logs" |