Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.    
 
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.
Paddle/paddle/fluid/inference/tests/book/CMakeLists.txt
Lines 22 to 23 in e00c1ee
python单测的名字是test_xxx,而inference_test_ARGS的名字是api_impl,没对上导致依赖没生效。
所以仿照
paddle/fluid/inference/tests/book/CMakeLists.txt再来改一下就可以了。Uh oh!
There was an error while loading. Please reload this page.
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.
@luotao1 I think you may not understand this correctly. In the file, I call the function like this:
inference_api_test(api_impl
ARGS test_word2vec test_image_classification)
after parsing,
the variable "inference_test_ARGS" should be "test_word2vec; test_image_classification" which is correct.
when I use:
set_tests_properties(test_paddle_inference_${TARGET_NAME}
PROPERTIES DEPENDS "${inference_test_ARGS}")
it will be interpreted as this:
set_tests_properties(test_paddle_inference_api_impl PROPERTIES DEPENDS "test_word2vec; test_image_classification" )
You can read this reference: https://cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html
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.
Got it.