scripts: cros_generate_breakpad_symbols: Don't force good symbols from /usr/local

As an add-on to
https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4307796,
don't fail if an ELF from /usr/local does not generate good symbols.
/usr/local is not shipped to end-users, so we shouldn't get crash
reports from those ELFs.

BUG=b:241470012,b:270240549
TEST="cros_generate_breakpad_symbols --board=eve" runs with success and
no "unexpected failure" messages

Change-Id: I02426ae83c416fb47ebb7511a3f72c9e0e5d03f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4322863
Reviewed-by: Cindy Lin <xcl@google.com>
Commit-Queue: Ian Barkley-Yeung <iby@chromium.org>
Tested-by: Ian Barkley-Yeung <iby@chromium.org>
Auto-Submit: Ian Barkley-Yeung <iby@chromium.org>
diff --git a/scripts/cros_generate_breakpad_symbols.py b/scripts/cros_generate_breakpad_symbols.py
index 816ed3c..c12fb02 100644
--- a/scripts/cros_generate_breakpad_symbols.py
+++ b/scripts/cros_generate_breakpad_symbols.py
@@ -106,11 +106,17 @@
     if sysroot is not None:
         relative_path = os.path.relpath(elf_file, sysroot)
     else:
-        relative_path = elf_file
+        relative_path = os.path.relpath(elf_file, "/")
 
     if relative_path in EXPECTED_POOR_SYMBOLIZATION_FILES:
         return False
 
+    # Binaries in /usr/local are not actually shipped to end-users, so we
+    # don't care if they get good symbols -- we should never get crash reports
+    # for them anyways.
+    if relative_path.startswith("usr/local"):
+        return False
+
     return True