-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add comment to explain how to run inference test #10430
Conversation
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.
LGTM
@@ -24,6 +24,10 @@ function(inference_test TARGET_NAME) | |||
endforeach() | |||
endfunction(inference_test) | |||
|
|||
#################### | |||
# Inference tests here depend on fluid/tests/book | |||
# User need to run tests in fluid/tests/book first to generate saved model. |
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.
line 22 set_tests_properties(test_inference_${TARGET_NAME}${arg} PROPERTIES DEPENDS test_${TARGET_NAME})
already do this depends. So users need not to manually run tests to generated saved model before.
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.
But when I ran "ctest -R test_inference_word2vec", the test failed. After I ran "ctest -R test_word2vec", then ran "ctest -R test_inference_word2vec", it passed.
Does the "DEPENDS" really work?
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.
When we use make test
to run all the unittests, this DEPENDS
can make sure the order. However, if users want to run ctest -R test_inference_word2vec
separately, he need to run ctest -R test_word2vec
manually first.
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.
Thanks for explain. Updated the comments.
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.
LGTM
No description provided.