def get_tests_from_fs(parent_dir, control_pattern, add_noncompliant=False):
 tests = {}
 profilers = False
 if ('client/profilers' in parent_dir):
  profilers = True
 for dir in [parent_dir]:
  files = recursive_walk(dir, control_pattern)
  for file in files:
   if (('__init__.py' in file) or ('.svn' in file)):
    continue
   if (not profilers):
    if (not add_noncompliant):
     try:
      found_test = control_data.parse_control(file, raise_warnings=True)
      tests[file] = found_test
     except control_data.ControlVariableException as e:
      logging.warn('Skipping %s\n%s', file, e)
     except Exception as e:
      logging.error('Bad %s\n%s', file, e)
    else:
     found_test = control_data.parse_control(file)
     tests[file] = found_test
   else:
    tests[file] = compiler.parseFile(file).doc
 return tests

def get_tests_from_fs ( parent_dir , control_pattern , add_noncompliant = False ) : tests = { } profilers = False if ( 'client/profilers' in parent_dir ) : profilers = True for dir in [ parent_dir ] : files = recursive_walk ( dir , control_pattern ) for file in files : if ( ( '__init__.py' in file ) or ( '.svn' in file ) ) : continue if ( not profilers ) : if ( not add_noncompliant ) : try : found_test = control_data . parse_control ( file , raise_warnings = True ) tests [ file ] = found_test except control_data . ControlVariableException as e : logging . warn ( 'Skipping %s\n%s' , file , e ) except Exception as e : logging . error ( 'Bad %s\n%s' , file , e ) else : found_test = control_data . parse_control ( file ) tests [ file ] = found_test else : tests [ file ] = compiler . parseFile ( file ) . doc return tests
find control files in file system and load a list with their info .