You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2016/11/29 00:20:33 UTC

[04/23] mesos git commit: CMake: Added build variables for Mesos tests.

CMake: Added build variables for Mesos tests.

The patch simply adds the mesos-tests target and renames the
existing `TEST_HELPER_*` definitions to `MESOS_TEST_*`.
The dependencies for the `test-helper` and the actual tests will
be identical.

This review replaces: https://reviews.apache.org/r/49688/

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


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

Branch: refs/heads/master
Commit: 94c1681ad641544b7085f0064c2d957a084c4821
Parents: 2e6311e
Author: Srinivas Brahmaroutu <sr...@us.ibm.com>
Authored: Mon Nov 28 15:32:31 2016 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Nov 28 15:39:26 2016 -0800

----------------------------------------------------------------------
 src/tests/CMakeLists.txt                  |  8 ++++----
 src/tests/cmake/MesosTestsConfigure.cmake | 27 +++++++++++++++++---------
 2 files changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/94c1681a/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 9351de8..a21a38d 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -42,11 +42,11 @@ endif (LINUX)
 
 # INCLUDE DIRECTIVES (generates, e.g., -I/path/to/thing on Linux).
 ##################################################################
-include_directories(${TEST_HELPER_INCLUDE_DIRS})
+include_directories(${MESOS_TESTS_INCLUDE_DIRS})
 
 # LINKING LIBRARIES (might generate, e.g., -L/path/to/thing on Linux).
 ######################################################################
-link_directories(${TEST_HELPER_LIB_DIRS})
+link_directories(${MESOS_TESTS_LIB_DIRS})
 
 # THE TEST AND HELPER EXECUTABLEs (generates, e.g., stout_tests, etc., on Linux).
 #################################$###############################################
@@ -54,8 +54,8 @@ add_executable(${TEST_HELPER_TARGET} ${TEST_HELPER_SRC})
 
 # ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
 ######################################################
-target_link_libraries(${TEST_HELPER_TARGET} ${TEST_HELPER_LIBS})
+target_link_libraries(${TEST_HELPER_TARGET} ${MESOS_TESTS_LIBS})
 
 # ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
 ####################################################################
-add_dependencies(${TEST_HELPER_TARGET} ${TEST_HELPER_DEPENDENCIES})
+add_dependencies(${TEST_HELPER_TARGET} ${MESOS_TESTS_DEPENDENCIES})

http://git-wip-us.apache.org/repos/asf/mesos/blob/94c1681a/src/tests/cmake/MesosTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/tests/cmake/MesosTestsConfigure.cmake b/src/tests/cmake/MesosTestsConfigure.cmake
index cf00886..a931781 100644
--- a/src/tests/cmake/MesosTestsConfigure.cmake
+++ b/src/tests/cmake/MesosTestsConfigure.cmake
@@ -15,8 +15,13 @@
 # limitations under the License.
 
 set(
+  MESOS_TESTS_TARGET mesos-tests
+  CACHE STRING "Target we use to refer to tests for the mesos"
+  )
+
+set(
   TEST_HELPER_TARGET test-helper
-  CACHE STRING "Test helper target to run tests that require a subprocess."
+  CACHE STRING "Test helper target to run tests that require a subprocess"
   )
 
 # COMPILER CONFIGURATION.
@@ -40,8 +45,8 @@ add_definitions(-DSBINDIR="${S_BIN_DIR}")
 # DEFINE PROCESS LIBRARY DEPENDENCIES. Tells the process library build targets
 # download/configure/build all third-party libraries before attempting to build.
 ################################################################################
-set(TEST_HELPER_DEPENDENCIES
-  ${TEST_HELPER_DEPENDENCIES}
+set(MESOS_TESTS_DEPENDENCIES
+  ${MESOS_TESTS_DEPENDENCIES}
   ${MESOS_TARGET}
   ${GMOCK_TARGET}
   )
@@ -49,8 +54,9 @@ set(TEST_HELPER_DEPENDENCIES
 # DEFINE THIRD-PARTY INCLUDE DIRECTORIES. Tells compiler toolchain where to get
 # headers for our third party libs (e.g., -I/path/to/glog on Linux)..
 ###############################################################################
-set(TEST_HELPER_INCLUDE_DIRS
-  ${TEST_HELPER_INCLUDE_DIRS}
+set(MESOS_TESTS_INCLUDE_DIRS
+  ${MESOS_TESTS_INCLUDE_DIRS}
+  ${AGENT_INCLUDE_DIRS}
   ${GMOCK_INCLUDE_DIR}
   ${GTEST_INCLUDE_DIR}
   )
@@ -59,17 +65,20 @@ set(TEST_HELPER_INCLUDE_DIRS
 # toolchain where to find our third party libs (e.g., -L/path/to/glog on
 # Linux).
 ########################################################################
-set(TEST_HELPER_LIB_DIRS
-  ${TEST_HELPER_LIB_DIRS}
+set(MESOS_TESTS_LIB_DIRS
+  ${MESOS_TESTS_LIB_DIRS}
+  ${GMOCK_LIB_DIR}
   ${GTEST_LIB_DIR}
   )
 
 # DEFINE THIRD-PARTY LIBS. Used to generate flags that the linker uses to
 # include our third-party libs (e.g., -lglog on Linux).
 #########################################################################
-set(TEST_HELPER_LIBS
-  ${TEST_HELPER_LIBS}
+set(MESOS_TESTS_LIBS
+  ${MESOS_TESTS_LIBS}
   ${MESOS_TARGET}
   ${PROCESS_TARGET}
+  ${MESOS_LIBS}
+  ${GMOCK_LFLAG}
   ${GTEST_LFLAG}
   )