@@ -71,7 +71,7 @@ def getProjectMapPath():
71
71
if not os .path .exists (ProjectMapPath ):
72
72
print "Error: Cannot find the Project Map file " + ProjectMapPath + \
73
73
"\n Running script for the wrong directory?"
74
- sys .exit (- 1 )
74
+ sys .exit (1 )
75
75
return ProjectMapPath
76
76
77
77
@@ -97,7 +97,7 @@ def getSBOutputDirName(IsReferenceBuild):
97
97
Clang = SATestUtils .which ("clang" , os .environ ['PATH' ])
98
98
if not Clang :
99
99
print "Error: cannot find 'clang' in PATH"
100
- sys .exit (- 1 )
100
+ sys .exit (1 )
101
101
102
102
# Number of jobs.
103
103
Jobs = int (math .ceil (multiprocessing .cpu_count () * 0.75 ))
@@ -196,7 +196,7 @@ def downloadAndPatch(Dir, PBuildLogFile):
196
196
if not os .path .exists (CachedSourceDirPath ):
197
197
print "Error: '%s' not found after download." % (
198
198
CachedSourceDirPath )
199
- exit (- 1 )
199
+ exit (1 )
200
200
201
201
PatchedSourceDirPath = os .path .join (Dir , PatchedSourceDirName )
202
202
@@ -225,7 +225,7 @@ def applyPatch(Dir, PBuildLogFile):
225
225
shell = True )
226
226
except :
227
227
print "Error: Patch failed. See %s for details." % (PBuildLogFile .name )
228
- sys .exit (- 1 )
228
+ sys .exit (1 )
229
229
230
230
231
231
def runScanBuild (Dir , SBOutputDir , PBuildLogFile ):
@@ -236,7 +236,7 @@ def runScanBuild(Dir, SBOutputDir, PBuildLogFile):
236
236
BuildScriptPath = os .path .join (Dir , BuildScript )
237
237
if not os .path .exists (BuildScriptPath ):
238
238
print "Error: build script is not defined: %s" % BuildScriptPath
239
- sys .exit (- 1 )
239
+ sys .exit (1 )
240
240
241
241
AllCheckers = Checkers
242
242
if 'SA_ADDITIONAL_CHECKERS' in os .environ :
@@ -473,7 +473,7 @@ def checkBuild(SBOutputDir):
473
473
shutil .copyfileobj (FailLogI , SummaryLog )
474
474
475
475
print "Error: analysis failed. See " , SummaryPath
476
- sys .exit (- 1 )
476
+ sys .exit (1 )
477
477
478
478
479
479
def runCmpResults (Dir , Strictness = 0 ):
@@ -503,7 +503,10 @@ def runCmpResults(Dir, Strictness=0):
503
503
RefList .remove (RefLogDir )
504
504
NewList .remove (os .path .join (NewDir , LogFolderName ))
505
505
506
- assert (len (RefList ) == len (NewList ))
506
+ if len (RefList ) != len (NewList ):
507
+ print "Mismatch in number of results folders: %s vs %s" % (
508
+ RefList , NewList )
509
+ sys .exit (1 )
507
510
508
511
# There might be more then one folder underneath - one per each scan-build
509
512
# command (Ex: one for configure and one for make).
@@ -656,4 +659,4 @@ def testAll(IsReferenceBuild=False, Strictness=0):
656
659
TestsPassed = testAll (IsReference , Strictness )
657
660
if not TestsPassed :
658
661
print "ERROR: Tests failed."
659
- sys .exit (- 1 )
662
+ sys .exit (42 )
0 commit comments