1 runtests = find_program('runtests.py')
4 ['Test gst', 'test_gst.py'],
5 ['Test fundamentals', 'test_types.py'],
9 if not meson.is_subproject()
10 pkgconfig = find_program('pkg-config')
11 runcmd = run_command(pkgconfig, '--variable=pluginsdir',
12 'gstreamer-' + api_version)
13 if runcmd.returncode() == 0
14 pluginsdirs = runcmd.stdout().split()
16 error('Could not determine GStreamer core plugins directory for unit tests.')
20 runcmd = run_command(python3, '-c', '''with open("@0@/mesonconfig.py", "w") as f:
21 f.write("path='@1@'")'''.format(
22 meson.current_source_dir(), join_paths(meson.current_build_dir(), '../')))
24 if runcmd.returncode() != 0
25 error('Could not configure testsuite config file.' + runcmd.stderr())
31 env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
32 env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
33 foreach plugindir: pluginsdirs
34 env.append('GST_PLUGIN_PATH_1_0', plugindir)
36 env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), i.get(1)))
37 test(test_name, runtests, args: [i.get(1)], env: env)