gstreamer/tests/check/meson.build
Thibault Saunier 046e609a89 smart-mixer: Use the new 'samples-selected' signal to handle queuing in aggregator pads
Since aggregator introduced queueing in its sinkpads the way we set
properties on the pads is incorrect as it doesn't take it into account.
This fixes the issue by using the newly introduced `samples-selected`
signal in aggregator to set the properties right before the compositing
is done.

Also require the compositor we use to be an aggregator.

And add a validate test for it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/204>
2020-08-13 18:34:48 -04:00

123 lines
4.1 KiB
Meson

# tests and condition when to skip the test
ges_tests = [
['ges/asset'],
['ges/backgroundsource'],
['ges/basic'],
['ges/layer'],
['ges/effects'],
['ges/uriclip'],
['ges/clip'],
['ges/timelineedition'],
['ges/titles'],
['ges/transition'],
['ges/overlays'],
['ges/mixers'],
['ges/group'],
['ges/project'],
['ges/track'],
['ges/tempochange'],
['ges/negative'],
['ges/markerlist'],
['nle/simple'],
['nle/complex'],
['nle/nleoperation'],
['nle/nlecomposition'],
['nle/tempochange']
]
test_defines = [
'-UG_DISABLE_ASSERT',
'-UG_DISABLE_CAST_CHECKS',
'-DGES_TEST_FILES_PATH="@0@"'.format(join_paths(meson.current_source_dir(), 'assets')),
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
'-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
'-DGST_USE_UNSTABLE_API',
]
pluginsdirs = []
if gst_dep.type_name() == 'pkgconfig'
pbase = dependency('gstreamer-plugins-base-' + apiversion, required : false)
pbad = dependency('gstreamer-plugins-bad-' + apiversion, required : false)
pluginsdirs = [gst_dep.get_pkgconfig_variable('pluginsdir'),
pbase.get_pkgconfig_variable('pluginsdir'),
pbad.get_pkgconfig_variable('pluginsdir')]
endif
foreach t : ges_tests
fname = '@0@.c'.format(t.get(0))
test_name = t.get(0).underscorify()
if t.length() == 2
skip_test = t.get(1)
else
skip_test = false
endif
if not skip_test
env = environment()
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
env.set('GST_STATE_IGNORE_ELEMENTS', '')
env.set('CK_DEFAULT_TIMEOUT', '20')
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
exe = executable(test_name, fname,
'ges/test-utils.c', 'nle/common.c',
c_args : ges_c_args + test_defines,
include_directories : [configinc],
dependencies : libges_deps + [gstcheck_dep, ges_dep],
)
test(test_name, exe, env: env, timeout : 3 * 60)
endif
endforeach
if gstvalidate_dep.found()
# filename: is .validatetest
scenarios = {
'check_video_track_restriction_scale': false,
'check_video_track_restriction_scale_with_keyframes': false,
'check_edit_in_frames': false,
'check_edit_in_frames_with_framerate_mismatch': false,
'check_layer_activness_gaps': false,
'seek_with_stop': true,
'seek_with_stop.check_clock_sync': true,
'edit_while_seeked_with_stop': true,
'complex_effect_bin_desc': true,
'check_keyframes_in_compositor_two_sources': true,
}
foreach scenario, is_validatetest: scenarios
env = environment()
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
env.set('GST_STATE_IGNORE_ELEMENTS', '')
env.set('CK_DEFAULT_TIMEOUT', '20')
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), 'scenarios'))
env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
env.set('GST_VALIDATE_LOGSDIR', meson.current_build_dir() / scenario)
if is_validatetest
testfile = meson.current_source_dir() / 'scenarios' / scenario + '.validatetest'
test(scenario, ges_launch, env: env, args: ['--set-test-file', testfile, '--mute'])
else
scenario_file = meson.current_source_dir() / 'scenarios' / scenario + '.scenario'
test(scenario, ges_launch, env: env, args: ['--set-scenario', scenario_file])
endif
endforeach
test('simple_playback_test', ges_launch, env: env, args: ['+test-clip', 'blue', 'd=0.1', '--disable-validate', '--videosink=fakevideosink', '--audiosink=fakesink'])
endif
if build_gir
# Make sure to use the subproject gst-validate-launcher if available.
if gstvalidate_dep.found() and gstvalidate_dep.type_name() == 'internal'
runtests = subproject('gst-devtools').get_variable('launcher')
else
runtests = find_program('gst-validate-launcher', required : false)
endif
if runtests.found()
test('pythontests', runtests, args: ['--pyunittest-dir', meson.current_source_dir(), 'pyunittest', '--dump-on-failure'],
env: env)
endif
endif