-
Notifications
You must be signed in to change notification settings - Fork 35
Enable logger in UMF tests #470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
test/CMakeLists.txt
Outdated
@@ -75,6 +75,10 @@ function(add_umf_test) | |||
COMMAND ${TEST_TARGET_NAME} | |||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | |||
|
|||
set_property( | |||
TEST ${TEST_NAME} | |||
PROPERTY ENVIRONMENT "UMF_LOG=level:debug\;flush:debug\;output:stdout") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh, I'm lovin' it! 😄
will this work with set_tests_properties
down below, though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be merged leaving just set_tests_properties
and providing two properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I've merged it.
test/CMakeLists.txt
Outdated
@@ -75,6 +75,10 @@ function(add_umf_test) | |||
COMMAND ${TEST_TARGET_NAME} | |||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | |||
|
|||
set_property( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you pls do similar change for add_umf_benchmark
and in examples/CMakeLists.txt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this can ever be overridden by setting environment variables for scenarios where we would like to have different logging options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid Rafał is right - we can't easily override the value...
I'm not sure how important of use case is that, though... but perhaps we should do this only on CI level.
When I finally add the script to run tests on CI we could set the logger there. For now, if needed we could set the logger in all workflows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll refrain from adding similar change to add_umf_benchmark
then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, due to the inflexibility of my change, I'll close this PR. Eventual logging changes will be done after @lukaszstolarczuk's CI script.
test/CMakeLists.txt
Outdated
@@ -75,6 +75,10 @@ function(add_umf_test) | |||
COMMAND ${TEST_TARGET_NAME} | |||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | |||
|
|||
set_property( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this can ever be overridden by setting environment variables for scenarios where we would like to have different logging options
f0ba65a
to
9088062
Compare
It's easier to spot the cause of errors in tests with log messages.
Description
Checklist