Skip to content

Commit

Permalink
cleaned up multiplatform smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed Jul 28, 2024
1 parent 49a64d4 commit c8b31db
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions NFsim_v1.11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,19 @@ add_executable(${exe_target} ${SRC_FILES})
target_link_libraries(${exe_target} vcommons vcellmessaging)

if (MINGW)
set(test_src_dir ${CMAKE_CURRENT_SOURCE_DIR}/tests/test1)
set(test_nfsim_exe ${CMAKE_BINARY_DIR}/bin/${exe_target}.exe)
add_test(NAME ${exe_target}_test1 COMMAND py ${test_src_dir}/test1.py ${test_nfsim_exe} WORKING_DIRECTORY ${test_src_dir})
add_test(NAME ${exe_target}_test2 COMMAND bash -c "${test_src_dir}/test2.sh ${test_nfsim_exe}" WORKING_DIRECTORY ${test_src_dir})
set(python_cmd py)
else (MINGW)
set(test_src_dir ${CMAKE_CURRENT_SOURCE_DIR}/tests/test1)
set(test_nfsim_exe ${CMAKE_BINARY_DIR}/bin/${exe_target})
add_test(NAME ${exe_target}_test1 COMMAND python3 ${test_src_dir}/test1.py ${test_nfsim_exe} WORKING_DIRECTORY ${test_src_dir})
# add_test(NAME ${exe_target}_test2 COMMAND ${test_src_dir}/test2.sh ${test_nfsim_exe} WORKING_DIRECTORY ${test_src_dir})
add_test(NAME ${exe_target}_test2 COMMAND bash -c "${test_src_dir}/test2.sh ${test_nfsim_exe}" WORKING_DIRECTORY ${test_src_dir})
set(python_cmd python3)
endif (MINGW)
set(test_dir ${CMAKE_CURRENT_SOURCE_DIR}/tests/test1)

# smoke test as a python script
add_test(NAME ${exe_target}_test1 COMMAND ${python_cmd} ${test_dir}/test1.py ${test_nfsim_exe} WORKING_DIRECTORY ${test_dir})

# smoke test as a bash script
add_test(NAME ${exe_target}_test2 COMMAND bash -c "${test_dir}/test2.sh ${test_nfsim_exe}" WORKING_DIRECTORY ${test_dir})

install(TARGETS ${exe_target} RUNTIME DESTINATION ${OPTION_EXE_DIRECTORY})

0 comments on commit c8b31db

Please sign in to comment.