[compiler-rt] r260473 - [asan] Dump adb output on failure.

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 11 18:16:18 PST 2016


Was this supposed to make
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
(recent failure) more understandable?

On Wed, Feb 10, 2016 at 4:16 PM, Evgeniy Stepanov via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: eugenis
> Date: Wed Feb 10 18:16:28 2016
> New Revision: 260473
>
> URL: http://llvm.org/viewvc/llvm-project?rev=260473&view=rev
> Log:
> [asan] Dump adb output on failure.
>
> This is an asan/android test harness change aiming to catch
> "adb pull" failures on the buildbot.
>
> Modified:
>     compiler-rt/trunk/test/asan/android_commands/android_common.py
>
> Modified: compiler-rt/trunk/test/asan/android_commands/android_common.py
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/android_commands/android_common.py?rev=260473&r1=260472&r2=260473&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/test/asan/android_commands/android_common.py
> (original)
> +++ compiler-rt/trunk/test/asan/android_commands/android_common.py Wed Feb
> 10 18:16:28 2016
> @@ -11,8 +11,18 @@ if os.environ.get('ANDROID_RUN_VERBOSE')
>  def adb(args):
>      if verbose:
>          print args
> -    devnull = open(os.devnull, 'w')
> -    return subprocess.call([ADB] + args, stdout=devnull,
> stderr=subprocess.STDOUT)
> +    tmpname = tempfile.mktemp()
> +    out = open(tmpname, 'w')
> +    ret = subprocess.call([ADB] + args, stdout=out,
> stderr=subprocess.STDOUT)
> +    if ret != 0:
> +        print "adb command failed", args
> +        print tmpname
> +        out.close()
> +        out = open(tmpname, 'r')
> +        print out.read()
> +    out.close()
> +    os.unlink(tmpname)
> +    return ret
>
>  def pull_from_device(path):
>      tmp = tempfile.mktemp()
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>



-- 
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160211/554d7cc7/attachment.html>


More information about the llvm-commits mailing list