scripts: Add complete line to validation messages related to a single line

Any time breakpad symbol validation fails on a particular symbol file line,
add the complete line to the error message. This makes it easier to
debug issues without needing to find the symbol file (which may not get
uploaded) or reproduce the error.

BUG=b:270240549
TEST=Forced errors, examined output
TEST=unit tests

Change-Id: Ie2e41001761549b19cd474dbc9df88193afa9f3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4673853
Reviewed-by: Sergey Frolov <sfrolov@google.com>
Commit-Queue: Sergey Frolov <sfrolov@google.com>
Auto-Submit: Ian Barkley-Yeung <iby@chromium.org>
Tested-by: Ian Barkley-Yeung <iby@chromium.org>
diff --git a/scripts/cros_generate_breakpad_symbols_unittest.py b/scripts/cros_generate_breakpad_symbols_unittest.py
index 810dada..6801106 100644
--- a/scripts/cros_generate_breakpad_symbols_unittest.py
+++ b/scripts/cros_generate_breakpad_symbols_unittest.py
@@ -917,7 +917,8 @@
         INVALID_SYMBOL_FILES = [
             InvalidSymbolFile(
                 "bad_unknown_line_type.sym",
-                "symbol file has unknown line type UNKNOWN",
+                r"symbol file has unknown line type UNKNOWN "
+                r"\(line='UNKNOWN line type\n'\)",
             ),
             InvalidSymbolFile(
                 "bad_blank_line.sym",
@@ -926,17 +927,17 @@
             InvalidSymbolFile(
                 "bad_short_func.sym",
                 r"symbol file has FUNC line with 2 words "
-                r"\(expected 5 or more\)",
+                r"\(expected 5 or more\) \(line='FUNC fb0\n'\)",
             ),
             InvalidSymbolFile(
                 "bad_short_line_number.sym",
                 r"symbol file has line number line with 3 words "
-                r"\(expected 4 - 4\)",
+                r"\(expected 4 - 4\) \(line='fb0 106 0\n'\)",
             ),
             InvalidSymbolFile(
                 "bad_long_line_number.sym",
                 r"symbol file has line number line with 5 words "
-                r"\(expected 4 - 4\)",
+                r"\(expected 4 - 4\) \(line='c184 7 59 4 8\n'\)",
             ),
         ]