|
|
|
@ -311,6 +311,8 @@ function(cc_test TARGET_NAME)
|
|
|
|
|
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cpu_deterministic=true)
|
|
|
|
|
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_init_allocated_mem=true)
|
|
|
|
|
set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true)
|
|
|
|
|
# No unit test should exceed 10 minutes.
|
|
|
|
|
set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 600)
|
|
|
|
|
endif()
|
|
|
|
|
endfunction(cc_test)
|
|
|
|
|
|
|
|
|
@ -629,6 +631,8 @@ function(py_test TARGET_NAME)
|
|
|
|
|
PYTHONPATH=${PADDLE_BINARY_DIR}/python ${py_test_ENVS}
|
|
|
|
|
${PYTHON_EXECUTABLE} -u ${py_test_SRCS} ${py_test_ARGS}
|
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
# No unit test should exceed 10 minutes.
|
|
|
|
|
set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 600)
|
|
|
|
|
endif()
|
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
|
|