if parsing:
parser = Parser()
- p = subprocess.Popen(" ".join(externalToolCmd + cmd + _defLaunchArgs),
+ command = " ".join(externalToolCmd + cmd + _defLaunchArgs)
+ log.info("Invoking `" + command + "`")
+ p = subprocess.Popen(command,
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
domResult = minidom.parseString(testResult)
log.XMLSummary(domResult)
log.failedTestSummary(cmd[0])
+ if p.returncode < 0:
+ log.terminatedBySignal(" ".join(cmd), -p.returncode)
else:
# Launching process without coloring does not require report in XML form
# Avoid providing --report_format=XML, redirect std* by default to system's std*
- p = subprocess.Popen(" ".join(externalToolCmd + cmd + _defLaunchArgs[1:]),
+ command = " ".join(externalToolCmd + cmd + _defLaunchArgs[1:])
+ log.info("Invoking `" + command + "`")
+ p = subprocess.Popen(command,
shell=True)
p.wait()
for test in self.__failedTests:
self.error(self.__indentChar + commandPrefix + test)
+ def terminatedBySignal(self, bin, signum):
+ self.error("\n=========== FAILED ===========\n")
+ signame = {2:"SIGINT", 9:"SIGKILL", 11:"SIGSEGV", 15:"SIGTERM"}
+ siginfo = signame.get(signum, 'signal ' + str(signum))
+ self.error('Terminated by ' + siginfo)
+ if signum == 11: # SIGSEGV
+ self.error("\nUse following command to launch debugger:")
+ self.error(self.__indentChar + "sc_launch_test.py --gdb " + bin)
class Parser(object):