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>
diff --git a/scripts/sanitycheck b/scripts/sanitycheck
index b6ab2a1..7343d57 100755
--- a/scripts/sanitycheck
+++ b/scripts/sanitycheck
@@ -564,6 +564,7 @@
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 @@
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