meson: fix check for pthread_setname_np()
[platform/upstream/gstreamer.git] / tests / python / meson.build
1 gst_python = subproject('gst-python', required: false)
2 gir = find_program('g-ir-scanner', required : get_option('introspection'))
3 if not gst_python.found() or not gir.found()
4     message('Not running python devenv tests: gst_python: @0@ gir: @1@'.format(gst_python.found(), gir.found()))
5     subdir_done()
6 endif
7
8 root_rel = '../..'
9 python = import('python').find_installation()
10
11 if run_command(python, '-c', 'import gi', check: false).returncode() != 0
12     message('PyGObject not found, not running PyGObject tests')
13     subdir_done()
14 endif
15
16 test('python-overrides-devenv', setenv, args: ['--builddir=@0@'.format(meson.project_build_root()),
17               '--srcdir=@0@'.format(meson.project_source_root()),
18               meson.current_source_dir() / 'python-devenv-overrides.py'])
19
20 env = environment()
21 env.set('GI_TYPELIB_PATH', meson.current_build_dir() / root_rel)
22 if build_machine.system() == 'windows'
23     env.append('PATH', meson.current_build_dir() / root_rel)
24 elif build_machine.system() == 'linux'
25     env.append('LD_LIBRARY_PATH', meson.current_build_dir() / root_rel)
26 else
27     env.append('DYLD_LIBRARY_PATH', meson.current_build_dir() / root_rel)
28 endif
29
30 env.set('GST_OVERRIDE_SRC_PATH', meson.current_source_dir() / root_rel / 'subprojects/gst-python/gi/overrides')
31 env.set('GST_OVERRIDE_BUILD_PATH', meson.current_build_dir() / root_rel / 'subprojects/gst-python/gi/overrides')
32
33 test('python-full', python, args: [meson.current_source_dir() / 'python-full.py'], env: env)