#NEWLINE# def extract_runs_from_xml( self , sourcefilesTagList , global_required_files_pattern ) : #NEWLINE# #INDENT# '\n        This function builds a list of SourcefileSets (containing filename with options).\n        The files and their options are taken from the list of sourcefilesTags.\n        ' #NEWLINE# blocks = [ ] #NEWLINE# for ( index , sourcefilesTag ) in enumerate ( sourcefilesTagList ) : #NEWLINE# #INDENT# sourcefileSetName = sourcefilesTag . get ( 'name' ) #NEWLINE# matchName = ( sourcefileSetName or str ( index ) ) #NEWLINE# if ( self . benchmark . config . selected_sourcefile_sets and ( not any ( ( util . wildcard_match ( matchName , sourcefile_set ) for sourcefile_set in self . benchmark . config . selected_sourcefile_sets ) ) ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# required_files_pattern = set ( ( tag . text for tag in sourcefilesTag . findall ( 'requiredfiles' ) ) ) #NEWLINE# sourcefiles = self . get_sourcefiles_from_xml ( sourcefilesTag , self . benchmark . base_dir ) #NEWLINE# fileOptions = util . get_list_from_xml ( sourcefilesTag ) #NEWLINE# propertyfile = util . text_or_none ( util . get_single_child_from_xml ( sourcefilesTag , PROPERTY_TAG ) ) #NEWLINE# currentRuns = [ ] #NEWLINE# for sourcefile in sourcefiles : #NEWLINE# #INDENT# currentRuns . append ( Run ( sourcefile , fileOptions , self , propertyfile , global_required_files_pattern . union ( required_files_pattern ) ) ) #NEWLINE# #UNINDENT# blocks . append ( SourcefileSet ( sourcefileSetName , index , sourcefilesTagList ) ) #NEWLINE# #UNINDENT# if self . benchmark . config . selected_sourcefile_sets : #NEWLINE# #INDENT# for selected in self . benchmark . config . selected_sourcefile_sets : #NEWLINE# #INDENT# if ( not any ( ( util . wildcard_match ( sourcefile_set . real_name , selected ) for sourcefile_set in blocks ) ) ) : #NEWLINE# #INDENT# logging . warning ( 'The selected tasks "%s" are not present in the input file, skipping them.' , selected ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return blocks