mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-08 13:18:52 +00:00
34916e133d
gst-tester is a tool to launch `.validatetest` files with TAP[0] compatible output and supporting missing `gst-validate` application which means that it can be cleanly integrated with meson test harness. It allows us to use `gst-validate` to write integration tests in any GStreamer repository keeping them as close as possible to the code. It can simplify a lot test writing and reading and not having to go into another repository to implement or run tests makes it more convenient to use. This also implements a stupid simple test to show how that works [0] https://testanything.org/ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/461>
31 lines
No EOL
1 KiB
Meson
31 lines
No EOL
1 KiB
Meson
gst_tester = executable('gst-tester-' + apiversion,
|
|
'gst-tester.c',
|
|
c_args : gst_c_args + ['-DBUILDDIR=' + meson.build_root()],
|
|
include_directories : [configinc],
|
|
install: true,
|
|
dependencies : [gio_dep],
|
|
)
|
|
|
|
tests = [
|
|
'simplest',
|
|
]
|
|
|
|
env = environment()
|
|
env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
|
|
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
|
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), 'validate'))
|
|
env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
|
|
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
|
|
|
|
foreach t: tests
|
|
test_dir_name = t.split('/')
|
|
test_name = 'validate'
|
|
foreach c: test_dir_name
|
|
test_name += '.' + c
|
|
endforeach
|
|
test_env = env
|
|
test_env.set('GST_VALIDATE_LOGSDIR', join_paths(meson.current_build_dir(), test_name))
|
|
test_file = join_paths(meson.current_source_dir(), t + '.validatetest')
|
|
test(test_name, gst_tester, args: [test_file, '--use-fakesinks'],
|
|
env: test_env, timeout : 3 * 60, protocol: 'tap')
|
|
endforeach |