[0.10] insanity-gst: discoverer: Validate/ invalidate checklist items when skipping comparison with expected file

Sebastian Dröge slomo at kemper.freedesktop.org
Tue Apr 17 07:41:17 PDT 2012


Module: insanity-gst
Branch: 0.10
Commit: 4467818a50efc6c9c3257bd371c1b99b97d5f8c9
URL:    http://cgit.freedesktop.org/gstreamer/insanity-gst/commit/?id=4467818a50efc6c9c3257bd371c1b99b97d5f8c9

Author: Sebastian Dröge <sebastian.droege at collabora.co.uk>
Date:   Mon Apr 16 13:52:35 2012 +0200

discoverer: Validate/invalidate checklist items when skipping comparison with expected file

And also disable comparison with expected file by default.

---

 tests/insanity-test-gst-discoverer.c |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/tests/insanity-test-gst-discoverer.c b/tests/insanity-test-gst-discoverer.c
index e30b42a..d3b1554 100644
--- a/tests/insanity-test-gst-discoverer.c
+++ b/tests/insanity-test-gst-discoverer.c
@@ -32,7 +32,7 @@ static gint timeout = 10;
 static GMainLoop *ml;
 static GstDiscovererInfo *info;
 static gboolean async = TRUE;
-static gboolean skip = FALSE;
+static gboolean skip_compare = FALSE;
 static InsanityTest *gstest;
 static gchar *uri;
 static gchar **lines;
@@ -1401,7 +1401,11 @@ _new_discovered_uri (GstDiscoverer * dc, GstDiscovererInfo * dcinfo,
     return;
   }
 
-  if (skip) {
+  if (skip_compare) {
+    insanity_test_validate_checklist_item (gstest, "comparison-file-parsed",
+        TRUE, NULL);
+    insanity_test_validate_checklist_item (gstest, "discoverer-correct", TRUE,
+        NULL);
     return;
   }
 
@@ -1550,12 +1554,19 @@ discoverer_test_test (InsanityTest * test)
     g_free (uri);
     uri = NULL;
 
+    insanity_test_validate_checklist_item (gstest,
+        "discoverer-returned-results", TRUE, NULL);
+    insanity_test_validate_checklist_item (gstest, "comparison-file-parsed",
+        TRUE, NULL);
+    insanity_test_validate_checklist_item (gstest, "discoverer-correct", TRUE,
+        NULL);
+
     insanity_test_done (test);
     (void) test;
     return;
   }
 
-  insanity_test_get_boolean_argument (test, "skip", &skip);
+  insanity_test_get_boolean_argument (test, "skip-compare", &skip_compare);
 
   insanity_test_printf (test, "Analyzing URI: %s\n", uri);
 
@@ -1610,9 +1621,10 @@ main (int argc, char **argv)
   insanity_test_add_string_argument (test, "uri", "Input file",
       "URI of file to process", TRUE, "file:///home/user/video.avi");
 
-  insanity_test_add_boolean_argument (test, "skip", "Skip comparing results",
+  insanity_test_add_boolean_argument (test, "skip-compare",
+      "Skip comparing results",
       "Just check whether discoverer returns something without comparing it",
-      TRUE, FALSE);
+      TRUE, TRUE);
 
   g_signal_connect_after (test, "setup", G_CALLBACK (&discoverer_test_setup),
       0);



More information about the gstreamer-commits mailing list