You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2013/06/20 05:32:42 UTC

git commit: Fixed environment.cpp to correctly handle an empty test filter.

Updated Branches:
  refs/heads/master 56c20b619 -> 76e3e31f8


Fixed environment.cpp to correctly handle an empty test filter.

Review: https://reviews.apache.org/r/11888


Project: http://git-wip-us.apache.org/repos/asf/incubator-mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mesos/commit/76e3e31f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mesos/tree/76e3e31f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mesos/diff/76e3e31f

Branch: refs/heads/master
Commit: 76e3e31f8953a23860de1d4ab71e1f0721b294ca
Parents: 56c20b6
Author: Benjamin Mahler <bm...@twitter.com>
Authored: Fri Jun 14 15:22:54 2013 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Wed Jun 19 20:32:33 2013 -0700

----------------------------------------------------------------------
 src/tests/environment.cpp | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mesos/blob/76e3e31f/src/tests/environment.cpp
----------------------------------------------------------------------
diff --git a/src/tests/environment.cpp b/src/tests/environment.cpp
index 2bdec1f..144480d 100644
--- a/src/tests/environment.cpp
+++ b/src/tests/environment.cpp
@@ -136,6 +136,12 @@ Environment::Environment()
   // First we split the current filter into enabled and disabled tests
   // (which are separated by a '-').
   const string& filter = ::testing::GTEST_FLAG(filter);
+
+  // An empty filter indicates no tests should be run.
+  if (filter.empty()) {
+    return;
+  }
+
   string enabled;
   string disabled;