From ea88ec90b3259844acb270fdbd6dc0920650647e Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 19 Oct 2019 23:15:05 -0500 Subject: CMake: Move tests to their respective target CMakeLists --- CMakeLists.txt | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 7f6e555..8221928 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,28 +28,9 @@ IF(COVERAGE) ENDIF(COVERAGE) include_directories(.) +enable_testing() add_subdirectory(hscript) IF(BUILD_TOOLS) add_subdirectory(tools) ENDIF(BUILD_TOOLS) - -enable_testing() -IF(BUILD_TOOLS) - add_test(NAME "RSpecValidator" - COMMAND rspec spec/validator.rb - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests) - set_property(TEST "RSpecValidator" - PROPERTY ENVIRONMENT "PATH=$PATH:${CMAKE_CURRENT_BINARY_DIR}/tools/hscript-validate") - add_test(NAME "RSpecSimulator" - COMMAND rspec spec/simulator.rb - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests) - set_property(TEST "RSpecSimulator" - PROPERTY ENVIRONMENT "PATH=$PATH:${CMAKE_CURRENT_BINARY_DIR}/tools/hscript-simulate") - IF(VALGRIND) - add_test(NAME "ValgrindValidator" - COMMAND valgrind ${CMAKE_CURRENT_BINARY_DIR}/tools/hscript-validate/hscript-validate tests/fixtures/0001-basic.installfile) - add_test(NAME "ValgrindSimulator" - COMMAND valgrind ${CMAKE_CURRENT_BINARY_DIR}/tools/hscript-simulate/hscript-simulate tests/fixtures/0001-basic.installfile) - ENDIF(VALGRIND) -ENDIF(BUILD_TOOLS) -- cgit v1.2.3-60-g2f50