diff options
author | Ted Mielczarek <ted@mielczarek.org> | 2016-06-10 13:23:29 -0400 |
---|---|---|
committer | Ted Mielczarek <ted@mielczarek.org> | 2016-06-10 13:23:29 -0400 |
commit | c44217f6468152bf5693df7ec78a48d97e2b0e83 (patch) | |
tree | f05595f7a39b34c8111c6a74bfbf505c66dfa4b1 /src/common/module_unittest.cc | |
parent | Fix a trivial parsing bug caught by static analysis (diff) | |
download | breakpad-c44217f6468152bf5693df7ec78a48d97e2b0e83.tar.xz |
Dump INFO CODE_ID containing Build ID in Linux dump_syms
I'd like to have the Build ID available for our symbol server
uploading, and this will make it easy.
Most of this change is me rewriting dump_symbols_unittest to be
typed tests so I could add a new test there.
R=mark@chromium.org
BUG=
Review URL: https://codereview.chromium.org/2052263002 .
Diffstat (limited to 'src/common/module_unittest.cc')
-rw-r--r-- | src/common/module_unittest.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common/module_unittest.cc b/src/common/module_unittest.cc index 0b643271..78406e37 100644 --- a/src/common/module_unittest.cc +++ b/src/common/module_unittest.cc @@ -64,6 +64,7 @@ static Module::Function *generate_duplicate_function(const string &name) { #define MODULE_OS "os-name" #define MODULE_ARCH "architecture" #define MODULE_ID "id-string" +#define MODULE_CODE_ID "code-id-string" TEST(Write, Header) { stringstream s; @@ -74,6 +75,16 @@ TEST(Write, Header) { contents.c_str()); } +TEST(Write, HeaderCodeId) { + stringstream s; + Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID, MODULE_CODE_ID); + m.Write(s, ALL_SYMBOL_DATA); + string contents = s.str(); + EXPECT_STREQ("MODULE os-name architecture id-string name with spaces\n" + "INFO CODE_ID code-id-string\n", + contents.c_str()); +} + TEST(Write, OneLineFunc) { stringstream s; Module m(MODULE_NAME, MODULE_OS, MODULE_ARCH, MODULE_ID); |