def METHOD_NAME(self, path, litConfig, localConfig):
    """getGTestTests(path) - [name]
    Return the tests available in gtest executable.
    Args:
      path: String path to a gtest executable
      litConfig: LitConfig instance
      localConfig: TestingConfig instance"""
    try:
        lines = lit.util.capture([path, '--gtest_list_tests'],
                                 env=localConfig.environment)
        if kIsWindows:
          lines = lines.replace('\r', '')
        lines = lines.split('\n')
    except:
        litConfig.error("unable to discover google-tests in %r" % path)
        raise StopIteration
    nested_tests = []
    for ln in lines:
        # The test name list includes trailing comments beginning with
        # a '#' on some lines, so skip those. We don't support test names
        # that use escaping to embed '#' into their name as the names come
        # from C++ class and method names where such things are hard and
        # uninteresting to support.
        ln = ln.split('#', 1)[0].rstrip()
        if not ln.lstrip():
            continue
        if 'Running main() from gtest_main.cc' in ln:
            # Upstream googletest prints this to stdout prior to running
            # tests. LLVM removed that print statement in r61540, but we
            # handle it here in case upstream googletest is being used.
            continue
        prefix = ''
        index = 0
        while ln[index*2:index*2+2] == '  ':
            index += 1
        while len(nested_tests) > index:
            nested_tests.pop()
        ln = ln[index*2:]
        if ln.endswith('.'):
            nested_tests.append(ln)
        elif any([name.startswith('DISABLED_')
                  for name in nested_tests + [ln]]):
            # Gtest will internally skip these tests. No need to launch a
            # child process for it.
            continue
        else:
            yield ''.join(nested_tests) + ln