mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
tests: camerabin2: Only run a test if -good 0.10.27 is present
A camerabin2 tests depends on the commit
dcbba0932d
for jpegenc on -good
that was released on 0.10.27.
This patch makes it check for this version before running the
test.
This commit is contained in:
parent
5dbee0c39c
commit
7944a27ee3
1 changed files with 13 additions and 1 deletions
|
@ -647,10 +647,17 @@ TestCaseDef tests[] = {
|
|||
static Suite *
|
||||
camerabin_suite (void)
|
||||
{
|
||||
GstElementFactory *jpegenc_factory;
|
||||
Suite *s = suite_create ("camerabin2");
|
||||
gint i;
|
||||
TCase *tc_generic = tcase_create ("generic");
|
||||
|
||||
jpegenc_factory = gst_element_factory_find ("jpegenc");
|
||||
if (jpegenc_factory == NULL) {
|
||||
GST_WARNING ("Skipping camerabin2 tests because jpegenc is missing");
|
||||
goto end;
|
||||
}
|
||||
|
||||
suite_add_tcase (s, tc_generic);
|
||||
tcase_add_checked_fixture (tc_generic, setup_wrappercamerabinsrc_videotestsrc,
|
||||
teardown);
|
||||
|
@ -667,10 +674,15 @@ camerabin_suite (void)
|
|||
tcase_add_test (tc_basic, test_single_image_capture);
|
||||
tcase_add_test (tc_basic, test_single_video_recording);
|
||||
tcase_add_test (tc_basic, test_image_video_cycle);
|
||||
if (gst_plugin_feature_check_version (jpegenc_factory, 0, 10, 27))
|
||||
tcase_add_test (tc_basic, test_multiple_image_captures);
|
||||
else
|
||||
GST_WARNING ("Skipping image capture test because -good 0.10.27 is "
|
||||
"needed");
|
||||
tcase_add_test (tc_basic, test_multiple_video_recordings);
|
||||
}
|
||||
|
||||
end:
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue