chrome/test/chromedriver/test/unittest_util.py
def FilterTests(all_tests, gtest_filter):
  """Returns a filtered list of tests based on the given gtest filter.

  See https://github.com/google/googletest/blob/master/docs/advanced.md
  for gtest_filter specification.
  """
  pattern_groups = gtest_filter.split('-')
  positive_patterns = pattern_groups[0].split(':')
  negative_patterns = None
  if len(pattern_groups) > 1:
    negative_patterns = pattern_groups[1].split(':')

  tests = []
  for test in all_tests:
    test_name = GetTestName(test)
    # Test name must by matched by one positive pattern.
    for pattern in positive_patterns:
      if fnmatch.fnmatch(test_name, pattern):
        break
    else:
      continue
    # Test name must not be matched by any negative patterns.
    for pattern in negative_patterns or []:
      if fnmatch.fnmatch(test_name, pattern):
        break
    else:
      tests += [test]
  return tests
Returns a filtered list of tests based on the given gtest filter.

  See https://github.com/google/googletest/blob/master/docs/advanced.md
  for gtest_filter specification.
  
Returns a filtered list of tests based on the given gtest filter.
Returns a filtered list of tests based on the given gtest filter .
def FilterTests(all_tests, gtest_filter):
  pattern_groups = gtest_filter.split('-')
  positive_patterns = pattern_groups[0].split(':')
  negative_patterns = None
  if len(pattern_groups) > 1:
    negative_patterns = pattern_groups[1].split(':')
  tests = []
  for test in all_tests:
    test_name = GetTestName(test)
    for pattern in positive_patterns:
      if fnmatch.fnmatch(test_name, pattern):
        break
    else:
      continue
    for pattern in negative_patterns or []:
      if fnmatch.fnmatch(test_name, pattern):
        break
    else:
      tests += [test]
  return tests
def FilterTests ( all_tests , gtest_filter ) : pattern_groups = gtest_filter . split ( '-' ) positive_patterns = pattern_groups [ 0 ] . split ( ':' ) negative_patterns = None if len ( pattern_groups ) > 1 : negative_patterns = pattern_groups [ 1 ] . split ( ':' ) tests = [ ] for test in all_tests : test_name = GetTestName ( test ) for pattern in positive_patterns : if fnmatch . fnmatch ( test_name , pattern ) : break else : continue for pattern in negative_patterns or [ ] : if fnmatch . fnmatch ( test_name , pattern ) : break else : tests += [ test ] return tests
Returns a filtered list of tests based on the given gtest filter.
Returns a filtered list of tests based on the given gtest filter .
"""Returns a filtered list of tests based on the given gtest filter.

  See https://github.com/google/googletest/blob/master/docs/advanced.md
  for gtest_filter specification.
  """ # Test name must by matched by one positive pattern. # Test name must not be matched by any negative patterns.
all_tests
gtest_filter