def update_from_whitelist(whitelist_set, add_experimental, add_noncompliant, autotest_dir):
 tests = {}
 profilers = {}
 for file_path in whitelist_set:
  if (file_path.find('client/profilers') == (-1)):
   try:
    found_test = control_data.parse_control(file_path, raise_warnings=True)
    tests[file_path] = found_test
   except control_data.ControlVariableException as e:
    logging.warn('Skipping %s\n%s', file, e)
  else:
   profilers[file_path] = compiler.parseFile(file_path).doc
 if (len(tests) > 0):
  update_tests_in_db(tests, add_experimental=add_experimental, add_noncompliant=add_noncompliant, autotest_dir=autotest_dir)
 if (len(profilers) > 0):
  update_profilers_in_db(profilers, add_noncompliant=add_noncompliant, description='NA')

def update_from_whitelist ( whitelist_set , add_experimental , add_noncompliant , autotest_dir ) : tests = { } profilers = { } for file_path in whitelist_set : if ( file_path . find ( 'client/profilers' ) == ( - 1 ) ) : try : found_test = control_data . parse_control ( file_path , raise_warnings = True ) tests [ file_path ] = found_test except control_data . ControlVariableException as e : logging . warn ( 'Skipping %s\n%s' , file , e ) else : profilers [ file_path ] = compiler . parseFile ( file_path ) . doc if ( len ( tests ) > 0 ) : update_tests_in_db ( tests , add_experimental = add_experimental , add_noncompliant = add_noncompliant , autotest_dir = autotest_dir ) if ( len ( profilers ) > 0 ) : update_profilers_in_db ( profilers , add_noncompliant = add_noncompliant , description = 'NA' )
scans through all tests in the whitelist and add them to the database .