未验证 提交 d7b7dcd1 编写于 作者: Q Qi Li 提交者: GitHub

fix cmake dependencies of test_recognize_digits, test=develop (#27475)

上级 292b24aa
...@@ -26,7 +26,7 @@ function(train_test TARGET_NAME) ...@@ -26,7 +26,7 @@ function(train_test TARGET_NAME)
ARGS --dirname=${PYTHON_TESTS_DIR}/book/${TARGET_NAME}${arg}.train.model/) ARGS --dirname=${PYTHON_TESTS_DIR}/book/${TARGET_NAME}${arg}.train.model/)
endif() endif()
set_tests_properties(test_train_${TARGET_NAME}${arg} set_tests_properties(test_train_${TARGET_NAME}${arg}
PROPERTIES DEPENDS test_${TARGET_NAME}) PROPERTIES FIXTURES_REQUIRED test_${TARGET_NAME}_infer_model)
if(NOT WIN32 AND NOT APPLE) if(NOT WIN32 AND NOT APPLE)
set_tests_properties(test_train_${TARGET_NAME}${arg} set_tests_properties(test_train_${TARGET_NAME}${arg}
PROPERTIES TIMEOUT 150) PROPERTIES TIMEOUT 150)
......
...@@ -4,4 +4,5 @@ string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}") ...@@ -4,4 +4,5 @@ string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
# default test # default test
foreach(src ${TEST_OPS}) foreach(src ${TEST_OPS})
py_test(${src} SRCS ${src}.py) py_test(${src} SRCS ${src}.py)
set_tests_properties(${src} PROPERTIES FIXTURES_SETUP ${src}_infer_model)
endforeach() endforeach()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册