Skip to content

Commit

Permalink
Added flawfinder
Browse files Browse the repository at this point in the history
  • Loading branch information
gudrutis committed Mar 6, 2018
1 parent 22a61e1 commit b275d98
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions report-summary-merged-prs
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,14 @@ def find_lizard_results( comparisons , architecture ):
print 'Looking for lizard results for ', rel_name
comp['lizard'] = find_one_lizard( rel_name , architecture )
#
# Finds for an IB the results of the lizard
#
def find_flawfinder_results( comparisons , architecture ):
for comp in comparisons:
rel_name = comp['compared_tags'].split('-->')[1]
print 'Looking for flawfinder results for ', rel_name
comp['flawfinder'] = find_one_flawfinder( rel_name , architecture )
#
# Finds for an IB the results of the igprof
#
def find_igprof_results( comparisons , architecture ):
Expand Down Expand Up @@ -917,6 +925,21 @@ def find_one_lizard( release_name , architecture ):
print 'inprogress'
return 'inprogress'

#
# Looks for one flawfinder result for the IB, if it finds it, the value is 'found' if not, the value is 'inprogress'
#
def find_one_flawfinder( release_name , architecture ):
command_to_execute = MAGIC_COMMAND_FIND_FLAWFINDER.replace('RELEASE_NAME',release_name)
command_to_execute = command_to_execute.replace('ARCHITECTURE', architecture )
print "Running ",command_to_execute
out,err,ret_code = get_output_command(command_to_execute)
print "Ran:",out,err,ret_code,command_to_execute
if ret_code == 0:
print 'found'
return 'found'
print 'inprogress'
return 'inprogress'

#
# Looks for one igprof result for the IB, if it finds it, the value is 'found' if not, the value is 'inprogress'
#
Expand Down Expand Up @@ -1223,6 +1246,7 @@ if __name__ == "__main__":
MAGIC_COMMAND_FIND_HLT_TESTS = 'test -d '+JENKINS_ARTIFACTS_DIR+'/HLT-Validation/RELEASE_NAME'
MAGIC_COMMAND_FIND_DQM_TESTS = 'test -d '+JENKINS_ARTIFACTS_DIR+'/ib-dqm-tests/RELEASE_NAME'
MAGIC_COMMAND_FIND_LIZARD = 'test -d ' + JENKINS_ARTIFACTS_DIR + '/lizard/RELEASE_NAME/ARCHITECTURE'
MAGIC_COMMAND_FIND_FLAWFINDER = 'test -d ' + JENKINS_ARTIFACTS_DIR + '/flawfinder/RELEASE_NAME/ARCHITECTURE'
CONFIG_MAP_FILE = 'config.map'
# this will be filled using config.map by get_config_map_params()
ARCHITECTURES = []
Expand Down Expand Up @@ -1347,6 +1371,8 @@ if __name__ == "__main__":
find_valgrind_results( release_queue_results['comparisons'] , arch )
if 'lizard' in tests_to_find:
find_lizard_results( release_queue_results['comparisons'] , arch )
if 'flawfinder' in tests_to_find:
find_flawfinder_results( release_queue_results['comparisons'] , arch )
if 'material-budget' in tests_to_find:
find_material_budget_results( release_queue_results['comparisons'] , arch )
if 'baseline' in tests_to_find:
Expand Down

0 comments on commit b275d98

Please sign in to comment.