Skip to content

Commit

Permalink
Start of work on valgrind test for mongos SERVER-1125
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBeard0531 committed May 26, 2010
1 parent a6e5b14 commit 560b7ba
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions SConstruct
Expand Up @@ -681,6 +681,7 @@ if nix:

if debugBuild:
env.Append( CPPFLAGS=" -O0 -fstack-protector " );
env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind
else:
env.Append( CPPFLAGS=" -O3" )

Expand Down
10 changes: 10 additions & 0 deletions shell/utils.cpp
Expand Up @@ -229,6 +229,16 @@ namespace mongo {
boost::filesystem::path programPath = program;

if (isMongoProgram){
#if 0
if (program == "mongos") {
argv_.push_back("valgrind");
argv_.push_back("--leak-check=yes");
argv_.push_back("--suppressions=valgrind.suppressions");
//argv_.push_back("--error-exitcode=1");
argv_.push_back("--");
}
#endif

programPath = boost::filesystem::initial_path() / programPath;
#ifdef _WIN32
programPath = change_extension(programPath, ".exe");
Expand Down
8 changes: 8 additions & 0 deletions valgrind.suppressions
@@ -0,0 +1,8 @@
{
Command_Static_Stuff
Memcheck:Leak
...
fun:_ZNSsC1EPKcRKSaIcE
...
}

0 comments on commit 560b7ba

Please sign in to comment.