#NEWLINE# def __init__( self , sourcefiles , fileOptions , runSet , propertyfile = None , required_files_patterns = [ ] ) : #NEWLINE# #INDENT# assert sourcefiles #NEWLINE# self . identifier = sourcefiles [ 0 ] #NEWLINE# self . sourcefiles = util . get_files ( sourcefiles ) #NEWLINE# self . runSet = runSet #NEWLINE# self . specific_options = fileOptions #NEWLINE# self . log_file = ( ( runSet . log_folder + os . path . basename ( self . identifier ) ) + '.log' ) #NEWLINE# self . required_files = set ( ) #NEWLINE# rel_sourcefile = os . path . relpath ( self . identifier , runSet . benchmark . base_dir ) #NEWLINE# for pattern in required_files_patterns : #NEWLINE# #INDENT# this_required_files = runSet . expand_filename_pattern ( pattern , runSet . benchmark . base_dir , rel_sourcefile ) #NEWLINE# if ( not this_required_files ) : #NEWLINE# #INDENT# logging . warning ( 'Pattern %s in requiredfiles tag did not match any file for task %s.' , pattern , self . identifier ) #NEWLINE# #UNINDENT# self . required_files . update ( this_required_files ) #NEWLINE# #UNINDENT# self . required_files = list ( self . required_files ) #NEWLINE# self . options = ( ( runSet . options + fileOptions ) if fileOptions else runSet . options ) #NEWLINE# substitutedOptions = substitute_vars ( self . options , runSet , self . identifier ) #NEWLINE# if ( substitutedOptions != self . options ) : #NEWLINE# #INDENT# self . options = substitutedOptions #NEWLINE# #UNINDENT# self . propertyfile = ( propertyfile or runSet . propertyfile ) #NEWLINE# def log_property_file_once( msg ) : #NEWLINE# #INDENT# if ( not ( self . propertyfile in _logged_missing_property_files ) ) : #NEWLINE# #INDENT# _logged_missing_property_files . add ( self . propertyfile ) #NEWLINE# logging . warning ( msg ) #NEWLINE# #UNINDENT# #UNINDENT# if ( self . propertyfile is None ) : #NEWLINE# #INDENT# log_property_file_once ( 'No propertyfile specified. Results for C programs will be handled as UNKNOWN.' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# expandedPropertyFiles = util . expand_filename_pattern ( self . propertyfile , self . runSet . benchmark . base_dir ) #NEWLINE# substitutedPropertyfiles = substitute_vars ( [ self . propertyfile ] , runSet , self . identifier ) #NEWLINE# assert ( len ( substitutedPropertyfiles ) == 1 ) #NEWLINE# if expandedPropertyFiles : #NEWLINE# #INDENT# if ( len ( expandedPropertyFiles ) > 1 ) : #NEWLINE# #INDENT# log_property_file_once ( 'Pattern {0} for sourcefile {1} in propertyfile tag matches more than one file. Only {2} will be used.' . format ( self . propertyfile , self . identifier , expandedPropertyFiles [ 0 ] ) ) #NEWLINE# #UNINDENT# self . propertyfile = expandedPropertyFiles [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( substitutedPropertyfiles and os . path . isfile ( substitutedPropertyfiles [ 0 ] ) ) : #NEWLINE# #INDENT# self . propertyfile = substitutedPropertyfiles [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# log_property_file_once ( 'Pattern {0} for sourcefile {1} in propertyfile tag did not match any file. It will be ignored.' . format ( self . propertyfile , self . identifier ) ) #NEWLINE# self . propertyfile = None #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if self . propertyfile : #NEWLINE# #INDENT# self . runSet . benchmark . add_required_file ( self . propertyfile ) #NEWLINE# self . properties = result . properties_of_file ( self . propertyfile ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . properties = [ ] #NEWLINE# #UNINDENT# self . columns = [ Column ( c . text , c . title , c . number_of_digits ) for c in self . runSet . benchmark . columns ] #NEWLINE# self . values = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . status = '' #NEWLINE# self . cputime = None #NEWLINE# self . walltime = None #NEWLINE# self . category = result . CATEGORY_UNKNOWN