summaryrefslogtreecommitdiff
path: root/tools/hscript-simulate
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-20 01:36:46 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-20 01:36:46 -0500
commitc8e91af6c8bf7566829a9812f5ff047f1f1e9570 (patch)
tree24208ce418e20d5bc37fcf03e333ce718345ddf7 /tools/hscript-simulate
parentf490a429d28069fd40ed711adfea13e0c4cd0651 (diff)
downloadhorizon-c8e91af6c8bf7566829a9812f5ff047f1f1e9570.tar.gz
horizon-c8e91af6c8bf7566829a9812f5ff047f1f1e9570.tar.bz2
horizon-c8e91af6c8bf7566829a9812f5ff047f1f1e9570.tar.xz
horizon-c8e91af6c8bf7566829a9812f5ff047f1f1e9570.zip
CMake: Make lcov and RSpec first-class targets
Diffstat (limited to 'tools/hscript-simulate')
-rw-r--r--tools/hscript-simulate/CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/hscript-simulate/CMakeLists.txt b/tools/hscript-simulate/CMakeLists.txt
index 98ec9e4..45e8d95 100644
--- a/tools/hscript-simulate/CMakeLists.txt
+++ b/tools/hscript-simulate/CMakeLists.txt
@@ -6,12 +6,15 @@ target_link_libraries(hscript-simulate hscript)
install(TARGETS hscript-simulate DESTINATION bin)
+IF(RSPEC_EXECUTABLE)
add_test(NAME "RSpecSimulator"
- COMMAND rspec spec/simulator_spec.rb
+ COMMAND ${RSPEC_EXECUTABLE} spec/simulator_spec.rb
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests)
set_property(TEST "RSpecSimulator"
PROPERTY ENVIRONMENT "PATH=$PATH:${CMAKE_CURRENT_BINARY_DIR}")
+ENDIF(RSPEC_EXECUTABLE)
+
IF(VALGRIND)
add_test(NAME "ValgrindSimulator"
- COMMAND valgrind ${CMAKE_CURRENT_BINARY_DIR}/hscript-simulate ${CMAKE_SOURCE_DIR}/tests/fixtures/0001-basic.installfile)
+ COMMAND ${VALGRIND_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/hscript-simulate ${CMAKE_SOURCE_DIR}/tests/fixtures/0001-basic.installfile)
ENDIF(VALGRIND)