[coverage] Don't attempt to glob expand gtest_filter parameters

https://crrev.com/c/4121294 added glob expansion to _SplitCommand in
the coverage script to support fuzz targets. However, the expansion was
applied to any sub-command parameter containing an asterisk, including
for example `--gtest_filter=MyTest.*`. In such a case, the test filter
would be dropped from the parameter list passed to the test executable.

This CL excludes --gtest_filter parameters from glob expansion.

Bug: 326498918
Change-Id: Id186d53b3a1b1991dee44dd5e04ae5342b4518ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5740313
Commit-Queue: Kevin Babbitt <[email protected]>
Reviewed-by: Prakhar Asthana <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1334343}
diff --git a/tools/code_coverage/coverage.py b/tools/code_coverage/coverage.py
index ec9fd75..a4a1eb0 100755
--- a/tools/code_coverage/coverage.py
+++ b/tools/code_coverage/coverage.py
@@ -475,7 +475,7 @@
   # Python's subprocess does not do glob expansion, so we expand it out here.
   new_command = []
   for item in split_command:
-    if '*' in item:
+    if '*' in item and not item.startswith('--gtest_filter'):
       files = glob.glob(item)
       for file in files:
         new_command.append(file)