Skip to content

Commit

Permalink
clean up cmakelist
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Apr 26, 2024
1 parent 0775550 commit 3b70376
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
8 changes: 5 additions & 3 deletions ruby/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,16 @@ if(BUILD_TESTING)
string(REGEX MATCH "/?([A-Za-z_0-9 ]+)\\.rb" FILE_NAME ${f})
string(REGEX REPLACE "/?([A-Za-z_0-9 ]+)\\.rb" "\\1" FILE_NAME ${FILE_NAME})

set(CTEST_NAME "RubyTest-${FILE_NAME}-${TEST_NAME}")

# Call with Ruby itself
add_test(NAME "RubyTest-${FILE_NAME}-${TEST_NAME}"
add_test(NAME "${CTEST_NAME}"
COMMAND "${CMAKE_COMMAND}" -E chdir "${CMAKE_CURRENT_BINARY_DIR}"
"${SYSTEM_RUBY_EXECUTABLE}" "-I" "$<TARGET_FILE_DIR:openstudio_rb>" "${f}" "--name=test_${TEST_NAME}"
)

set_tests_properties("RubyTest-${FILE_NAME}-${TEST_NAME}" PROPERTIES TIMEOUT 660 )
set_tests_properties("${CTEST_NAME}" PROPERTIES TIMEOUT 660 )
endforeach()

endforeach()

endif()
Expand Down
10 changes: 2 additions & 8 deletions src/cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,8 @@ if(BUILD_TESTING)
)

set_tests_properties("${CTEST_NAME}" PROPERTIES TIMEOUT 660 )

if(TEST_NAME MATCHES "should_fail")
set_tests_properties("${CTEST_NAME}" PROPERTIES WILL_FAIL TRUE)
set_tests_properties("${CTEST_NAME}" PROPERTIES
PASS_REGULAR_EXPRESSION "Expected false to be truthy"
)
endif()

endforeach()

endforeach()

endif()

0 comments on commit 3b70376

Please sign in to comment.