From 5d58464e8ab8f436093f2da1bc7970d9a7c770e4 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 20 Jun 2005 11:23:59 +0000 Subject: [PATCH] remove clock testsuite, important stuff already moved to check Original commit message from CVS: remove clock testsuite, important stuff already moved to check --- configure.ac | 1 - tests/old/testsuite/Makefile.am | 4 +- tests/old/testsuite/clock/.gitignore | 3 -- tests/old/testsuite/clock/Makefile.am | 5 --- tests/old/testsuite/clock/clock1.c | 58 ---------------------------- tests/old/testsuite/clock/clock2.c | 69 ---------------------------------- tests/old/testsuite/clock/signedness.c | 40 -------------------- testsuite/Makefile.am | 4 +- testsuite/clock/.gitignore | 3 -- testsuite/clock/Makefile.am | 5 --- testsuite/clock/clock1.c | 58 ---------------------------- testsuite/clock/clock2.c | 69 ---------------------------------- testsuite/clock/signedness.c | 40 -------------------- 13 files changed, 4 insertions(+), 355 deletions(-) delete mode 100644 tests/old/testsuite/clock/.gitignore delete mode 100644 tests/old/testsuite/clock/Makefile.am delete mode 100644 tests/old/testsuite/clock/clock1.c delete mode 100644 tests/old/testsuite/clock/clock2.c delete mode 100644 tests/old/testsuite/clock/signedness.c delete mode 100644 testsuite/clock/.gitignore delete mode 100644 testsuite/clock/Makefile.am delete mode 100644 testsuite/clock/clock1.c delete mode 100644 testsuite/clock/clock2.c delete mode 100644 testsuite/clock/signedness.c diff --git a/configure.ac b/configure.ac index 101e5e4..bac05bf 100644 --- a/configure.ac +++ b/configure.ac @@ -679,7 +679,6 @@ testsuite/Makefile testsuite/bytestream/Makefile testsuite/caps/Makefile testsuite/cleanup/Makefile -testsuite/clock/Makefile testsuite/debug/Makefile testsuite/dlopen/Makefile testsuite/dynparams/Makefile diff --git a/tests/old/testsuite/Makefile.am b/tests/old/testsuite/Makefile.am index f2e717e..a20019f 100644 --- a/tests/old/testsuite/Makefile.am +++ b/tests/old/testsuite/Makefile.am @@ -14,7 +14,7 @@ GST_DEBUG_DIRS = debug endif SUBDIRS = \ - bytestream caps cleanup clock \ + bytestream caps cleanup \ $(GST_DEBUG_DIRS) \ dlopen dynparams \ elements ghostpads indexers negotiation pad \ @@ -22,7 +22,7 @@ SUBDIRS = \ plugin refcounting schedulers states threads trigger DIST_SUBDIRS = \ - bytestream caps cleanup clock \ + bytestream caps cleanup \ debug \ dlopen dynparams \ elements ghostpads indexers negotiation pad \ diff --git a/tests/old/testsuite/clock/.gitignore b/tests/old/testsuite/clock/.gitignore deleted file mode 100644 index 523c884..0000000 --- a/tests/old/testsuite/clock/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -clock1 -clock2 -signedness diff --git a/tests/old/testsuite/clock/Makefile.am b/tests/old/testsuite/clock/Makefile.am deleted file mode 100644 index d7ed02b..0000000 --- a/tests/old/testsuite/clock/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -include ../Rules - -tests_pass = signedness clock1 clock2 -tests_fail = -tests_ignore = diff --git a/tests/old/testsuite/clock/clock1.c b/tests/old/testsuite/clock/clock1.c deleted file mode 100644 index 2e26085..0000000 --- a/tests/old/testsuite/clock/clock1.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * testsuite program to test clock behaviour - * - * creates a fakesrc ! identity ! fakesink pipeline - * registers a callback on fakesrc and one on fakesink - * also register a normal GLib timeout which should not be reached - */ - -#include -void -gst_clock_debug (GstClock * clock) -{ - g_print ("Clock info: time %" G_GUINT64_FORMAT "\n", - gst_clock_get_time (clock)); -} - -int -main (int argc, char *argv[]) -{ - GstElement *src, *id, *sink, *pipeline; - GstClock *clock = NULL; - - gst_init (&argc, &argv); - - if ((src = gst_element_factory_make ("fakesrc", "source")) == NULL) { - g_print ("Could not create a fakesrc element !\n"); - return 1; - } - if ((id = gst_element_factory_make ("identity", "filter")) == NULL) { - g_print ("Could not create a identity element !\n"); - return 1; - } - if ((sink = gst_element_factory_make ("fakesink", "sink")) == NULL) { - g_print ("Could not create a fakesink element !\n"); - return 1; - } - - if ((pipeline = gst_pipeline_new ("pipeline")) == NULL) { - g_print ("Could not create a pipeline element !\n"); - return 1; - } - - gst_bin_add_many (GST_BIN (pipeline), src, id, sink, NULL); - gst_element_link_many (src, id, sink, NULL); - - clock = gst_pipeline_get_clock (GST_PIPELINE (pipeline)); - g_assert (clock != NULL); - gst_clock_debug (clock); - gst_clock_debug (clock); - - gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING); - gst_clock_debug (clock); - gst_clock_debug (clock); - gst_clock_debug (clock); - - /* success */ - return 0; -} diff --git a/tests/old/testsuite/clock/clock2.c b/tests/old/testsuite/clock/clock2.c deleted file mode 100644 index 8271291..0000000 --- a/tests/old/testsuite/clock/clock2.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * testsuite program to test clock behaviour - * - * creates a fakesrc ! identity ! fakesink pipeline - * registers a callback on fakesrc and one on fakesink - * also register a normal GLib timeout which should not be reached - */ - -#include - -void -gst_clock_debug (GstClock * clock, GstElement * fakesink) -{ - GstClockTime time; - - time = gst_clock_get_time (clock); - - g_print ("Clock info: time %" G_GUINT64_FORMAT " Element %" GST_TIME_FORMAT - "\n", time, GST_TIME_ARGS (time - fakesink->base_time)); -} - -static void -element_wait (GstElement * element, GstClockTime time) -{ - GstClockID id; - - id = gst_clock_new_single_shot_id (clock, time + element->base_time); - gst_clock_id_wait (id, NULL); - gst_clock_id_unref (id); -} - -int -main (int argc, char *argv[]) -{ - GstClock *clock = NULL; - GstElement *pipeline, *fakesrc, *fakesink; - - gst_init (&argc, &argv); - - clock = gst_system_clock_obtain (); - g_assert (clock != NULL); - - /* we check the time on an element */ - fakesrc = gst_element_factory_make ("fakesrc", NULL); - g_assert (fakesrc); - fakesink = gst_element_factory_make ("fakesink", NULL); - g_assert (fakesink); - pipeline = gst_element_factory_make ("pipeline", NULL); - g_assert (pipeline); - gst_bin_add_many (GST_BIN (pipeline), fakesink, fakesrc, NULL); - gst_element_link (fakesrc, fakesink); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - - gst_clock_debug (clock, fakesink); - g_usleep (G_USEC_PER_SEC); - gst_clock_debug (clock, fakesink); - - element_wait (fakesink, 2 * GST_SECOND); - gst_clock_debug (clock, fakesink); - - element_wait (fakesink, 5 * GST_SECOND); - gst_clock_debug (clock, fakesink); - - g_usleep (G_USEC_PER_SEC); - gst_clock_debug (clock, fakesink); - - /* success */ - return 0; -} diff --git a/tests/old/testsuite/clock/signedness.c b/tests/old/testsuite/clock/signedness.c deleted file mode 100644 index 14c19d0..0000000 --- a/tests/old/testsuite/clock/signedness.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * testsuite program to make sure GST_SECOND doesn't cause signedness - * conversions - */ - -#include - -int -main (int argc, char *argv[]) -{ - GstClockTime time[] = { 0, 1, G_MAXUINT64 / GST_SECOND }; - GstClockTimeDiff diff[] = - { 0, 1, -1, G_MAXINT64 / GST_SECOND, G_MININT64 / GST_SECOND }; - guint i; - - gst_init (&argc, &argv); - - for (i = 0; i < G_N_ELEMENTS (time); i++) { - g_print ("%" G_GUINT64_FORMAT " != %" G_GUINT64_FORMAT - " * GST_SECOND / GST_SECOND ? ... ", time[i], time[i]); - if (time[i] != (time[i] * GST_SECOND / GST_SECOND)) { - g_print ("NO\n"); - g_assert_not_reached (); - return 1; - } - g_print ("yes\n"); - } - for (i = 0; i < G_N_ELEMENTS (diff); i++) { - g_print ("%" G_GINT64_FORMAT " != %" G_GINT64_FORMAT - " * GST_SECOND / GST_SECOND ? ... ", diff[i], diff[i]); - if (diff[i] != (diff[i] * GST_SECOND / GST_SECOND)) { - g_print ("NO\n"); - g_assert_not_reached (); - return 1; - } - g_print ("yes\n"); - } - - return 0; -} diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index f2e717e..a20019f 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -14,7 +14,7 @@ GST_DEBUG_DIRS = debug endif SUBDIRS = \ - bytestream caps cleanup clock \ + bytestream caps cleanup \ $(GST_DEBUG_DIRS) \ dlopen dynparams \ elements ghostpads indexers negotiation pad \ @@ -22,7 +22,7 @@ SUBDIRS = \ plugin refcounting schedulers states threads trigger DIST_SUBDIRS = \ - bytestream caps cleanup clock \ + bytestream caps cleanup \ debug \ dlopen dynparams \ elements ghostpads indexers negotiation pad \ diff --git a/testsuite/clock/.gitignore b/testsuite/clock/.gitignore deleted file mode 100644 index 523c884..0000000 --- a/testsuite/clock/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -clock1 -clock2 -signedness diff --git a/testsuite/clock/Makefile.am b/testsuite/clock/Makefile.am deleted file mode 100644 index d7ed02b..0000000 --- a/testsuite/clock/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -include ../Rules - -tests_pass = signedness clock1 clock2 -tests_fail = -tests_ignore = diff --git a/testsuite/clock/clock1.c b/testsuite/clock/clock1.c deleted file mode 100644 index 2e26085..0000000 --- a/testsuite/clock/clock1.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * testsuite program to test clock behaviour - * - * creates a fakesrc ! identity ! fakesink pipeline - * registers a callback on fakesrc and one on fakesink - * also register a normal GLib timeout which should not be reached - */ - -#include -void -gst_clock_debug (GstClock * clock) -{ - g_print ("Clock info: time %" G_GUINT64_FORMAT "\n", - gst_clock_get_time (clock)); -} - -int -main (int argc, char *argv[]) -{ - GstElement *src, *id, *sink, *pipeline; - GstClock *clock = NULL; - - gst_init (&argc, &argv); - - if ((src = gst_element_factory_make ("fakesrc", "source")) == NULL) { - g_print ("Could not create a fakesrc element !\n"); - return 1; - } - if ((id = gst_element_factory_make ("identity", "filter")) == NULL) { - g_print ("Could not create a identity element !\n"); - return 1; - } - if ((sink = gst_element_factory_make ("fakesink", "sink")) == NULL) { - g_print ("Could not create a fakesink element !\n"); - return 1; - } - - if ((pipeline = gst_pipeline_new ("pipeline")) == NULL) { - g_print ("Could not create a pipeline element !\n"); - return 1; - } - - gst_bin_add_many (GST_BIN (pipeline), src, id, sink, NULL); - gst_element_link_many (src, id, sink, NULL); - - clock = gst_pipeline_get_clock (GST_PIPELINE (pipeline)); - g_assert (clock != NULL); - gst_clock_debug (clock); - gst_clock_debug (clock); - - gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING); - gst_clock_debug (clock); - gst_clock_debug (clock); - gst_clock_debug (clock); - - /* success */ - return 0; -} diff --git a/testsuite/clock/clock2.c b/testsuite/clock/clock2.c deleted file mode 100644 index 8271291..0000000 --- a/testsuite/clock/clock2.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * testsuite program to test clock behaviour - * - * creates a fakesrc ! identity ! fakesink pipeline - * registers a callback on fakesrc and one on fakesink - * also register a normal GLib timeout which should not be reached - */ - -#include - -void -gst_clock_debug (GstClock * clock, GstElement * fakesink) -{ - GstClockTime time; - - time = gst_clock_get_time (clock); - - g_print ("Clock info: time %" G_GUINT64_FORMAT " Element %" GST_TIME_FORMAT - "\n", time, GST_TIME_ARGS (time - fakesink->base_time)); -} - -static void -element_wait (GstElement * element, GstClockTime time) -{ - GstClockID id; - - id = gst_clock_new_single_shot_id (clock, time + element->base_time); - gst_clock_id_wait (id, NULL); - gst_clock_id_unref (id); -} - -int -main (int argc, char *argv[]) -{ - GstClock *clock = NULL; - GstElement *pipeline, *fakesrc, *fakesink; - - gst_init (&argc, &argv); - - clock = gst_system_clock_obtain (); - g_assert (clock != NULL); - - /* we check the time on an element */ - fakesrc = gst_element_factory_make ("fakesrc", NULL); - g_assert (fakesrc); - fakesink = gst_element_factory_make ("fakesink", NULL); - g_assert (fakesink); - pipeline = gst_element_factory_make ("pipeline", NULL); - g_assert (pipeline); - gst_bin_add_many (GST_BIN (pipeline), fakesink, fakesrc, NULL); - gst_element_link (fakesrc, fakesink); - gst_element_set_state (pipeline, GST_STATE_PLAYING); - - gst_clock_debug (clock, fakesink); - g_usleep (G_USEC_PER_SEC); - gst_clock_debug (clock, fakesink); - - element_wait (fakesink, 2 * GST_SECOND); - gst_clock_debug (clock, fakesink); - - element_wait (fakesink, 5 * GST_SECOND); - gst_clock_debug (clock, fakesink); - - g_usleep (G_USEC_PER_SEC); - gst_clock_debug (clock, fakesink); - - /* success */ - return 0; -} diff --git a/testsuite/clock/signedness.c b/testsuite/clock/signedness.c deleted file mode 100644 index 14c19d0..0000000 --- a/testsuite/clock/signedness.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * testsuite program to make sure GST_SECOND doesn't cause signedness - * conversions - */ - -#include - -int -main (int argc, char *argv[]) -{ - GstClockTime time[] = { 0, 1, G_MAXUINT64 / GST_SECOND }; - GstClockTimeDiff diff[] = - { 0, 1, -1, G_MAXINT64 / GST_SECOND, G_MININT64 / GST_SECOND }; - guint i; - - gst_init (&argc, &argv); - - for (i = 0; i < G_N_ELEMENTS (time); i++) { - g_print ("%" G_GUINT64_FORMAT " != %" G_GUINT64_FORMAT - " * GST_SECOND / GST_SECOND ? ... ", time[i], time[i]); - if (time[i] != (time[i] * GST_SECOND / GST_SECOND)) { - g_print ("NO\n"); - g_assert_not_reached (); - return 1; - } - g_print ("yes\n"); - } - for (i = 0; i < G_N_ELEMENTS (diff); i++) { - g_print ("%" G_GINT64_FORMAT " != %" G_GINT64_FORMAT - " * GST_SECOND / GST_SECOND ? ... ", diff[i], diff[i]); - if (diff[i] != (diff[i] * GST_SECOND / GST_SECOND)) { - g_print ("NO\n"); - g_assert_not_reached (); - return 1; - } - g_print ("yes\n"); - } - - return 0; -} -- 2.7.4