mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-24 01:58:21 +00:00
[Analyzer] [Tests] Dump the output of scan-build to stdout on failure.
Eliminates extra lookup step during debugging. llvm-svn: 316806
This commit is contained in:
parent
9d5a7c3b8c
commit
e58044d432
@ -272,10 +272,11 @@ def runScanBuild(Dir, SBOutputDir, PBuildLogFile):
|
||||
stderr=PBuildLogFile,
|
||||
stdout=PBuildLogFile,
|
||||
shell=True)
|
||||
except:
|
||||
print "Error: scan-build failed. See ", PBuildLogFile.name,\
|
||||
" for details."
|
||||
raise
|
||||
except CalledProcessError:
|
||||
print "Error: scan-build failed. Its output was: "
|
||||
PBuildLogFile.seek(0)
|
||||
shutil.copyfileobj(PBuildLogFile, sys.stdout)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def runAnalyzePreprocessed(Dir, SBOutputDir, Mode):
|
||||
@ -373,7 +374,7 @@ def buildProject(Dir, SBOutputDir, ProjectBuildMode, IsReferenceBuild):
|
||||
os.makedirs(os.path.join(SBOutputDir, LogFolderName))
|
||||
|
||||
# Build and analyze the project.
|
||||
with open(BuildLogPath, "wb+") as PBuildLogFile:
|
||||
with open(BuildLogPath, "r+b") as PBuildLogFile:
|
||||
if (ProjectBuildMode == 1):
|
||||
downloadAndPatch(Dir, PBuildLogFile)
|
||||
runCleanupScript(Dir, PBuildLogFile)
|
||||
|
Loading…
x
Reference in New Issue
Block a user