Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-407

Google test filter processing is incorrect for the empty string.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.13.0
    • None
    • None

    Description

      We regressed in that 'make check GTEST_FILTER=""' works for libprocess / stout, but not for the mesos tests. For mesos, it runs all the tests:

      Note: Google Test filter = *-
      [==========] Running 224 tests from 48 test cases.
      [----------] Global test environment set-up.
      [----------] 2 tests from AllocatorZooKeeperTest/0
      ...

      This should just be - instead of *-.

      The bug is in the Environment() constructor:
      // Use universal filter if not specified.
      if (enabled.empty())

      { enabled = "*"; }

      The default filter seems to be "*", so this comment is incorrect.

      From the gtest code:

      // A test filter that matches everything.
      static const char kUniversalFilter[] = "*";

      GTEST_DEFINE_string_(
      filter,
      internal::StringFromGTestEnv("filter", kUniversalFilter),
      "A colon-separated list of glob (not regex) patterns "
      "for filtering the tests to run, optionally followed by a "
      "'-' and a : separated list of negative patterns (tests to "
      "exclude). A test is run if it matches one of the positive "
      "patterns and does not match any of the negative patterns.");

      Attachments

        Activity

          People

            benjaminhindman Benjamin Hindman
            bmahler Benjamin Mahler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: