check: Call gst_task_cleanup_all() in GST_END_TEST

This fixes many unit tests under valgrind that shows
leaking GstTasks that are not really leaked but just
not unreffed by the task thread before the unit test
stopped.

Fixes bug #591045.
This commit is contained in:
Sebastian Dröge 2009-08-08 22:27:06 +02:00
parent 8eb9d55627
commit d465851cb7

View file

@ -121,7 +121,8 @@ static void __testname (int __i__)\
GST_DEBUG ("test start"); \ GST_DEBUG ("test start"); \
tcase_fn_start (""# __testname, __FILE__, __LINE__); tcase_fn_start (""# __testname, __FILE__, __LINE__);
#define GST_END_TEST END_TEST #define GST_END_TEST gst_task_cleanup_all (); \
END_TEST
#else #else
#define GST_START_TEST(__testname) \ #define GST_START_TEST(__testname) \
static void __testname ()\ static void __testname ()\
@ -129,7 +130,8 @@ static void __testname ()\
GST_DEBUG ("test start"); \ GST_DEBUG ("test start"); \
tcase_fn_start (""# __testname, __FILE__, __LINE__); tcase_fn_start (""# __testname, __FILE__, __LINE__);
#define GST_END_TEST END_TEST #define GST_END_TEST gst_task_cleanup_all (); \
END_TEST
#endif #endif