From b275d9873c1afaae82b651e961688a5efefb7817 Mon Sep 17 00:00:00 2001 From: Zygimantas Matonis Date: Tue, 6 Mar 2018 15:04:16 +0100 Subject: [PATCH] Added flawfinder --- report-summary-merged-prs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/report-summary-merged-prs b/report-summary-merged-prs index 95da439ea7af..d6455809d954 100755 --- a/report-summary-merged-prs +++ b/report-summary-merged-prs @@ -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 ): @@ -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' # @@ -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 = [] @@ -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: