Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Unified Diff: base/debug_util_unittest.cc

Issue 524015: linux: reenable symbols in backtraces in debug builds (Closed)
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug_util_unittest.cc
diff --git a/base/debug_util_unittest.cc b/base/debug_util_unittest.cc
index 930e9e0865940d7bfd508f52cb69a55f8e62c16e..87a6b665feedf09599b77457b759b921beb4fea6 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,11 @@ 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 defined(OS_MACOSX) && 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
@@ -63,7 +62,10 @@ TEST(StackTrace, OutputToStream) {
std::string::npos)
<< "Expected a demangled symbol in backtrace:\n"
<< backtrace_message;
-#else // defined(__GLIBCXX__)
+
+#elif 0
+ // Disabled on other platforms 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 +85,4 @@ TEST(StackTrace, OutputToStream) {
<< backtrace_message;
#endif // define(OS_MACOSX)
-#endif
}
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698