def db_clean_broken(autotest_dir):
 for test in models.Test.objects.all():
  full_path = os.path.join(autotest_dir, test.path)
  if (not os.path.isfile(full_path)):
   logging.info('Removing %s', test.path)
   _log_or_execute(repr(test), test.delete)
 for profiler in models.Profiler.objects.all():
  full_path = os.path.join(autotest_dir, 'client', 'profilers', profiler.name)
  if (not os.path.exists(full_path)):
   logging.info('Removing %s', profiler.name)
   _log_or_execute(repr(profiler), profiler.delete)

def db_clean_broken ( autotest_dir ) : for test in models . Test . objects . all ( ) : full_path = os . path . join ( autotest_dir , test . path ) if ( not os . path . isfile ( full_path ) ) : logging . info ( 'Removing %s' , test . path ) _log_or_execute ( repr ( test ) , test . delete ) for profiler in models . Profiler . objects . all ( ) : full_path = os . path . join ( autotest_dir , 'client' , 'profilers' , profiler . name ) if ( not os . path . exists ( full_path ) ) : logging . info ( 'Removing %s' , profiler . name ) _log_or_execute ( repr ( profiler ) , profiler . delete )
remove tests from autotest_web that do not have valid control files this function invoked when -c supplied on the command line and when running update_all() .