Adds test which validates errors for missing configs (#75)
* Adds test which validates errors for missing configs - updates timemory submodule with fix for protection against recursion * Removed PASS_REGULAR_EXPRESSION - this seems to have different behaviors depending on cmake version
Tá an tiomantas seo le fáil i:
tiomanta ag
GitHub
tuismitheoir
da07d88f99
tiomantas
22bcc2efd9
Díoltóir
+1
-1
Nuashonraíodh fomhodúl external/timemory: ff2f23167b...e4e430931c
@@ -437,6 +437,49 @@ function(OMNITRACE_ADD_PYTHON_TEST)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# -------------------------------------------------------------------------------------- #
|
||||
#
|
||||
# general config file tests
|
||||
#
|
||||
# -------------------------------------------------------------------------------------- #
|
||||
file(
|
||||
WRITE ${CMAKE_CURRENT_BINARY_DIR}/invalid.cfg
|
||||
"
|
||||
FOOBAR = ON
|
||||
")
|
||||
|
||||
if(TARGET parallel-overhead)
|
||||
set(_CONFIG_TEST_EXE $<TARGET_FILE:parallel-overhead>)
|
||||
else()
|
||||
set(_CONFIG_TEST_EXE ls)
|
||||
endif()
|
||||
|
||||
add_test(
|
||||
NAME omnitrace-invalid-config
|
||||
COMMAND $<TARGET_FILE:omnitrace-exe> -- ${_CONFIG_TEST_EXE}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
omnitrace-invalid-config
|
||||
PROPERTIES ENVIRONMENT
|
||||
"OMNITRACE_CONFIG_FILE=${CMAKE_CURRENT_BINARY_DIR}/invalid.cfg" TIMEOUT
|
||||
120 LABELS "config" WILL_FAIL ON)
|
||||
|
||||
add_test(
|
||||
NAME omnitrace-missing-config
|
||||
COMMAND $<TARGET_FILE:omnitrace-exe> -- ${_CONFIG_TEST_EXE}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
|
||||
|
||||
set_tests_properties(
|
||||
omnitrace-missing-config
|
||||
PROPERTIES ENVIRONMENT
|
||||
"OMNITRACE_CONFIG_FILE=${CMAKE_CURRENT_BINARY_DIR}/missing.cfg" TIMEOUT
|
||||
120 LABELS "config" WILL_FAIL ON)
|
||||
|
||||
# -------------------------------------------------------------------------------------- #
|
||||
#
|
||||
# binary-rewrite and runtime-instrumentation tests
|
||||
#
|
||||
# -------------------------------------------------------------------------------------- #
|
||||
|
||||
omnitrace_add_test(
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir