gpu/khronos_glcts_support/generate_khronos_glcts_tests.py
def ReadRunFile(run_file):
  """
    Find all .test tests in a .run file and return their paths.
    If the .run file contains another .run file, then that is inspected
    too.
  """
  tests = list()
  base_dir = os.path.dirname(run_file)
  for line in ReadFileAsLines(run_file):
    _, ext = os.path.splitext(line)
    if ext == ".test":
      tests.append(os.path.join(base_dir, line))
    elif ext == ".run":
      tests += ReadRunFile(os.path.join(base_dir, line))
    else:
      raise ValueError, "Unexpected line '%s' in '%s'" % (line, run_file)
  return tests

    Find all .test tests in a .run file and return their paths.
    If the .run file contains another .run file, then that is inspected
    too.
  
Find all .test tests in a .run file and return their paths.
If the .run file contains another .run file, then that is inspected
too.
Find all . test tests in a . run file and return their paths . If the . run file contains another . run file then that is inspected too .
def ReadRunFile(run_file):
  tests = list()
  base_dir = os.path.dirname(run_file)
  for line in ReadFileAsLines(run_file):
    _, ext = os.path.splitext(line)
    if ext == ".test":
      tests.append(os.path.join(base_dir, line))
    elif ext == ".run":
      tests += ReadRunFile(os.path.join(base_dir, line))
    else:
      raise ValueError, "Unexpected line '%s' in '%s'" % (line, run_file)
  return tests
def ReadRunFile ( run_file ) : tests = list ( ) base_dir = os . path . dirname ( run_file ) for line in ReadFileAsLines ( run_file ) : _ , ext = os . path . splitext ( line ) if ext == ".test" : tests . append ( os . path . join ( base_dir , line ) ) elif ext == ".run" : tests += ReadRunFile ( os . path . join ( base_dir , line ) ) else : raise ValueError , "Unexpected line '%s' in '%s'" % ( line , run_file ) return tests
Find all .test tests in a .run file and return their paths.
Find all . test tests in a . run file and return their paths .
"""
    Find all .test tests in a .run file and return their paths.
    If the .run file contains another .run file, then that is inspected
    too.
  """
run_file