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
New Test Dependency Handling #1571
New Test Dependency Handling #1571
Conversation
tests/CMakeLists.txt
Outdated
SET(_test_full ${_test}) | ||
GET_FILENAME_COMPONENT(_test ${_test} NAME_WE) | ||
GET_FILENAME_COMPONENT(testname ${_test} NAME_WE) |
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.
it's a temp variable -- make it _testname
?
tests/CMakeLists.txt
Outdated
|
||
IF(_use_test) | ||
|
||
MESSAGE(STATUS "** processing test ${testname}:") |
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.
that's going to produce a lot of output
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.
it all only lands in tests/setup_tests.log
tests/CMakeLists.txt
Outdated
SET(_testlib 'set Additional shared libraries = ./lib${_test}.so') | ||
SET(_testdepends ${_test}) | ||
SET(_testlib 'set Additional shared libraries = ./lib${testname}.so') | ||
SET(_testdepends ${testname}) |
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.
ok, so this weirds me out a bit: you've extracted a testname, and now you're also making ${testname}
into a target that you depend on?
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.
what I'm getting at is that it's weird that the target for the shared lib is called the same as the test.
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.
added a comment. But <xyz>
creates lib<xyz>.so
.
tests/CMakeLists.txt
Outdated
FILE(GLOB_RECURSE _outputs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${_test}/ | ||
${CMAKE_CURRENT_SOURCE_DIR}/${_test}/[a-zA-Z0-9]*) | ||
FILE(GLOB_RECURSE _outputs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${testname}/ | ||
${CMAKE_CURRENT_SOURCE_DIR}/${nametest}/[a-zA-Z0-9]*) |
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 should be ${testname}
in the second line of the command!
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.
yes!
tests/CMakeLists.txt
Outdated
COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/${_test}.prm | ||
${CMAKE_CURRENT_BINARY_DIR}/${_test}.x.prm | ||
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${testname}.x.prm | ||
COMMAND echo "making ${CMAKE_CURRENT_BINARY_DIR}/${testname}.x.prm" |
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.
do you want to keep the echo
?
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.
removed
tests/CMakeLists.txt
Outdated
${CMAKE_CURRENT_SOURCE_DIR} | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
DEPENDS ${_ref_file} | ||
${_run_file}) |
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 thought this was the problem with BYPRODUCT
: ${_run_file}
is an unsatisfiable dependency because we have no targets that produce them. Don't you want to depend on screen-output.notime
here for which there actually is a rule that has it as output?
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.
No. ${_run_file}
is the normalized bla.notime file that is generated by an explicit rule.
tests/CMakeLists.txt
Outdated
# in subdirectories (for example solution/solution...), so replace them. | ||
STRING(REPLACE "/" "-" _target_name ${testname}.${_name}.diff) | ||
ADD_CUSTOM_TARGET(${_target_name} | ||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/output-${testname}/${_name}.diff) |
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 is one of the phony targets you couldn't get rid of
tests/CMakeLists.txt
Outdated
# STRING(REPLACE "/" "-" _target_name_copy_output make-${_test}-${_output}.cmp.notime) | ||
# ADD_CUSTOM_TARGET(${_target_name_copy_output}# | ||
# DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/output-${_test}/${_output}.cmp.notime) | ||
# ADD_DEPENDENCIES(${_test}.normalize ${_target_name_copy_output}) |
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.
what's happening here with these commented out things? same in the following lines?
ping? |
pong! |
b485073
to
7fea806
Compare
What do we do about this PR? We could disable rerunning cmake in the tests/ subdirectory automatically (only on |
Oh, I missed that you had made the requested changes. Let's give it a shot! |
No description provided.