You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2013/03/15 20:14:29 UTC

svn commit: r1457072 - /incubator/mesos/trunk/src/tests/environment.cpp

Author: benh
Date: Fri Mar 15 19:14:29 2013
New Revision: 1457072

URL: http://svn.apache.org/r1457072
Log:
Fixed bug when selectively enabling tests that use the
CgroupsIsolationModule type parameter.

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

Modified:
    incubator/mesos/trunk/src/tests/environment.cpp

Modified: incubator/mesos/trunk/src/tests/environment.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/environment.cpp?rev=1457072&r1=1457071&r2=1457072&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/environment.cpp (original)
+++ incubator/mesos/trunk/src/tests/environment.cpp Fri Mar 15 19:14:29 2013
@@ -83,7 +83,8 @@ static bool enable(const ::testing::Test
 
   // Now check the type parameter.
   if (test.type_param() != NULL) {
-    if (string(test.type_param()) == "CgroupsIsolationModule" &&
+    const string& type = test.type_param();
+    if (strings::contains(type, "CgroupsIsolationModule") &&
         (os::user() != "root" || !os::exists("/proc/cgroups"))) {
       return false;
     }