gpu/khronos_glcts_support/generate_khronos_glcts_tests.py
def GenerateTests(run_files, output):
  """
    Generates code for khronos_glcts_test test-cases that are
    listed in the run_files.
  """
  output.write('#include "gpu/khronos_glcts_support/khronos_glcts_test.h"\n')
  output.write('#include "testing/gtest/include/gtest/gtest.h"\n\n')

  for run_file in run_files:
    run_file_name = os.path.basename(run_file)
    run_file_dir = os.path.dirname(run_file)
    suite_prefix = RUN_FILE_SUITE_PREFIX[run_file_name]
    output.write("// " + run_file_name + "\n")
    builtin_tests = BUILT_IN_TESTS[run_file_name]
    for test in builtin_tests:
      output.write(TEST_DEF_TEMPLATE
        % {
          "gname": re.sub(r'[^A-Za-z0-9]', '_', test),
          "cname": test,
        })
    for test in ReadRunFile(run_file):
      rel_path = os.path.relpath(test, run_file_dir)
      root, _ = os.path.splitext(rel_path)
      name = root.replace('.', '_')
      name = "%s.%s" % (suite_prefix, name.replace(os.path.sep, '.'))
      output.write(TEST_DEF_TEMPLATE
        % {
          "gname": re.sub(r'[^A-Za-z0-9]', '_', name),
          "cname": name,
        })
    output.write("\n");

    Generates code for khronos_glcts_test test-cases that are
    listed in the run_files.
  
Generates code for khronos_glcts_test test-cases that are
listed in the run_files.
Generates code for khronos_glcts_test test - cases that are listed in the run_files .
def GenerateTests(run_files, output):
  output.write('#include "gpu/khronos_glcts_support/khronos_glcts_test.h"\n')
  output.write('#include "testing/gtest/include/gtest/gtest.h"\n\n')
  for run_file in run_files:
    run_file_name = os.path.basename(run_file)
    run_file_dir = os.path.dirname(run_file)
    suite_prefix = RUN_FILE_SUITE_PREFIX[run_file_name]
    output.write("// " + run_file_name + "\n")
    builtin_tests = BUILT_IN_TESTS[run_file_name]
    for test in builtin_tests:
      output.write(TEST_DEF_TEMPLATE
        % {
          "gname": re.sub(r'[^A-Za-z0-9]', '_', test),
          "cname": test,
        })
    for test in ReadRunFile(run_file):
      rel_path = os.path.relpath(test, run_file_dir)
      root, _ = os.path.splitext(rel_path)
      name = root.replace('.', '_')
      name = "%s.%s" % (suite_prefix, name.replace(os.path.sep, '.'))
      output.write(TEST_DEF_TEMPLATE
        % {
          "gname": re.sub(r'[^A-Za-z0-9]', '_', name),
          "cname": name,
        })
    output.write("\n");
def GenerateTests ( run_files , output ) : output . write ( '#include "gpu/khronos_glcts_support/khronos_glcts_test.h"\n' ) output . write ( '#include "testing/gtest/include/gtest/gtest.h"\n\n' ) for run_file in run_files : run_file_name = os . path . basename ( run_file ) run_file_dir = os . path . dirname ( run_file ) suite_prefix = RUN_FILE_SUITE_PREFIX [ run_file_name ] output . write ( "// " + run_file_name + "\n" ) builtin_tests = BUILT_IN_TESTS [ run_file_name ] for test in builtin_tests : output . write ( TEST_DEF_TEMPLATE % { "gname" : re . sub ( r'[^A-Za-z0-9]' , '_' , test ) , "cname" : test , } ) for test in ReadRunFile ( run_file ) : rel_path = os . path . relpath ( test , run_file_dir ) root , _ = os . path . splitext ( rel_path ) name = root . replace ( '.' , '_' ) name = "%s.%s" % ( suite_prefix , name . replace ( os . path . sep , '.' ) ) output . write ( TEST_DEF_TEMPLATE % { "gname" : re . sub ( r'[^A-Za-z0-9]' , '_' , name ) , "cname" : name , } ) output . write ( "\n" ) ;
Generates code for khronos_glcts_test test-cases that are
listed in the run_files.
Generates code for khronos_glcts_test test - cases that are listed in the run_files .
"""
    Generates code for khronos_glcts_test test-cases that are
    listed in the run_files.
  """
run_files
output