sanitycheck: log errors when executing binaries

Add some verbosity into the log file to help with debugging.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2019-12-21 16:15:46 -05:00
commit 32e924459d

View file

@ -564,6 +564,7 @@ class BinaryHandler(Handler):
env.get("ASAN_OPTIONS", "")
if not self.lsan:
env["ASAN_OPTIONS"] += "detect_leaks=0"
with subprocess.Popen(command, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, cwd=self.build_dir, env=env) as proc:
logger.debug("Spawning BinaryHandler Thread for %s" % self.name)
@ -575,6 +576,9 @@ class BinaryHandler(Handler):
t.join()
proc.wait()
self.returncode = proc.returncode
(stdout, stderr) = proc.communicate(timeout=30)
if stderr:
logger.error(stderr.decode())
handler_time = time.time() - start_time