Index: llvm/trunk/utils/lit/lit/formats/googletest.py =================================================================== --- llvm/trunk/utils/lit/lit/formats/googletest.py +++ llvm/trunk/utils/lit/lit/formats/googletest.py @@ -1,5 +1,6 @@ from __future__ import absolute_import import os +import subprocess import sys import lit.Test @@ -34,9 +35,10 @@ if kIsWindows: lines = lines.replace('\r', '') lines = lines.split('\n') - except: - litConfig.error("unable to discover google-tests in %r: %s" - % (path, sys.exc_info()[1])) + except Exception as exc: + out = exc.output if isinstance(exc, subprocess.CalledProcessError) else '' + litConfig.error("unable to discover google-tests in %r: %s. Process output: %s" + % (path, sys.exc_info()[1], out)) raise StopIteration nested_tests = [] @@ -136,4 +138,3 @@ return lit.Test.UNRESOLVED, msg return lit.Test.PASS,'' - Index: llvm/trunk/utils/lit/lit/util.py =================================================================== --- llvm/trunk/utils/lit/lit/util.py +++ llvm/trunk/utils/lit/lit/util.py @@ -69,9 +69,13 @@ exits with a non-zero status.""" p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env) - out,_ = p.communicate() + out, err = p.communicate() + out = convert_string(out) + err = convert_string(err) if p.returncode != 0: - raise subprocess.CalledProcessError(cmd=args, returncode=p.returncode) + raise subprocess.CalledProcessError(cmd=args, + returncode=p.returncode, + output="{}\n{}".format(out, err)) return convert_string(out) def which(command, paths = None):