mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
validate:launcher: Avoid printing twice env variables
When printing test command.
This commit is contained in:
parent
ab7e9930d1
commit
3e978a46b4
1 changed files with 14 additions and 4 deletions
|
@ -84,7 +84,7 @@ class Test(Loggable):
|
||||||
self.logfile = None
|
self.logfile = None
|
||||||
self.out = None
|
self.out = None
|
||||||
self.extra_logfiles = []
|
self.extra_logfiles = []
|
||||||
self._env_variable = ''
|
self.__env_variable = []
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
string = self.classname
|
string = self.classname
|
||||||
|
@ -114,9 +114,19 @@ class Test(Loggable):
|
||||||
if value is None:
|
if value is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
if self._env_variable:
|
self.__env_variable.append(variable)
|
||||||
self._env_variable += " "
|
|
||||||
self._env_variable += "%s=%s" % (variable, value)
|
@property
|
||||||
|
def _env_variable(self):
|
||||||
|
res = ""
|
||||||
|
for var in set(self.__env_variable):
|
||||||
|
if res:
|
||||||
|
res += " "
|
||||||
|
value = self.proc_env.get(var, None)
|
||||||
|
if value:
|
||||||
|
res += "%s=%s" % (var, value)
|
||||||
|
|
||||||
|
return res
|
||||||
|
|
||||||
def open_logfile(self):
|
def open_logfile(self):
|
||||||
path = os.path.join(self.options.logsdir,
|
path = os.path.join(self.options.logsdir,
|
||||||
|
|
Loading…
Reference in a new issue