validate:launcher: Send SIGINT signal instead of killing the subprocess

This way we get the result from GstValidate even on timeouts
This commit is contained in:
Thibault Saunier 2014-04-22 10:49:10 +02:00
parent 7f54c5dba8
commit 02abb60a67
2 changed files with 5 additions and 4 deletions

View file

@ -51,7 +51,7 @@ class PlaybinDescriptor(PipelineDescriptor):
def get_pipeline(self, options, protocol, scenario, uri):
pipe = self._pipeline
if options.mute:
fakesink = "fakesink sync=true"
fakesink = "'fakesink sync=true'"
pipe += " audio-sink=%s video-sink=%s" %(fakesink, fakesink)
pipe += " uri=%s" % uri

View file

@ -24,6 +24,7 @@ import sys
import re
import time
import utils
import signal
import urlparse
import subprocess
import reporters
@ -199,18 +200,18 @@ class Test(Loggable):
printc(message, Colors.OKBLUE)
try:
self.process = subprocess.Popen(self.command,
self.process = subprocess.Popen("exec " + self.command,
stderr=self.reporter.out,
stdout=self.reporter.out,
shell=True,
env=proc_env)
self.wait_process()
except KeyboardInterrupt:
self.process.kill()
self.process.send_signal(signal.SIGINT)
raise
try:
self.process.terminate()
self.process.send_signal(signal.SIGINT)
except OSError:
pass