From d00558bbdb828ddcd713446e6256d6c0d0430e04 Mon Sep 17 00:00:00 2001 From: John Szakmeister Date: Fri, 8 May 2015 06:07:56 -0400 Subject: [PATCH] build: create prereq targets for test dependencies This will help make sure that we build all the right prereqs before manually running tests under QuickBuild. Notice that shell-test has been added as a prereq for the functional tests, since it's a requirement for testing the terminal features. --- CMakeLists.txt | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 345d7b8ff6..513614b820 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -316,6 +316,20 @@ if(BUSTED_PRG) test/config/paths.lua.in ${CMAKE_BINARY_DIR}/test/config/paths.lua) + set(UNITTEST_PREREQS nvim-test unittest-headers) + set(FUNCTIONALTEST_PREREQS nvim tty-test shell-test) + set(BENCHMARK_PREREQS nvim tty-test) + + # Useful for automated build systems, if they want to manually run the tests. + add_custom_target(unittest-prereqs + DEPENDS ${UNITTEST_PREREQS}) + + add_custom_target(functionaltest-prereqs + DEPENDS ${FUNCTIONALTEST_PREREQS}) + + add_custom_target(benchmark-prereqs + DEPENDS ${BENCHMARK_PREREQS}) + add_custom_target(unittest COMMAND ${CMAKE_COMMAND} -DBUSTED_PRG=${BUSTED_PRG} @@ -326,7 +340,7 @@ if(BUSTED_PRG) -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=unit -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake - DEPENDS nvim-test unittest-headers) + DEPENDS ${UNITTEST_PREREQS}) add_custom_target(functionaltest COMMAND ${CMAKE_COMMAND} @@ -338,7 +352,7 @@ if(BUSTED_PRG) -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=functional -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake - DEPENDS nvim tty-test) + DEPENDS ${FUNCTIONALTEST_PREREQS}) add_custom_target(benchmark COMMAND ${CMAKE_COMMAND} @@ -350,5 +364,5 @@ if(BUSTED_PRG) -DBUILD_DIR=${CMAKE_BINARY_DIR} -DTEST_TYPE=benchmark -P ${PROJECT_SOURCE_DIR}/cmake/RunTests.cmake - DEPENDS nvim tty-test) + DEPENDS ${BENCHMARK_PREREQS}) endif()