Skip to content

Wrong namespace of gflags (in test code). #14

Closed

Description

@y-uti

I've built on CentOS7, everything seems OK but "make check" doesn't work because of the wrong namespace of gflags. (I used gflags-2.1.1.)

--- lib/test/TestMain.cpp-      2014-11-09 09:39:41.214275717 +0900
+++ lib/test/TestMain.cpp       2014-11-09 12:09:51.171483219 +0900
@@ -14,7 +14,7 @@

 int main(int argc, char* argv[]) {
   testing::InitGoogleTest(&argc, argv);
-  google::ParseCommandLineFlags(&argc, &argv, true);
+  gflags::ParseCommandLineFlags(&argc, &argv, true);
   google::InitGoogleLogging(argv[0]);
   google::InstallFailureSignalHandler();
   LOG(INFO) << "Running tests from TestMain.cpp";
--- lib/ssl/test/SSLCacheTest.cpp-      2014-11-09 09:39:41.214275717 +0900
+++ lib/ssl/test/SSLCacheTest.cpp       2014-11-09 12:11:30.324706817 +0900
@@ -96,10 +96,10 @@
 int
 main(int argc, char* argv[])
 {
-  google::SetUsageMessage(std::string("\n\n"
+  gflags::SetUsageMessage(std::string("\n\n"
 "usage: sslcachetest [options] -c <clients> -t <threads> servers\n"
 ));
-  google::ParseCommandLineFlags(&argc, &argv, true);
+  gflags::ParseCommandLineFlags(&argc, &argv, true);
   int reqs = 0;
   int hits = 0;
   int miss = 0;

Activity

  1. dcsommer commented on Nov 9, 2014

    @dcsommer
    Contributor

    Yeah, we're using a different version of gflags. This can probably be easily fixed with some ifdefs based on the gflags version. Want to send a pull request?

  2. y-uti commented on Nov 9, 2014

    @y-uti
    ContributorAuthor

    I sent pull request. I found Folly is already portable and this can be solved by including folly/Portability.h.

  3. dcsommer commented on Nov 10, 2014

    @dcsommer
    Contributor

    Thanks for the PR! It has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions