mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:16:13 +00:00
validate:launcher: Extract method to set a validate configuration on tests
This commit is contained in:
parent
b9ea967275
commit
55dee0b8a6
1 changed files with 11 additions and 8 deletions
|
@ -414,14 +414,7 @@ class Test(Loggable):
|
||||||
self.timeout *= VALGRIND_TIMEOUT_FACTOR
|
self.timeout *= VALGRIND_TIMEOUT_FACTOR
|
||||||
|
|
||||||
# Enable 'valgrind.config'
|
# Enable 'valgrind.config'
|
||||||
vg_config = get_data_file('data', 'valgrind.config')
|
self.add_validate_config(get_data_file('data', 'valgrind.config'), subenv)
|
||||||
|
|
||||||
if self.proc_env.get('GST_VALIDATE_CONFIG'):
|
|
||||||
subenv['GST_VALIDATE_CONFIG'] = '%s%s%s' % (
|
|
||||||
self.proc_env['GST_VALIDATE_CONFIG'], os.pathsep, vg_config)
|
|
||||||
else:
|
|
||||||
subenv['GST_VALIDATE_CONFIG'] = vg_config
|
|
||||||
|
|
||||||
if subenv == self.proc_env:
|
if subenv == self.proc_env:
|
||||||
self.add_env_variable('G_DEBUG', 'gc-friendly')
|
self.add_env_variable('G_DEBUG', 'gc-friendly')
|
||||||
self.add_env_variable('G_SLICE', 'always-malloc')
|
self.add_env_variable('G_SLICE', 'always-malloc')
|
||||||
|
@ -430,6 +423,16 @@ class Test(Loggable):
|
||||||
|
|
||||||
return command
|
return command
|
||||||
|
|
||||||
|
def add_validate_config(self, config, subenv=None):
|
||||||
|
if not subenv:
|
||||||
|
subenv = self.extra_env_variables
|
||||||
|
|
||||||
|
if subenv.get('GST_VALIDATE_CONFIG'):
|
||||||
|
subenv['GST_VALIDATE_CONFIG'] = '%s%s%s' % (
|
||||||
|
self.proc_env['GST_VALIDATE_CONFIG'], os.pathsep, config)
|
||||||
|
else:
|
||||||
|
subenv['GST_VALIDATE_CONFIG'] = config
|
||||||
|
|
||||||
def launch_server(self):
|
def launch_server(self):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue