def create_run_for_input_file( self, input_file, options, property_file, required_files_pattern, append_file_tags): """Create a Run from a direct definition of the main input file (without task definition)""" input_files = [input_file] base_dir = os.path.dirname(input_file) for append_file in append_file_tags: input_files.extend( self.expand_filename_pattern(append_file.text, base_dir, sourcefile=input_file)) run = Run( input_file, util.get_files(input_files), # expand directories to get their sub-files options, self, property_file, required_files_pattern) if not run.propertyfile: return run prop = result.Property.create(run.propertyfile, allow_unknown=False) run.properties = [prop] expected_results = result.expected_results_of_file(input_file) if prop.name in expected_results: run.expected_results[prop.filename] = expected_results[prop.name] # We do not check here if there is an expected result for the given propertyfile # like we do in create_run_from_task_definition, to keep backwards compatibility. return run
def create_run_for_input_file( self, input_file, options, local_propertytag, required_files_pattern, append_file_tags, ): """Create a Run from a direct definition of the main input file (without task definition)""" input_files = [input_file] base_dir = os.path.dirname(input_file) for append_file in append_file_tags: input_files.extend( self.expand_filename_pattern( append_file.text, base_dir, sourcefile=input_file ) ) run = Run( input_file, util.get_files(input_files), # expand directories to get their sub-files options, self, local_propertytag, required_files_pattern, ) if not run.propertyfile: return run prop = result.Property.create(run.propertyfile, allow_unknown=False) run.properties = [prop] expected_results = result.expected_results_of_file(input_file) if prop.name in expected_results: run.expected_results[prop.filename] = expected_results[prop.name] # We do not check here if there is an expected result for the given propertyfile # like we do in create_run_from_task_definition, to keep backwards compatibility. if run.propertytag.get("expectedverdict"): global _WARNED_ABOUT_UNSUPPORTED_EXPECTED_RESULT_FILTER if not _WARNED_ABOUT_UNSUPPORTED_EXPECTED_RESULT_FILTER: _WARNED_ABOUT_UNSUPPORTED_EXPECTED_RESULT_FILTER = True logging.warning( "Ignoring filter based on expected verdict " "for tasks without task-definition file. " "Expected verdicts for such tasks will be removed in BenchExec 3.0 " "(cf. https://github.com/sosy-lab/benchexec/issues/439)." ) return run