<div dir="ltr">Was this supposed to make <a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/22544/steps/run%20asan%20lit%20tests%20%5Bx86%2Ffugu-userdebug%2FLMY48N%5D/logs/stdio">http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/22544/steps/run%20asan%20lit%20tests%20%5Bx86%2Ffugu-userdebug%2FLMY48N%5D/logs/stdio</a> (recent failure) more understandable?</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 10, 2016 at 4:16 PM, Evgeniy Stepanov via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: eugenis<br>
Date: Wed Feb 10 18:16:28 2016<br>
New Revision: 260473<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=260473&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=260473&view=rev</a><br>
Log:<br>
[asan] Dump adb output on failure.<br>
<br>
This is an asan/android test harness change aiming to catch<br>
"adb pull" failures on the buildbot.<br>
<br>
Modified:<br>
    compiler-rt/trunk/test/asan/android_commands/android_common.py<br>
<br>
Modified: compiler-rt/trunk/test/asan/android_commands/android_common.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/android_commands/android_common.py?rev=260473&r1=260472&r2=260473&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/android_commands/android_common.py?rev=260473&r1=260472&r2=260473&view=diff</a><br>
==============================================================================<br>
--- compiler-rt/trunk/test/asan/android_commands/android_common.py (original)<br>
+++ compiler-rt/trunk/test/asan/android_commands/android_common.py Wed Feb 10 18:16:28 2016<br>
@@ -11,8 +11,18 @@ if os.environ.get('ANDROID_RUN_VERBOSE')<br>
 def adb(args):<br>
     if verbose:<br>
         print args<br>
-    devnull = open(os.devnull, 'w')<br>
-    return subprocess.call([ADB] + args, stdout=devnull, stderr=subprocess.STDOUT)<br>
+    tmpname = tempfile.mktemp()<br>
+    out = open(tmpname, 'w')<br>
+    ret = subprocess.call([ADB] + args, stdout=out, stderr=subprocess.STDOUT)<br>
+    if ret != 0:<br>
+        print "adb command failed", args<br>
+        print tmpname<br>
+        out.close()<br>
+        out = open(tmpname, 'r')<br>
+        print out.read()<br>
+    out.close()<br>
+    os.unlink(tmpname)<br>
+    return ret<br>
<br>
 def pull_from_device(path):<br>
     tmp = tempfile.mktemp()<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div>