summaryrefslogtreecommitdiffstats
path: root/base/debug_util_unittest.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-31 02:28:09 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-31 02:28:09 +0000
commit889da7e472266a9b32b0ad75fa3d399fc1e16309 (patch)
treeaab3cd8b4b1c37e819c0f0f1e95216fee50ab17f /base/debug_util_unittest.cc
parentf7adea03bde76bbb9824370649363ed198a7b9fe (diff)
downloadchromium_src-889da7e472266a9b32b0ad75fa3d399fc1e16309.zip
chromium_src-889da7e472266a9b32b0ad75fa3d399fc1e16309.tar.gz
chromium_src-889da7e472266a9b32b0ad75fa3d399fc1e16309.tar.bz2
linux: reenable symbols in backtraces in debug builds
This is easy enough to fix, and would be occasionally helpful. Review URL: http://codereview.chromium.org/524015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35405 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/debug_util_unittest.cc')
-rw-r--r--base/debug_util_unittest.cc23
1 files changed, 14 insertions, 9 deletions
diff --git a/base/debug_util_unittest.cc b/base/debug_util_unittest.cc
index 930e9e0..c909436 100644
--- a/base/debug_util_unittest.cc
+++ b/base/debug_util_unittest.cc
@@ -9,6 +9,8 @@
#include "base/logging.h"
#include "testing/gtest/include/gtest/gtest.h"
+// Note: this test currently only fully works on Linux Debug builds.
+// See comments in the #ifdef soup if you intend to change this.
TEST(StackTrace, OutputToStream) {
StackTrace trace;
@@ -34,14 +36,12 @@ TEST(StackTrace, OutputToStream) {
std::string::npos) <<
"Unable to resolve symbols. Skipping rest of test.";
-#if 0
-// TODO(ajwong): Disabling checking of symbol resolution since it depends
-// on whether or not symbols are present, and there are too many
-// configurations to reliably ensure that symbols are findable.
#if defined(OS_MACOSX)
+#if 0
+ // Disabled due to -fvisibility=hidden in build config.
- // Symbol resolution via the backtrace_symbol funciton does not work well
- // in OsX.
+ // Symbol resolution via the backtrace_symbol function does not work well
+ // in OS X.
// See this thread:
//
// http://lists.apple.com/archives/darwin-dev/2009/Mar/msg00111.html
@@ -56,14 +56,20 @@ TEST(StackTrace, OutputToStream) {
<< "Expected to find start in backtrace:\n"
<< backtrace_message;
+#endif
#elif defined(__GLIBCXX__)
-
+ // This branch is for gcc-compiled code, but not Mac due to the
+ // above #if.
// Expect a demangled symbol.
EXPECT_TRUE(backtrace_message.find("testing::Test::Run()") !=
std::string::npos)
<< "Expected a demangled symbol in backtrace:\n"
<< backtrace_message;
-#else // defined(__GLIBCXX__)
+
+#elif 0
+ // This is the fall-through case; it used to cover Windows.
+ // But it's disabled because of varying buildbot configs;
+ // some lack symbols.
// Expect to at least find main.
EXPECT_TRUE(backtrace_message.find("main") != std::string::npos)
@@ -83,5 +89,4 @@ TEST(StackTrace, OutputToStream) {
<< backtrace_message;
#endif // define(OS_MACOSX)
-#endif
}