-> use meson.project_build_root() or .global_build_root() instead.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1183>
message('Building subprojects: ' + ', '.join(subprojects_names))
setenv = find_program('gst-env.py')
-devenv_cmd = [setenv, '--builddir=@0@'.format(meson.build_root()),
+devenv_cmd = [setenv, '--builddir=@0@'.format(meson.project_build_root()),
'--gstbuilddir=@0@'.format(meson.current_build_dir()),
- '--srcdir=@0@'.format(meson.source_root())]
+ '--srcdir=@0@'.format(meson.project_source_root())]
subdir('tests')
if meson.has_exe_wrapper() and build_machine.system() == 'linux' and host_machine.system() == 'windows'
launcher_configure = configuration_data()
launcher_configure.set('GST_VALIDATE_TESTSUITE_VERSION', '@0@'.format(TESTSUITE_VERSION))
-launcher_configure.set('BUILDDIR', meson.build_root())
-launcher_configure.set('SRCDIR', meson.source_root())
+launcher_configure.set('BUILDDIR', meson.global_build_root())
+launcher_configure.set('SRCDIR', meson.global_source_root())
launcher_configure.set('DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
launcher_configure.set('LIBDIR', join_paths(get_option('prefix'), get_option('libdir')))
env = environment()
env.set('GST_STATE_IGNORE_ELEMENTS', '')
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
- env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
+ env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
env = environment()
env.set('GST_STATE_IGNORE_ELEMENTS', '')
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
- env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
+ env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
- test(test_name, launcher, args: ['-o', meson.build_root() + '/validate-launcher-output/',
+ test(test_name, launcher, args: ['-o', meson.project_build_root() + '/validate-launcher-output/',
meson.current_source_dir() + '/test_validate.py', '--validate-tools-path',
join_paths(meson.current_build_dir(), '..', '..', 'tools')],
env: env)
# gst-build will generate this file for us to consume so that subproject
# changes can still work
- fname = join_paths(meson.build_root(), 'GstDocumentedSubprojects')
+ fname = join_paths(meson.project_build_root(), '..', '..', 'GstDocumentedSubprojects')
cmdres = run_command(
python3,
'-c', read_file_contents,
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)
+ env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
exe = executable(test_name, fname,
'ges/test-utils.c', 'nle/common.c',
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_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
env.set('GST_VALIDATE_LOGSDIR', meson.current_build_dir() / scenario)
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
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_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
env.set('GI_TYPELIB_PATH', meson.current_build_dir() / '..' / '..' / 'ges')
test('pythontests', runtests, args: ['--pyunittest-dir', meson.current_source_dir(), 'pyunittest', '--dump-on-failure'],
depends: test_deps,
args : files(elem.get(1)),
# XXX: This PYTHONPATH hack is fun
- env : ['PYTHONPATH=' + join_paths(meson.source_root(), 'sendrecv', 'gst') + ':' + join_paths(meson.source_root(), 'signalling'),
- 'TEST_HTML_SOURCE=' + join_paths(meson.source_root(), 'sendrecv', 'js'),
- 'TEST_CA_CERT_PATH=' + join_paths(meson.build_root(), 'signalling')])
+ env : ['PYTHONPATH=' + join_paths(meson.project_source_root(), 'sendrecv', 'gst') + ':' + join_paths(meson.project_source_root(), 'signalling'),
+ 'TEST_HTML_SOURCE=' + join_paths(meson.project_source_root(), 'sendrecv', 'js'),
+ 'TEST_CA_CERT_PATH=' + join_paths(meson.project_build_root(), 'signalling')])
endforeach
endif
'--nuget-version', version,
'--csharp-version=net45',
'--current-builddir', meson.current_build_dir(),
- '--builddir', meson.build_root(),
+ '--builddir', meson.global_build_root(), # FIXME: --builddir specified twice?!
)
if get_dep.returncode() != 0
message('Execute with MONO_PATH=@0@:$MONO_PATH @1@/WebRTCSendRecv.exe'.format(mono_path, meson.current_build_dir()))
executable('WebRTCSendRecv', 'WebRTCSendRecv.cs',
- cs_args: ['-unsafe'], dependencies: dependencies)
\ No newline at end of file
+ cs_args: ['-unsafe'], dependencies: dependencies)
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
env.set('CK_DEFAULT_TIMEOUT', '20')
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base',
- 'gst-libav@' + meson.build_root())
- env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
+ 'gst-libav@' + meson.project_build_root())
+ env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
env.set('GSETTINGS_BACKEND', 'memory')
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
env.set('GST_STATE_IGNORE_ELEMENTS', state_ignore_elements)
env.set('CK_DEFAULT_TIMEOUT', '20')
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base',
- 'gst-plugins-good', 'gst-omx@' + meson.build_root(), separator: ':')
- env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
+ 'gst-plugins-good', 'gst-omx@' + meson.project_build_root(), separator: ':')
+ env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
env.set('GSETTINGS_BACKEND', 'memory')
env.set('GST_OMX_CONFIG_DIR', omx_config_dir)
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
env.set('CK_DEFAULT_TIMEOUT', '20')
env.set('GST_STATE_IGNORE_ELEMENTS', '')
- env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
+ env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base',
'gst-plugins-good', 'gst-plugins-ugly','gst-libav', 'libnice',
- 'gst-plugins-bad@' + meson.build_root())
+ 'gst-plugins-bad@' + meson.project_build_root())
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
test(test_name, exe, env: env, timeout: 3 * 60)
endif
]
env = environment()
-env.set('GST_PLUGIN_PATH_1_0', meson.build_root(), pluginsdirs)
+env.set('GST_PLUGIN_PATH_1_0', meson.global_build_root(), pluginsdirs)
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_plugin_scanner_path)
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-validate', 'gst-plugins-base',
- 'gst-plugins-bad@' + meson.build_root())
+ 'gst-plugins-bad@' + meson.project_build_root())
foreach t: tests
test_dir_name = t.split('/')
)
env = environment()
- env.set('GST_PLUGIN_PATH_1_0', meson.build_root(), pluginsdirs)
+ env.set('GST_PLUGIN_PATH_1_0', meson.global_build_root(), pluginsdirs)
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
env.set('GST_STATE_IGNORE_ELEMENTS', 'cdio cdparanoiasrc libvisual_ alsasrc alsasink')
env.set('CK_DEFAULT_TIMEOUT', '20')
env.set('GST_TAG_LICENSE_TRANSLATIONS_DICT', join_paths(gst_tag_dir, 'license-translations.dict'))
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer',
- 'gst-plugins-base@' + meson.build_root())
+ 'gst-plugins-base@' + meson.project_build_root())
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
test(test_name, exe, env: env, timeout: 3 * 60)
# TODO Use env.copy when it is in meson
env = environment()
- env.set('GST_PLUGIN_PATH_1_0', meson.build_root(), pluginsdirs)
+ env.set('GST_PLUGIN_PATH_1_0', meson.global_build_root(), pluginsdirs)
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
env.set('GST_STATE_IGNORE_ELEMENTS', 'cdio cdparanoiasrc libvisual_ alsasrc alsasink')
env.set('CK_DEFAULT_TIMEOUT', '20')
env.set('GST_TAG_LICENSE_TRANSLATIONS_DICT', join_paths(gst_tag_dir, 'license-translations.dict'))
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer',
- 'gst-plugins-base@' + meson.build_root())
+ 'gst-plugins-base@' + meson.project_build_root())
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(vscale_test_name)))
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
]
env = environment()
-env.set('GST_PLUGIN_PATH_1_0', meson.build_root(), pluginsdirs)
+env.set('GST_PLUGIN_PATH_1_0', meson.global_build_root(), pluginsdirs)
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_plugin_scanner_path)
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-validate',
- 'gst-plugins-base@' + meson.build_root())
+ 'gst-plugins-base@' + meson.project_build_root())
foreach t: tests
test_dir_name = t.split('/')
env.set('GST_STATE_IGNORE_ELEMENTS', state_ignore_elements)
env.set('CK_DEFAULT_TIMEOUT', '20')
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base',
- 'timecode', 'gst-plugins-good@' + meson.build_root())
- env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
+ 'timecode', 'gst-plugins-good@' + meson.project_build_root())
+ env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
env.set('GSETTINGS_BACKEND', 'memory')
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
env.set('CK_DEFAULT_TIMEOUT', '20')
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base',
- 'gst-plugins-good', 'gst-plugins-ugly@' + meson.build_root())
- env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
+ 'gst-plugins-good', 'gst-plugins-ugly@' + meson.project_build_root())
+ env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
test(test_name, exe, env: env, timeout: 3 * 60)
pbase.get_variable('pluginsdir')]
endif
-pypluginsdir = [join_paths (meson.build_root(), 'plugin'), meson.current_source_dir()]
+pypluginsdir = [join_paths (meson.project_build_root(), 'plugin'), meson.current_source_dir()]
foreach i: tests
test_name = i.get(0)
env = environment()
env.set('GST_OVERRIDE_SRC_PATH', join_paths (meson.current_source_dir(), '..', 'gi', 'overrides'))
env.set('GST_OVERRIDE_BUILD_PATH', join_paths (meson.current_build_dir(), '..', 'gi', 'overrides'))
- env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer',
- 'gst-plugins-base@' + meson.build_root(), 'gst-python@' + meson.build_root())
- env.set('GST_PLUGIN_PATH_1_0', meson.build_root(), pluginsdirs + pypluginsdir)
+ env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base',
+ 'gst-python@' + meson.project_build_root())
+ env.set('GST_PLUGIN_PATH_1_0', meson.global_build_root(), pluginsdirs + pypluginsdir)
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
test(test_name, python, args: [runtests, i.get(1)], env: env)
endforeach
env = environment()
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
env.set('GST_STATE_IGNORE_ELEMENTS', '')
- env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer:gst-plugins-base:gst-plugins-good:gst-plugins-bad:gst-rtsp-server@' + meson.build_root())
+ env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer:gst-plugins-base:gst-plugins-good:gst-plugins-bad:gst-rtsp-server@' + meson.project_build_root())
env.set('CK_DEFAULT_TIMEOUT', '120')
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
- env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
+ env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
exe = executable(test_name, fname,
'--nuget-version', nunit_version,
'--csharp-version=net45',
'--current-builddir', meson.current_build_dir(),
- '--builddir', meson.build_root(),
+ '--builddir', meson.build_root(), # FIXME: --builddir specified twice?!
)
endif
else
message('Could not find nunit-console, can\'t run unitests')
-endif
\ No newline at end of file
+endif
env = environment()
env.set('CK_DEFAULT_TIMEOUT', '20')
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
- env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
+ env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
exe = executable(test_name, fname, extra_sources,
include_directories : [configinc, libsinc],
)
env = environment()
- env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
+ env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root())
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
env.set('GST_STATE_IGNORE_ELEMENTS', '')
env.set('CK_DEFAULT_TIMEOUT', '20')
gst_tester = executable('gst-tester-' + apiversion,
'gst-tester.c',
- c_args : gst_c_args + ['-DBUILDDIR=' + meson.build_root()],
+ c_args : gst_c_args,
include_directories : [configinc],
install: true,
dependencies : [gio_dep],
]
env = environment()
-env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
+env.set('GST_PLUGIN_PATH_1_0', meson.global_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')
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
\ No newline at end of file
+endforeach
subdir_done()
endif
-test('python-overrides-devenv', setenv, args: ['--builddir=@0@'.format(meson.build_root()),
+test('python-overrides-devenv', setenv, args: ['--builddir=@0@'.format(meson.project_build_root()),
'--gstbuilddir=@0@'.format(meson.current_build_dir() / '..' / '..'),
- '--srcdir=@0@'.format(meson.source_root()),
+ '--srcdir=@0@'.format(meson.project_source_root()),
meson.current_source_dir() / 'python-devenv-overrides.py'])
env = environment()