From b93c84e734aec42a750860028ec4439bc1c0f6b7 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 1 Jun 2012 00:15:49 +0800 Subject: play: Use the new shared checklist items list --- tests/insanity-test-gst-play.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/insanity-test-gst-play.c b/tests/insanity-test-gst-play.c index b714449..8e46501 100644 --- a/tests/insanity-test-gst-play.c +++ b/tests/insanity-test-gst-play.c @@ -240,6 +240,9 @@ main (int argc, char **argv) insanity_test_add_checklist_item (test, "all-buffers-received", "Appsinks (if used) received all buffers", NULL); + insanity_test_add_shared_checklist_item (test, "reached-initial-state"); + insanity_test_add_shared_checklist_item (test, "pipeline-change-state"); + insanity_gst_pipeline_test_set_create_pipeline_function (INSANITY_GST_PIPELINE_TEST (test), &play_gst_test_create_pipeline, NULL, -- cgit v1.2.3 From 68cb4831353d05939a1e4cd4223f80ba88b22e21 Mon Sep 17 00:00:00 2001 From: "Andre Moreira Magalhaes (andrunko)" Date: Thu, 14 Jun 2012 18:12:19 -0300 Subject: Handle changes in insanity_test_add_checklist_item API. --- lib/insanity-gst/insanitygstpipelinetest.c | 8 ++++---- tests/insanity-http-server.c | 2 +- tests/insanity-test-gst-decoder.c | 23 ++++++++++++----------- tests/insanity-test-gst-demuxer.c | 30 +++++++++++++++--------------- tests/insanity-test-gst-discoverer.c | 6 +++--- tests/insanity-test-gst-dvd.c | 18 +++++++++--------- tests/insanity-test-gst-hls.c | 25 +++++++++++++------------ tests/insanity-test-gst-http.c | 9 +++++---- tests/insanity-test-gst-play.c | 5 +---- tests/insanity-test-gst-seek.c | 20 ++++++++++---------- tests/insanity-test-gst-stream-switch.c | 10 +++++----- tests/insanity-test-gst-subtitles.c | 8 ++++---- 12 files changed, 82 insertions(+), 82 deletions(-) diff --git a/lib/insanity-gst/insanitygstpipelinetest.c b/lib/insanity-gst/insanitygstpipelinetest.c index 70dd591..e4908ec 100644 --- a/lib/insanity-gst/insanitygstpipelinetest.c +++ b/lib/insanity-gst/insanitygstpipelinetest.c @@ -690,13 +690,13 @@ insanity_gst_pipeline_test_init (InsanityGstPipelineTest * gsttest) /* Add our own items, etc */ insanity_test_add_checklist_item (test, "valid-pipeline", - "The test pipeline was properly created", NULL); + "The test pipeline was properly created", NULL, TRUE); insanity_test_add_checklist_item (test, "pipeline-change-state", - "The initial state_change happened succesfully", NULL); + "The initial state_change happened succesfully", NULL, TRUE); insanity_test_add_checklist_item (test, "reached-initial-state", - "The pipeline reached the initial GstElementState", NULL); + "The pipeline reached the initial GstElementState", NULL, TRUE); insanity_test_add_checklist_item (test, "no-errors-seen", - "No errors were emitted from the pipeline", NULL); + "No errors were emitted from the pipeline", NULL, FALSE); insanity_test_add_extra_info (test, "errors", "List of errors emitted by the pipeline"); diff --git a/tests/insanity-http-server.c b/tests/insanity-http-server.c index 73c0766..1ac61d7 100644 --- a/tests/insanity-http-server.c +++ b/tests/insanity-http-server.c @@ -628,7 +628,7 @@ http_server_start (InsanityHttpServer * srv) /* We add the server-started as a checklist item of the test */ insanity_test_add_checklist_item (test, "server-started", - "The internal HTTP server was started", NULL); + "The internal HTTP server was started", NULL, FALSE); priv->port = 0; priv->ssl_port = 0; diff --git a/tests/insanity-test-gst-decoder.c b/tests/insanity-test-gst-decoder.c index f5e66e3..7424cd2 100644 --- a/tests/insanity-test-gst-decoder.c +++ b/tests/insanity-test-gst-decoder.c @@ -1197,30 +1197,31 @@ main (int argc, char **argv) /* Checklist */ insanity_test_add_checklist_item (test, "testing-decoder-or-parser", "Whether the element we are testing (referenced with the decoder-name)" - " argument is a decoder or a parser and thus can be tested here", NULL); + " argument is a decoder or a parser and thus can be tested here", NULL, + FALSE); insanity_test_add_checklist_item (test, "install-probes", - "Probes were installed on the sinks", NULL); + "Probes were installed on the sinks", NULL, FALSE); insanity_test_add_checklist_item (test, "seekable-detection", - "The demuxer detects if a stream is seekable or not", NULL); + "The demuxer detects if a stream is seekable or not", NULL, FALSE); insanity_test_add_checklist_item (test, "duration-detection", - "The demuxer detects duration of the stream properly", NULL); + "The demuxer detects duration of the stream properly", NULL, FALSE); insanity_test_add_checklist_item (test, "position-detection", - "The demuxer detects the position in the stream properly", NULL); + "The demuxer detects the position in the stream properly", NULL, FALSE); insanity_test_add_checklist_item (test, "segment-clipping", - "Buffers were correctly clipped to the configured segment", NULL); + "Buffers were correctly clipped to the configured segment", NULL, FALSE); insanity_test_add_checklist_item (test, "first-segment", "The demuxer sends a" - " first segment with proper values before " "first buffers", NULL); + " first segment with proper values before " "first buffers", NULL, FALSE); insanity_test_add_checklist_item (test, "seqnum-management", "The events" - "we receive have the seqnum it should have", NULL); + "we receive have the seqnum it should have", NULL, FALSE); insanity_test_add_checklist_item (test, "fast-forward", "The demuxer could " - " properly play the stream fast-forward" "first buffers", NULL); + " properly play the stream fast-forward" "first buffers", NULL, FALSE); insanity_test_add_checklist_item (test, "fast-backward", "The demuxer could " - " properly play the stream fast-backward" "first buffers", NULL); + " properly play the stream fast-backward" "first buffers", NULL, FALSE); insanity_test_add_checklist_item (test, "backward-playback", "The demuxer could " " properly play the stream backward" "first buffers", - NULL); + NULL, FALSE); insanity_gst_pipeline_test_set_create_pipeline_function (ptest, &create_pipeline, NULL, NULL); diff --git a/tests/insanity-test-gst-demuxer.c b/tests/insanity-test-gst-demuxer.c index f002b50..6dc4d07 100644 --- a/tests/insanity-test-gst-demuxer.c +++ b/tests/insanity-test-gst-demuxer.c @@ -1541,37 +1541,37 @@ main (int argc, char **argv) /* Checklist */ insanity_test_add_checklist_item (test, "testing-demuxer", "Whether the element we are testing (referenced with the demuxer " - "argument) is indeed a demuxer and thus can be tested here", NULL); + "argument) is indeed a demuxer and thus can be tested here", NULL, FALSE); insanity_test_add_checklist_item (test, "stream-detection", "The demuxer " - "detects the various stream and sets the caps properly", NULL); + "detects the various stream and sets the caps properly", NULL, FALSE); insanity_test_add_checklist_item (test, "frames-detection", "The demuxer " - "detects the frames and its metadatas properly", NULL); + "detects the frames and its metadatas properly", NULL, FALSE); insanity_test_add_checklist_item (test, "install-probes", - "Probes were installed on the sinks", NULL); + "Probes were installed on the sinks", NULL, FALSE); insanity_test_add_checklist_item (test, "seekable-detection", - "The demuxer detects if a stream is seekable or not", NULL); + "The demuxer detects if a stream is seekable or not", NULL, FALSE); insanity_test_add_checklist_item (test, "duration-detection", - "The demuxer detects duration of the stream properly", NULL); + "The demuxer detects duration of the stream properly", NULL, FALSE); insanity_test_add_checklist_item (test, "position-detection", - "The demuxer detects the position in the stream properly", NULL); + "The demuxer detects the position in the stream properly", NULL, FALSE); insanity_test_add_checklist_item (test, "tag-detection", - "The demuxer detects the tags in the stream properly", NULL); + "The demuxer detects the tags in the stream properly", NULL, FALSE); insanity_test_add_checklist_item (test, "first-segment", "The demuxer sends a" - " first segment with proper values before " "first buffers", NULL); + " first segment with proper values before " "first buffers", NULL, FALSE); insanity_test_add_checklist_item (test, "seqnum-management", "The events" - "we receive have the seqnum it should have", NULL); + "we receive have the seqnum it should have", NULL, FALSE); insanity_test_add_checklist_item (test, "fast-forward", "The demuxer could " - " properly play the stream fast-forward" "first buffers", NULL); + " properly play the stream fast-forward" "first buffers", NULL, FALSE); insanity_test_add_checklist_item (test, "fast-backward", "The demuxer could " - " properly play the stream fast-backward" "first buffers", NULL); + " properly play the stream fast-backward" "first buffers", NULL, FALSE); insanity_test_add_checklist_item (test, "segment-seek", "The demuxer could " - " properly segment seeking", NULL); + " properly segment seeking", NULL, FALSE); insanity_test_add_checklist_item (test, "backward-playback", "The demuxer could " " properly play the stream backward" "first buffers", - NULL); + NULL, FALSE); insanity_test_add_checklist_item (test, "unlink-pad-handling", "The demuxer" "properly handles pad is unlinking (errors out if only 1 source pad, keep" - "pushing buffer on other pad otherwize)" "first buffers", NULL); + "pushing buffer on other pad otherwize)" "first buffers", NULL, FALSE); insanity_gst_pipeline_test_set_create_pipeline_function (ptest, &demux_test_create_pipeline, NULL, NULL); diff --git a/tests/insanity-test-gst-discoverer.c b/tests/insanity-test-gst-discoverer.c index d3b1554..96bca73 100644 --- a/tests/insanity-test-gst-discoverer.c +++ b/tests/insanity-test-gst-discoverer.c @@ -1610,13 +1610,13 @@ main (int argc, char **argv) "Check gst-discoverer's output against previously stored expected results")); insanity_test_add_checklist_item (test, "discoverer-returned-results", - "Discoverer returned something", "Discoverer returned nothing"); + "Discoverer returned something", "Discoverer returned nothing", FALSE); insanity_test_add_checklist_item (test, "comparison-file-parsed", "File with expected values parsed", - "Unable to parse file with expected values"); + "Unable to parse file with expected values", FALSE); insanity_test_add_checklist_item (test, "discoverer-correct", "Discoverer returned correct results", - "Discoverer returned something wrong"); + "Discoverer returned something wrong", FALSE); insanity_test_add_string_argument (test, "uri", "Input file", "URI of file to process", TRUE, "file:///home/user/video.avi"); diff --git a/tests/insanity-test-gst-dvd.c b/tests/insanity-test-gst-dvd.c index 2139615..c7d5885 100644 --- a/tests/insanity-test-gst-dvd.c +++ b/tests/insanity-test-gst-dvd.c @@ -649,24 +649,24 @@ main (int argc, char **argv) insanity_test_add_checklist_item (test, "uri-is-dvd", - "The URI is a DVD specific URI", NULL); + "The URI is a DVD specific URI", NULL, FALSE); insanity_test_add_checklist_item (test, "select-root-menu", - "Root menu selection succeded", NULL); + "Root menu selection succeded", NULL, FALSE); insanity_test_add_checklist_item (test, "select-first-menu", - "First menu selection succeded", NULL); + "First menu selection succeded", NULL, FALSE); insanity_test_add_checklist_item (test, "retrieve-angles", - "The DVD gave a list of supported angles", NULL); + "The DVD gave a list of supported angles", NULL, FALSE); insanity_test_add_checklist_item (test, "retrieve-commands", - "The DVD gave a list of supported commands", NULL); + "The DVD gave a list of supported commands", NULL, FALSE); insanity_test_add_checklist_item (test, "seek-to-main-title", - "Seek in title format to the main title", NULL); + "Seek in title format to the main title", NULL, FALSE); insanity_test_add_checklist_item (test, "cycle-angles", - "Cycle through each angle of the selected title in turn", NULL); + "Cycle through each angle of the selected title in turn", NULL, FALSE); insanity_test_add_checklist_item (test, "cycle-unused-commands", "Cycle through a list of unused commands, which should have no effect", - NULL); + NULL, FALSE); insanity_test_add_checklist_item (test, "send-random-commands", - "Send random valid commands, going through menus at random", NULL); + "Send random valid commands, going through menus at random", NULL, FALSE); insanity_test_add_extra_info (test, "seed", "The seed used to generate random commands"); diff --git a/tests/insanity-test-gst-hls.c b/tests/insanity-test-gst-hls.c index 11cd11e..7397388 100644 --- a/tests/insanity-test-gst-hls.c +++ b/tests/insanity-test-gst-hls.c @@ -755,31 +755,32 @@ main (int argc, char **argv) insanity_test_add_string_argument (test, "ssl-key-file", "Key file for SSL server", NULL, TRUE, ssl_key_file); insanity_test_add_checklist_item (test, "uri-is-file", - "The URI is a file URI", NULL); + "The URI is a file URI", NULL, FALSE); - insanity_test_add_checklist_item (test, "seek", "A seek succeeded", NULL); + insanity_test_add_checklist_item (test, "seek", "A seek succeeded", NULL, + FALSE); insanity_test_add_checklist_item (test, "duration-known", - "Stream duration could be determined", NULL); + "Stream duration could be determined", NULL, FALSE); insanity_test_add_checklist_item (test, "protocol-is-hls", - "The protocol in use is HLS", NULL); + "The protocol in use is HLS", NULL, FALSE); insanity_test_add_checklist_item (test, "install-probes", - "Probes were installed on the sinks", NULL); + "Probes were installed on the sinks", NULL, FALSE); insanity_test_add_checklist_item (test, "queried-live", - "The stream is live", NULL); + "The stream is live", NULL, FALSE); insanity_test_add_checklist_item (test, "queried-seekable", - "The stream is seekable", NULL); + "The stream is seekable", NULL, FALSE); insanity_test_add_checklist_item (test, "position-queried", - "Stream position could be determined", NULL); + "Stream position could be determined", NULL, FALSE); insanity_test_add_checklist_item (test, "done-buffering", - "Got a buffering message", NULL); + "Got a buffering message", NULL, FALSE); insanity_test_add_checklist_item (test, "segment-seek-time-correct", "Segments were seen after a seek at or near the expected seek target", - NULL); + NULL, FALSE); insanity_test_add_checklist_item (test, "buffer-seek-time-correct", "Buffers were seen after a seek at or near the expected seek target", - NULL); + NULL, FALSE); insanity_test_add_checklist_item (test, "play-in-time", - "Wether the playing time are accurate", NULL); + "Wether the playing time are accurate", NULL, FALSE); insanity_gst_pipeline_test_set_create_pipeline_function (ptest, &hls_test_create_pipeline, NULL, NULL); diff --git a/tests/insanity-test-gst-http.c b/tests/insanity-test-gst-http.c index c8c6e5d..335ea62 100644 --- a/tests/insanity-test-gst-http.c +++ b/tests/insanity-test-gst-http.c @@ -438,13 +438,14 @@ main (int argc, char **argv) g_value_unset (&vdef); insanity_test_add_checklist_item (test, "uri-is-file", - "The URI is a file URI", NULL); + "The URI is a file URI", NULL, FALSE); - insanity_test_add_checklist_item (test, "seek", "A seek succeeded", NULL); + insanity_test_add_checklist_item (test, "seek", "A seek succeeded", NULL, + FALSE); insanity_test_add_checklist_item (test, "duration-known", - "Stream duration could be determined", NULL); + "Stream duration could be determined", NULL, FALSE); insanity_test_add_checklist_item (test, "position-queried", - "Stream position could be determined", NULL); + "Stream position could be determined", NULL, FALSE); insanity_gst_pipeline_test_set_create_pipeline_function (ptest, &http_test_create_pipeline, NULL, NULL); diff --git a/tests/insanity-test-gst-play.c b/tests/insanity-test-gst-play.c index 8e46501..8d059bb 100644 --- a/tests/insanity-test-gst-play.c +++ b/tests/insanity-test-gst-play.c @@ -239,10 +239,7 @@ main (int argc, char **argv) g_value_unset (&vdef); insanity_test_add_checklist_item (test, "all-buffers-received", - "Appsinks (if used) received all buffers", NULL); - insanity_test_add_shared_checklist_item (test, "reached-initial-state"); - insanity_test_add_shared_checklist_item (test, "pipeline-change-state"); - + "Appsinks (if used) received all buffers", NULL, FALSE); insanity_gst_pipeline_test_set_create_pipeline_function (INSANITY_GST_PIPELINE_TEST (test), &play_gst_test_create_pipeline, NULL, diff --git a/tests/insanity-test-gst-seek.c b/tests/insanity-test-gst-seek.c index 9621d3b..5e25c99 100644 --- a/tests/insanity-test-gst-seek.c +++ b/tests/insanity-test-gst-seek.c @@ -1171,27 +1171,27 @@ main (int argc, char **argv) g_value_unset (&vdef); insanity_test_add_checklist_item (test, "install-probes", - "Probes were installed on the sinks", NULL); + "Probes were installed on the sinks", NULL, FALSE); insanity_test_add_checklist_item (test, "duration-known", - "Stream duration could be determined", NULL); + "Stream duration could be determined", NULL, FALSE); insanity_test_add_checklist_item (test, "seekable", - "Stream detected as seekable", NULL); + "Stream detected as seekable", NULL, FALSE); insanity_test_add_checklist_item (test, "seek", - "Seek events were accepted by the pipeline", NULL); + "Seek events were accepted by the pipeline", NULL, FALSE); insanity_test_add_checklist_item (test, "buffer-seek-time-correct", "Buffers were seen after a seek at or near the expected seek target", - NULL); + NULL, FALSE); insanity_test_add_checklist_item (test, "segment-seek-time-correct", "Segments were seen after a seek at or near the expected seek target", - NULL); + NULL, FALSE); insanity_test_add_checklist_item (test, "segment-clipping", - "Buffers were correctly clipped to the configured segment", NULL); + "Buffers were correctly clipped to the configured segment", NULL, FALSE); insanity_test_add_checklist_item (test, "buffers-received", - "Appsinks (if used) received some buffers", NULL); + "Appsinks (if used) received some buffers", NULL, FALSE); insanity_test_add_checklist_item (test, "normal-seek", - "Normal seeks performed properly", NULL); + "Normal seeks performed properly", NULL, FALSE); insanity_test_add_checklist_item (test, "trick-seek", - "Trick seeks performed properly", NULL); + "Trick seeks performed properly", NULL, FALSE); insanity_test_add_extra_info (test, "max-seek-error", "The maximum timestamp difference between a seek target and the buffer received after the seek (absolute value in nanoseconds)"); diff --git a/tests/insanity-test-gst-stream-switch.c b/tests/insanity-test-gst-stream-switch.c index 613a30d..dc13cc3 100644 --- a/tests/insanity-test-gst-stream-switch.c +++ b/tests/insanity-test-gst-stream-switch.c @@ -1554,15 +1554,15 @@ main (int argc, char **argv) g_value_unset (&vdef); insanity_test_add_checklist_item (test, "install-probes", - "Probes were installed on the sinks", NULL); + "Probes were installed on the sinks", NULL, FALSE); insanity_test_add_checklist_item (test, "found-all-streams", - "Streams were successfully detected by playbin2", NULL); + "Streams were successfully detected by playbin2", NULL, FALSE); insanity_test_add_checklist_item (test, "stream-switch", - "Streams were successfully switched", NULL); + "Streams were successfully switched", NULL, FALSE); insanity_test_add_checklist_item (test, "streams-constant", - "Streams didn't switch without requesting", NULL); + "Streams didn't switch without requesting", NULL, FALSE); insanity_test_add_checklist_item (test, "unique-markers", - "Streams all had unique markers", NULL); + "Streams all had unique markers", NULL, FALSE); insanity_test_add_extra_info (test, "max-stream-switch-time", "The maximum amount of time taken to perform a stream switch (in nanoseconds)"); diff --git a/tests/insanity-test-gst-subtitles.c b/tests/insanity-test-gst-subtitles.c index f5f60d4..70888b8 100644 --- a/tests/insanity-test-gst-subtitles.c +++ b/tests/insanity-test-gst-subtitles.c @@ -1087,13 +1087,13 @@ main (int argc, char **argv) /* Checklist */ insanity_test_add_checklist_item (test, "testing-subtitles", - "Whether we found subtitle in @sublocation", NULL); + "Whether we found subtitle in @sublocation", NULL, FALSE); insanity_test_add_checklist_item (test, "install-probes", - "Probes were installed on the sinks", NULL); + "Probes were installed on the sinks", NULL, FALSE); insanity_test_add_checklist_item (test, "subtitle-rendered", - "The subtitles are properly rendered on top of the video", NULL); + "The subtitles are properly rendered on top of the video", NULL, FALSE); insanity_test_add_checklist_item (test, "first-segment", "The demuxer sends a" - " first segment with proper values before " "first buffers", NULL); + " first segment with proper values before " "first buffers", NULL, FALSE); insanity_gst_pipeline_test_set_create_pipeline_function (ptest, &create_pipeline, NULL, NULL); -- cgit v1.2.3 From 6ea08458b441fb3645617da334e94619e207dcdd Mon Sep 17 00:00:00 2001 From: "Andre Moreira Magalhaes (andrunko)" Date: Thu, 14 Jun 2012 23:53:22 -0300 Subject: insanitygstpipelinetest: Validate checklist item "no-errors-seen" on stop instead of teardown. This is required as the stats of a test are retrieved on each stop call. --- lib/insanity-gst/insanitygstpipelinetest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/insanity-gst/insanitygstpipelinetest.c b/lib/insanity-gst/insanitygstpipelinetest.c index e4908ec..120eb2d 100644 --- a/lib/insanity-gst/insanitygstpipelinetest.c +++ b/lib/insanity-gst/insanitygstpipelinetest.c @@ -541,6 +541,9 @@ insanity_gst_pipeline_test_stop (InsanityTest * test) INSANITY_GST_PIPELINE_TEST (test)->priv; GstState state, pending; + insanity_test_validate_checklist_item (test, "no-errors-seen", + priv->error_count == 0, NULL); + if (priv->wait_timeout_id) { g_source_remove (priv->wait_timeout_id); priv->wait_timeout_id = 0; @@ -584,9 +587,6 @@ insanity_gst_pipeline_test_teardown (InsanityTest * test) InsanityGstPipelineTest *ptest = INSANITY_GST_PIPELINE_TEST (test); InsanityGstPipelineTestPrivateData *priv = ptest->priv; - insanity_test_validate_checklist_item (test, "no-errors-seen", - priv->error_count == 0, NULL); - if (priv->bus) { gst_object_unref (priv->bus); priv->bus = NULL; -- cgit v1.2.3 From a14a40727131a384f26acb8ab7d3e88c85ee28a0 Mon Sep 17 00:00:00 2001 From: "Andre Moreira Magalhaes (andrunko)" Date: Fri, 15 Jun 2012 10:49:46 -0300 Subject: insanity-test-gst-play: Always validate all-buffers-received if not using appsink. --- tests/insanity-test-gst-play.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/insanity-test-gst-play.c b/tests/insanity-test-gst-play.c index 8d059bb..cf79ef0 100644 --- a/tests/insanity-test-gst-play.c +++ b/tests/insanity-test-gst-play.c @@ -197,6 +197,9 @@ play_test_stop (InsanityTest * test) } gst_object_unref (audiosink); gst_object_unref (videosink); + } else { + insanity_test_validate_checklist_item (test, "all-buffers-received", + TRUE, "All sinks received all their buffers"); } return TRUE; } -- cgit v1.2.3