1# name, condition when to skip the test and extra dependencies 2libav_tests = [ 3 [ 'elements/avaudenc' ], 4 [ 'elements/avdec_adpcm' ], 5 [ 'elements/avdemux_ape' ], 6 [ 'elements/avvidenc' ], 7 [ 'generic/libavcodec-locking' ], 8 [ 'generic/plugin-test' ] 9] 10 11test_defines = [ 12 '-UG_DISABLE_ASSERT', 13 '-UG_DISABLE_CAST_CHECKS', 14 '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_PLUGIN_LOADING_WHITELIST"', 15 '-DGST_TEST_FILES_PATH="' + meson.current_source_dir() + '/../files"', 16 '-DGST_USE_UNSTABLE_API', 17] 18 19pluginsdirs = [] 20if gst_dep.type_name() == 'pkgconfig' 21 pbase = dependency('gstreamer-plugins-base-' + api_version, required: true) 22 pluginsdirs = [gst_dep.get_variable('pluginsdir'), 23 pbase.get_variable('pluginsdir')] 24 gst_plugin_scanner_dir = gst_dep.get_variable('pluginscannerdir') 25else 26 gst_plugin_scanner_dir = subproject('gstreamer').get_variable('gst_scanner_dir') 27endif 28gst_plugin_scanner_path = join_paths(gst_plugin_scanner_dir, 'gst-plugin-scanner') 29 30# FIXME: check, also + PTHREAD_CFLAGS 31test_deps = [gst_dep, gstbase_dep, gstcheck_dep, gstaudio_dep, 32 gstvideo_dep, gstpbutils_dep] 33 34# FIXME: add valgrind suppression common/gst.supp gst-libav.supp 35foreach t : libav_tests 36 fname = '@0@.c'.format(t.get(0)) 37 test_name = t.get(0).underscorify() 38 extra_sources = t.get(3, [ ]) 39 extra_deps = t.get(2, [ ]) 40 skip_test = t.get(1, false) 41 if not skip_test 42 env = environment() 43 env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') 44 env.set('CK_DEFAULT_TIMEOUT', '20') 45 env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base', 46 'gst-libav@' + meson.project_build_root()) 47 env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs) 48 env.set('GSETTINGS_BACKEND', 'memory') 49 50 env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name))) 51 env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path) 52 exe = executable(test_name, fname, extra_sources, 53 include_directories : [configinc], 54 c_args : ['-DHAVE_CONFIG_H=1' ] + test_defines, 55 dependencies : [libm] + test_deps + extra_deps, 56 ) 57 test(test_name, exe, env: env, timeout: 3 * 60) 58 endif 59endforeach 60 61