2016-08-04 21:33:55 +00:00
|
|
|
# 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'],
|
2019-01-29 04:45:49 +00:00
|
|
|
['ges/negative'],
|
2019-08-22 16:50:00 +00:00
|
|
|
['ges/markerlist'],
|
2016-08-04 21:33:55 +00:00
|
|
|
['nle/simple'],
|
|
|
|
['nle/complex'],
|
|
|
|
['nle/nleoperation'],
|
|
|
|
['nle/nlecomposition'],
|
|
|
|
['nle/tempochange']
|
|
|
|
]
|
|
|
|
|
2024-03-26 12:28:50 +00:00
|
|
|
# Make sure our headers are C++ clean
|
|
|
|
if add_languages('cpp', native: false, required: false)
|
|
|
|
ges_tests += [
|
|
|
|
[ 'gescpp.cc', false ],
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
2023-07-12 03:57:22 +00:00
|
|
|
fsmod = import('fs')
|
2016-08-04 21:33:55 +00:00
|
|
|
test_defines = [
|
|
|
|
'-UG_DISABLE_ASSERT',
|
|
|
|
'-UG_DISABLE_CAST_CHECKS',
|
2023-07-12 03:57:22 +00:00
|
|
|
'-DGES_TEST_FILES_PATH="@0@"'.format(fsmod.as_posix(join_paths(meson.current_source_dir(), 'assets'))),
|
2016-08-04 21:33:55 +00:00
|
|
|
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
|
2023-07-12 03:57:22 +00:00
|
|
|
'-DTESTFILE="' + fsmod.as_posix(meson.current_source_dir()) + '/meson.build"',
|
2016-08-04 21:33:55 +00:00
|
|
|
'-DGST_USE_UNSTABLE_API',
|
|
|
|
]
|
|
|
|
|
2016-10-03 20:44:04 +00:00
|
|
|
pluginsdirs = []
|
2017-03-28 17:25:06 +00:00
|
|
|
if gst_dep.type_name() == 'pkgconfig'
|
|
|
|
pbase = dependency('gstreamer-plugins-base-' + apiversion, required : false)
|
|
|
|
pbad = dependency('gstreamer-plugins-bad-' + apiversion, required : false)
|
2016-08-04 21:33:55 +00:00
|
|
|
|
2021-10-17 23:40:14 +00:00
|
|
|
pluginsdirs = [gst_dep.get_variable('pluginsdir'),
|
|
|
|
pbase.get_variable('pluginsdir'),
|
|
|
|
pbad.get_variable('pluginsdir')]
|
|
|
|
gst_plugin_scanner_dir = gst_dep.get_variable('pluginscannerdir')
|
2020-11-02 11:18:24 +00:00
|
|
|
else
|
|
|
|
gst_plugin_scanner_dir = subproject('gstreamer').get_variable('gst_scanner_dir')
|
2016-10-03 20:44:04 +00:00
|
|
|
endif
|
2020-11-02 11:18:24 +00:00
|
|
|
gst_plugin_scanner_path = join_paths(gst_plugin_scanner_dir, 'gst-plugin-scanner')
|
2016-08-04 21:33:55 +00:00
|
|
|
|
|
|
|
foreach t : ges_tests
|
2024-03-26 12:28:50 +00:00
|
|
|
if t.get(0).endswith('.cc')
|
|
|
|
fname = t.get(0)
|
|
|
|
else
|
|
|
|
fname = '@0@.c'.format(t.get(0))
|
|
|
|
endif
|
2017-06-07 16:08:00 +00:00
|
|
|
test_name = t.get(0).underscorify()
|
2016-08-04 21:33:55 +00:00
|
|
|
if t.length() == 2
|
|
|
|
skip_test = t.get(1)
|
|
|
|
else
|
|
|
|
skip_test = false
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not skip_test
|
2016-10-03 20:44:04 +00:00
|
|
|
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))
|
2021-10-18 14:47:00 +00:00
|
|
|
env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
|
2016-10-03 20:44:04 +00:00
|
|
|
|
2017-06-07 16:08:00 +00:00
|
|
|
exe = executable(test_name, fname,
|
2016-08-04 21:33:55 +00:00
|
|
|
'ges/test-utils.c', 'nle/common.c',
|
|
|
|
c_args : ges_c_args + test_defines,
|
|
|
|
include_directories : [configinc],
|
|
|
|
dependencies : libges_deps + [gstcheck_dep, ges_dep],
|
|
|
|
)
|
2019-01-14 01:16:18 +00:00
|
|
|
test(test_name, exe, env: env, timeout : 3 * 60)
|
2016-08-04 21:33:55 +00:00
|
|
|
endif
|
|
|
|
endforeach
|
2016-09-13 15:31:54 +00:00
|
|
|
|
2022-10-24 19:40:55 +00:00
|
|
|
if gstvalidate_dep.found() and not get_option('tools').disabled()
|
2020-04-21 20:22:31 +00:00
|
|
|
# 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,
|
2020-06-09 04:03:57 +00:00
|
|
|
'complex_effect_bin_desc': true,
|
2020-07-12 17:51:42 +00:00
|
|
|
'check_keyframes_in_compositor_two_sources': true,
|
2021-01-15 18:29:47 +00:00
|
|
|
'check-clip-positioning': true,
|
2021-05-19 01:31:38 +00:00
|
|
|
'set-layer-on-command-line': true,
|
2020-04-21 20:22:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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'))
|
2021-10-18 14:47:00 +00:00
|
|
|
env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
|
2020-04-21 20:22:31 +00:00
|
|
|
env.set('GST_VALIDATE_LOGSDIR', meson.current_build_dir() / scenario)
|
2020-11-02 11:18:24 +00:00
|
|
|
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
|
2020-04-21 20:22:31 +00:00
|
|
|
|
|
|
|
if is_validatetest
|
|
|
|
testfile = meson.current_source_dir() / 'scenarios' / scenario + '.validatetest'
|
2021-05-01 23:18:15 +00:00
|
|
|
test(scenario, ges_launch, env: env, args: ['--no-interactive', '--set-test-file', testfile, '--mute'])
|
2020-04-21 20:22:31 +00:00
|
|
|
else
|
|
|
|
scenario_file = meson.current_source_dir() / 'scenarios' / scenario + '.scenario'
|
2021-05-01 23:18:15 +00:00
|
|
|
test(scenario, ges_launch, env: env, args: ['--no-interactive', '--set-scenario', scenario_file])
|
2020-04-21 20:22:31 +00:00
|
|
|
endif
|
2020-02-20 15:28:59 +00:00
|
|
|
|
|
|
|
endforeach
|
2021-08-10 21:10:43 +00:00
|
|
|
test('simple_playback_test', ges_launch, env: env, args: ['+test-clip', 'blue', 'd=0.1', '--videosink=fakevideosink', '--audiosink=fakeaudiosink'])
|
2020-02-20 15:28:59 +00:00
|
|
|
endif
|
|
|
|
|
2016-09-13 15:31:54 +00:00
|
|
|
if build_gir
|
2020-06-09 04:03:57 +00:00
|
|
|
# Make sure to use the subproject gst-validate-launcher if available.
|
2018-06-15 20:49:55 +00:00
|
|
|
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
|
2016-09-13 15:31:54 +00:00
|
|
|
|
|
|
|
if runtests.found()
|
2020-08-21 01:09:31 +00:00
|
|
|
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'))
|
2021-10-18 14:47:00 +00:00
|
|
|
env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
|
2020-08-21 01:09:31 +00:00
|
|
|
env.set('GI_TYPELIB_PATH', meson.current_build_dir() / '..' / '..' / 'ges')
|
|
|
|
|
2018-06-15 20:49:55 +00:00
|
|
|
test('pythontests', runtests, args: ['--pyunittest-dir', meson.current_source_dir(), 'pyunittest', '--dump-on-failure'],
|
|
|
|
env: env)
|
2016-09-13 15:31:54 +00:00
|
|
|
endif
|
|
|
|
endif
|