gst-validate-launcher: Print copypaste-friendlier commands

This patch removes the quotes surrounding the command shown by
gst-validate to reproduce the issues -- which were troublesome when
copying and pasting.

It also introduces escaping for the arguments, so that the command line
can be copied and pasted in the terminal without further changes.

https://bugzilla.gnome.org/show_bug.cgi?id=796897
This commit is contained in:
Alicia Boya García 2018-07-30 21:36:48 +02:00 committed by Thibault Saunier
parent fa3648d5fe
commit 5ff299f4e7

View file

@ -480,11 +480,12 @@ class Test(Loggable):
return message
def get_command_repr(self):
message = "%s %s" % (self._env_variable, ' '.join(self.command))
message = "%s %s" % (self._env_variable, ' '.join(
shlex.quote(arg) for arg in self.command))
if self.server_command:
message = "%s & %s" % (self.server_command, message)
return "'%s'" % message
return message
def test_start(self, queue):
self.open_logfile()