tools/perry.py
def _GetTestList(path_to_binary):
  """Returns a set of full test names.

  Each test will be of the form "Case.Test". There will be a separate line
  for each combination of Case/Test (there are often multiple tests in each
  case).
  """
  raw_output = subprocess.check_output([path_to_binary, "--gtest_list_tests"])
  input_lines = raw_output.splitlines()

  # The format of the gtest_list_tests output is:
  # "Case1."
  # "  Test1  # <Optional extra stuff>"
  # "  Test2"
  # "Case2."
  # "  Test1"
  case_name = ''  # Includes trailing dot.
  test_set = set()
  for line in input_lines:
    if len(line) > 1:
      if '#' in line:
        line = line[:line.find('#')]
      if line[0] == ' ':
        # Indented means a test in previous case.
        test_set.add(case_name + line.strip())
      else:
        # New test case.
        case_name = line.strip()

  return test_set
Returns a set of full test names.

  Each test will be of the form "Case.Test". There will be a separate line
  for each combination of Case/Test (there are often multiple tests in each
  case).
  
Returns a set of full test names.
Each test will be of the form "Case.Test". There will be a separate line
for each combination of Case/Test (there are often multiple tests in each
case).
Returns a set of full test names . Each test will be of the form " Case . Test " . There will be a separate line for each combination of Case / Test ( there are often multiple tests in each case ) .
def _GetTestList(path_to_binary):
  raw_output = subprocess.check_output([path_to_binary, "--gtest_list_tests"])
  input_lines = raw_output.splitlines()
  case_name = ''  
  test_set = set()
  for line in input_lines:
    if len(line) > 1:
      if '#' in line:
        line = line[:line.find('#')]
      if line[0] == ' ':
        test_set.add(case_name + line.strip())
      else:
        case_name = line.strip()
  return test_set
def _GetTestList ( path_to_binary ) : raw_output = subprocess . check_output ( [ path_to_binary , "--gtest_list_tests" ] ) input_lines = raw_output . splitlines ( ) case_name = '' test_set = set ( ) for line in input_lines : if len ( line ) > 1 : if '#' in line : line = line [ : line . find ( '#' ) ] if line [ 0 ] == ' ' : test_set . add ( case_name + line . strip ( ) ) else : case_name = line . strip ( ) return test_set
Returns a set of full test names.
Returns a set of full test names .
"""Returns a set of full test names.

  Each test will be of the form "Case.Test". There will be a separate line
  for each combination of Case/Test (there are often multiple tests in each
  case).
  """ # The format of the gtest_list_tests output is: # "Case1." # "  Test1  # <Optional extra stuff>" # "  Test2" # "Case2." # "  Test1" # Includes trailing dot. # Indented means a test in previous case. # New test case.
path_to_binary