From 404162babeb98251634f87bd8a4ae740dd56126c Mon Sep 17 00:00:00 2001 From: Ainavo <57820731+Ainavo@users.noreply.github.com> Date: Fri, 31 Mar 2023 15:27:26 +0800 Subject: [PATCH] [Test Mv] move dygraph_to_static to test dir (#52069) --- .flake8 | 6 +- .pre-commit-config.yaml | 2 +- pyproject.toml | 4 +- .../fluid/tests/unittests/CMakeLists.txt | 1 - test/CMakeLists.txt | 64 ++++++++++++++++++- .../dygraph_to_static/CMakeLists.txt | 0 .../dygraph_to_static/bert_dygraph_model.py | 0 .../dygraph_to_static/bert_utils.py | 0 .../dygraph_to_static/darknet.py | 0 .../dygraph_to_static/decos.py | 0 .../dygraph_to_static/ifelse_simple_func.py | 0 .../dygraph_to_static/predictor_utils.py | 0 .../seq2seq_dygraph_model.py | 0 .../dygraph_to_static/seq2seq_utils.py | 0 .../dygraph_to_static/simnet_dygraph_model.py | 0 .../simnet_dygraph_model_v2.py | 0 .../dygraph_to_static/test_assert.py | 0 .../dygraph_to_static/test_ast_util.py | 0 .../test_backward_without_params.py | 0 .../test_basic_api_transformation.py | 0 .../dygraph_to_static/test_bert.py | 0 .../dygraph_to_static/test_bmn.py | 0 .../dygraph_to_static/test_break_continue.py | 0 .../dygraph_to_static/test_build_strategy.py | 0 .../dygraph_to_static/test_cache_program.py | 0 .../dygraph_to_static/test_cast.py | 0 .../dygraph_to_static/test_cinn.py | 0 .../dygraph_to_static/test_cinn_prim.py | 0 .../dygraph_to_static/test_cinn_prim_gelu.py | 0 .../test_cinn_prim_layer_norm.py | 0 .../dygraph_to_static/test_cinn_prim_mean.py | 0 .../test_closure_analysis.py | 0 .../dygraph_to_static/test_container.py | 0 .../dygraph_to_static/test_convert_call.py | 0 .../test_convert_call_generator.py | 0 .../test_convert_operators.py | 0 .../test_cpu_cuda_to_tensor.py | 0 .../dygraph_to_static/test_cycle_gan.py | 0 .../dygraph_to_static/test_declarative.py | 0 .../test_decorator_transform.py | 0 .../dygraph_to_static/test_deepcopy.py | 0 .../dygraph_to_static/test_dict.py | 0 .../dygraph_to_static/test_drop_path.py | 0 .../test_duplicate_output.py | 0 .../dygraph_to_static/test_error.py | 0 .../dygraph_to_static/test_fallback.py | 0 .../dygraph_to_static/test_fetch_feed.py | 0 .../dygraph_to_static/test_for_enumerate.py | 0 .../dygraph_to_static/test_full_name_usage.py | 0 .../dygraph_to_static/test_function_spec.py | 0 .../dygraph_to_static/test_grad.py | 0 .../test_gradient_aggregation.py | 0 .../dygraph_to_static/test_grid_generator.py | 0 .../dygraph_to_static/test_ifelse.py | 0 .../dygraph_to_static/test_ifelse_basic.py | 0 .../dygraph_to_static/test_ignore_module.py | 0 .../dygraph_to_static/test_isinstance.py | 0 .../test_jit_property_save.py | 0 .../dygraph_to_static/test_lac.py | 0 .../dygraph_to_static/test_lambda.py | 0 .../dygraph_to_static/test_layer_hook.py | 0 .../dygraph_to_static/test_len.py | 0 .../dygraph_to_static/test_list.py | 0 .../test_load_transformer.py | 0 .../dygraph_to_static/test_logging_utils.py | 0 .../dygraph_to_static/test_logical.py | 0 .../dygraph_to_static/test_loop.py | 0 .../dygraph_to_static/test_lstm.py | 0 .../dygraph_to_static/test_mnist.py | 0 .../dygraph_to_static/test_mnist_amp.py | 0 .../dygraph_to_static/test_mnist_pure_fp16.py | 0 .../dygraph_to_static/test_mobile_net.py | 0 .../dygraph_to_static/test_multi_forward.py | 0 .../dygraph_to_static/test_op_attr.py | 0 .../dygraph_to_static/test_origin_info.py | 0 .../dygraph_to_static/test_param_guard.py | 0 .../dygraph_to_static/test_params_no_grad.py | 0 .../dygraph_to_static/test_partial_program.py | 0 .../test_partial_program_hook.py | 0 .../dygraph_to_static/test_place.py | 0 .../dygraph_to_static/test_print.py | 0 .../test_program_translator.py | 0 .../dygraph_to_static/test_ptb_lm.py | 0 .../dygraph_to_static/test_ptb_lm_v2.py | 0 .../test_reinforcement_learning.py | 0 .../dygraph_to_static/test_resnet.py | 0 .../dygraph_to_static/test_resnet_amp.py | 0 .../test_resnet_pure_fp16.py | 0 .../dygraph_to_static/test_resnet_v2.py | 0 .../dygraph_to_static/test_return.py | 0 .../dygraph_to_static/test_rollback.py | 0 .../test_save_inference_model.py | 0 .../dygraph_to_static/test_save_load.py | 0 .../dygraph_to_static/test_se_resnet.py | 0 .../dygraph_to_static/test_sentiment.py | 0 .../dygraph_to_static/test_seq2seq.py | 0 .../dygraph_to_static/test_setter_helper.py | 0 .../dygraph_to_static/test_simnet.py | 0 .../dygraph_to_static/test_simnet_v2.py | 0 .../dygraph_to_static/test_slice.py | 0 .../dygraph_to_static/test_spec_names.py | 0 .../dygraph_to_static/test_static_analysis.py | 0 .../dygraph_to_static/test_tensor_methods.py | 0 .../dygraph_to_static/test_tensor_shape.py | 0 .../dygraph_to_static/test_to_tensor.py | 0 .../dygraph_to_static/test_transformer.py | 0 .../dygraph_to_static/test_tsm.py | 0 .../dygraph_to_static/test_typehint.py | 0 .../dygraph_to_static/test_typing.py | 0 .../dygraph_to_static/test_unuseful_inputs.py | 0 .../dygraph_to_static/test_utils.py | 0 .../test_variable_trans_func.py | 0 .../dygraph_to_static/test_warning.py | 0 .../dygraph_to_static/test_word2vec.py | 0 .../test_write_python_container.py | 0 .../dygraph_to_static/test_yolov3.py | 0 .../transformer_dygraph_model.py | 0 .../dygraph_to_static/transformer_util.py | 0 .../dygraph_to_static/tsm.yaml | 0 .../dygraph_to_static/tsm_config_utils.py | 0 .../dygraph_to_static/yolov3.py | 0 121 files changed, 69 insertions(+), 8 deletions(-) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/CMakeLists.txt (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/bert_dygraph_model.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/bert_utils.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/darknet.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/decos.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/ifelse_simple_func.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/predictor_utils.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/seq2seq_dygraph_model.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/seq2seq_utils.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/simnet_dygraph_model.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/simnet_dygraph_model_v2.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_assert.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_ast_util.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_backward_without_params.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_basic_api_transformation.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_bert.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_bmn.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_break_continue.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_build_strategy.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_cache_program.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_cast.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_cinn.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_cinn_prim.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_cinn_prim_gelu.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_cinn_prim_layer_norm.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_cinn_prim_mean.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_closure_analysis.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_container.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_convert_call.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_convert_call_generator.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_convert_operators.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_cpu_cuda_to_tensor.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_cycle_gan.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_declarative.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_decorator_transform.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_deepcopy.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_dict.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_drop_path.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_duplicate_output.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_error.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_fallback.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_fetch_feed.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_for_enumerate.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_full_name_usage.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_function_spec.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_grad.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_gradient_aggregation.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_grid_generator.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_ifelse.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_ifelse_basic.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_ignore_module.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_isinstance.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_jit_property_save.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_lac.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_lambda.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_layer_hook.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_len.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_list.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_load_transformer.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_logging_utils.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_logical.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_loop.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_lstm.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_mnist.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_mnist_amp.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_mnist_pure_fp16.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_mobile_net.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_multi_forward.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_op_attr.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_origin_info.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_param_guard.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_params_no_grad.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_partial_program.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_partial_program_hook.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_place.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_print.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_program_translator.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_ptb_lm.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_ptb_lm_v2.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_reinforcement_learning.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_resnet.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_resnet_amp.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_resnet_pure_fp16.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_resnet_v2.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_return.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_rollback.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_save_inference_model.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_save_load.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_se_resnet.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_sentiment.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_seq2seq.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_setter_helper.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_simnet.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_simnet_v2.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_slice.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_spec_names.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_static_analysis.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_tensor_methods.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_tensor_shape.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_to_tensor.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_transformer.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_tsm.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_typehint.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_typing.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_unuseful_inputs.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_utils.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_variable_trans_func.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_warning.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_word2vec.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_write_python_container.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/test_yolov3.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/transformer_dygraph_model.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/transformer_util.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/tsm.yaml (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/tsm_config_utils.py (100%) rename {python/paddle/fluid/tests/unittests => test}/dygraph_to_static/yolov3.py (100%) diff --git a/.flake8 b/.flake8 index d87d6b43e3a..b051678b00e 100644 --- a/.flake8 +++ b/.flake8 @@ -35,11 +35,11 @@ ignore = W503 per-file-ignores = # These files need tabs for testing. - python/paddle/fluid/tests/unittests/dygraph_to_static/test_error.py:E101,W191 + test/dygraph_to_static/test_error.py:E101,W191 python/paddle/fluid/tests/unittests/collective/fleet/test_hdfs1.py:E101,W191 # Ignore unused imports in __init__.py __init__.py: F401 # Ignore undefined variables in CMake config and some dygraph_to_static tests .cmake-format.py: F821 - python/paddle/fluid/tests/unittests/dygraph_to_static/test_loop.py: F821 - python/paddle/fluid/tests/unittests/dygraph_to_static/test_closure_analysis.py: F821 + test/dygraph_to_static/test_loop.py: F821 + test/dygraph_to_static/test_closure_analysis.py: F821 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ccf1db464d3..4cca44992dd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,7 +40,7 @@ repos: (?x)^( python/paddle/fluid/(?!tests).+| python/paddle/fluid/tests/unittests/collective/fleet/test_hdfs1.py| - python/paddle/fluid/tests/unittests/dygraph_to_static/test_error.py + test/dygraph_to_static/test_error.py )$ - repo: local hooks: diff --git a/pyproject.toml b/pyproject.toml index 33f37e59784..baa292e168b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -133,6 +133,6 @@ ignore = [ # Ignore version check in setup.py "setup.py" = ["UP036"] # Ignore unnecessary comprehension in dy2st unittest test_loop -"python/paddle/fluid/tests/unittests/dygraph_to_static/test_loop.py" = ["C416"] +"test/dygraph_to_static/test_loop.py" = ["C416"] # Ignore unnecessary lambda in dy2st unittest test_lambda -"python/paddle/fluid/tests/unittests/dygraph_to_static/test_lambda.py" = ["PLC3002"] +"test/dygraph_to_static/test_lambda.py" = ["PLC3002"] diff --git a/python/paddle/fluid/tests/unittests/CMakeLists.txt b/python/paddle/fluid/tests/unittests/CMakeLists.txt index bdcd4d006ff..7cadb70252b 100755 --- a/python/paddle/fluid/tests/unittests/CMakeLists.txt +++ b/python/paddle/fluid/tests/unittests/CMakeLists.txt @@ -821,7 +821,6 @@ if(NOT WIN32) endif() add_subdirectory(sequence) -add_subdirectory(dygraph_to_static) add_subdirectory(rnn) add_subdirectory(distribution) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7c18c972994..825d19b61b7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,6 +5,68 @@ set(PYTHON_TESTS_DIR ${PADDLE_BINARY_DIR}/test CACHE INTERNAL "python tests directory") +function(py_test_modules TARGET_NAME) + if(WITH_TESTING) + set(options SERIAL) + set(oneValueArgs "") + set(multiValueArgs MODULES DEPS ENVS) + cmake_parse_arguments(py_test_modules "${options}" "${oneValueArgs}" + "${multiValueArgs}" ${ARGN}) + + if(WITH_COVERAGE AND NOT (WITH_INCREMENTAL_COVERAGE + AND "$ENV{PADDLE_GIT_DIFF_PY_FILE}" STREQUAL "")) + if(WITH_ASCEND_CL) + add_test( + NAME ${TARGET_NAME} + COMMAND + ${CMAKE_COMMAND} -E env + PYTHONPATH=${PADDLE_BINARY_DIR}/python:$ENV{PYTHONPATH} + ${py_test_modules_ENVS} + COVERAGE_FILE=${PADDLE_BINARY_DIR}/python-coverage.data + ${PYTHON_EXECUTABLE} -m coverage run --branch -p + ${PADDLE_SOURCE_DIR}/tools/test_runner.py ${py_test_modules_MODULES} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + else() + add_test( + NAME ${TARGET_NAME} + COMMAND + ${CMAKE_COMMAND} -E env PYTHONPATH=${PADDLE_BINARY_DIR}/python + ${py_test_modules_ENVS} + COVERAGE_FILE=${PADDLE_BINARY_DIR}/python-coverage.data + ${PYTHON_EXECUTABLE} -m coverage run --branch -p + ${PADDLE_SOURCE_DIR}/tools/test_runner.py ${py_test_modules_MODULES} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + endif() + else() + if(WITH_ASCEND_CL) + add_test( + NAME ${TARGET_NAME} + COMMAND + ${CMAKE_COMMAND} -E env + PYTHONPATH=${PADDLE_BINARY_DIR}/python:$ENV{PYTHONPATH} + ${py_test_modules_ENVS} ${PYTHON_EXECUTABLE} + ${PADDLE_SOURCE_DIR}/tools/test_runner.py ${py_test_modules_MODULES} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + else() + add_test( + NAME ${TARGET_NAME} + COMMAND + ${CMAKE_COMMAND} -E env PYTHONPATH=${PADDLE_BINARY_DIR}/python + ${py_test_modules_ENVS} ${PYTHON_EXECUTABLE} + ${PADDLE_SOURCE_DIR}/tools/test_runner.py ${py_test_modules_MODULES} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + endif() + endif() + + if(py_test_modules_SERIAL) + set_property(TEST ${TARGET_NAME} PROPERTY RUN_SERIAL 1) + endif() + if(WIN32) + set_tests_properties(${TARGET_NAME} PROPERTIES TIMEOUT 150) + endif() + endif() +endfunction() + function(bash_test_modules TARGET_NAME) if(NOT WITH_TESTING) return() @@ -68,7 +130,7 @@ if(WITH_TESTING) add_subdirectory(dataset) # add_subdirectory(distributed_passes) # add_subdirectory(distribution) - # add_subdirectory(dygraph_to_static) + add_subdirectory(dygraph_to_static) # add_subdirectory(fft) # add_subdirectory(fleet) if(WITH_IPU) diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/CMakeLists.txt b/test/dygraph_to_static/CMakeLists.txt similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/CMakeLists.txt rename to test/dygraph_to_static/CMakeLists.txt diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/bert_dygraph_model.py b/test/dygraph_to_static/bert_dygraph_model.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/bert_dygraph_model.py rename to test/dygraph_to_static/bert_dygraph_model.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/bert_utils.py b/test/dygraph_to_static/bert_utils.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/bert_utils.py rename to test/dygraph_to_static/bert_utils.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/darknet.py b/test/dygraph_to_static/darknet.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/darknet.py rename to test/dygraph_to_static/darknet.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/decos.py b/test/dygraph_to_static/decos.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/decos.py rename to test/dygraph_to_static/decos.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/ifelse_simple_func.py b/test/dygraph_to_static/ifelse_simple_func.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/ifelse_simple_func.py rename to test/dygraph_to_static/ifelse_simple_func.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/predictor_utils.py b/test/dygraph_to_static/predictor_utils.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/predictor_utils.py rename to test/dygraph_to_static/predictor_utils.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/seq2seq_dygraph_model.py b/test/dygraph_to_static/seq2seq_dygraph_model.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/seq2seq_dygraph_model.py rename to test/dygraph_to_static/seq2seq_dygraph_model.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/seq2seq_utils.py b/test/dygraph_to_static/seq2seq_utils.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/seq2seq_utils.py rename to test/dygraph_to_static/seq2seq_utils.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/simnet_dygraph_model.py b/test/dygraph_to_static/simnet_dygraph_model.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/simnet_dygraph_model.py rename to test/dygraph_to_static/simnet_dygraph_model.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/simnet_dygraph_model_v2.py b/test/dygraph_to_static/simnet_dygraph_model_v2.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/simnet_dygraph_model_v2.py rename to test/dygraph_to_static/simnet_dygraph_model_v2.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_assert.py b/test/dygraph_to_static/test_assert.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_assert.py rename to test/dygraph_to_static/test_assert.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ast_util.py b/test/dygraph_to_static/test_ast_util.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_ast_util.py rename to test/dygraph_to_static/test_ast_util.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_backward_without_params.py b/test/dygraph_to_static/test_backward_without_params.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_backward_without_params.py rename to test/dygraph_to_static/test_backward_without_params.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_basic_api_transformation.py b/test/dygraph_to_static/test_basic_api_transformation.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_basic_api_transformation.py rename to test/dygraph_to_static/test_basic_api_transformation.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bert.py b/test/dygraph_to_static/test_bert.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_bert.py rename to test/dygraph_to_static/test_bert.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bmn.py b/test/dygraph_to_static/test_bmn.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_bmn.py rename to test/dygraph_to_static/test_bmn.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_break_continue.py b/test/dygraph_to_static/test_break_continue.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_break_continue.py rename to test/dygraph_to_static/test_break_continue.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_build_strategy.py b/test/dygraph_to_static/test_build_strategy.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_build_strategy.py rename to test/dygraph_to_static/test_build_strategy.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cache_program.py b/test/dygraph_to_static/test_cache_program.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_cache_program.py rename to test/dygraph_to_static/test_cache_program.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cast.py b/test/dygraph_to_static/test_cast.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_cast.py rename to test/dygraph_to_static/test_cast.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cinn.py b/test/dygraph_to_static/test_cinn.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_cinn.py rename to test/dygraph_to_static/test_cinn.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cinn_prim.py b/test/dygraph_to_static/test_cinn_prim.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_cinn_prim.py rename to test/dygraph_to_static/test_cinn_prim.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cinn_prim_gelu.py b/test/dygraph_to_static/test_cinn_prim_gelu.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_cinn_prim_gelu.py rename to test/dygraph_to_static/test_cinn_prim_gelu.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cinn_prim_layer_norm.py b/test/dygraph_to_static/test_cinn_prim_layer_norm.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_cinn_prim_layer_norm.py rename to test/dygraph_to_static/test_cinn_prim_layer_norm.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cinn_prim_mean.py b/test/dygraph_to_static/test_cinn_prim_mean.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_cinn_prim_mean.py rename to test/dygraph_to_static/test_cinn_prim_mean.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_closure_analysis.py b/test/dygraph_to_static/test_closure_analysis.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_closure_analysis.py rename to test/dygraph_to_static/test_closure_analysis.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_container.py b/test/dygraph_to_static/test_container.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_container.py rename to test/dygraph_to_static/test_container.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_convert_call.py b/test/dygraph_to_static/test_convert_call.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_convert_call.py rename to test/dygraph_to_static/test_convert_call.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_convert_call_generator.py b/test/dygraph_to_static/test_convert_call_generator.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_convert_call_generator.py rename to test/dygraph_to_static/test_convert_call_generator.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_convert_operators.py b/test/dygraph_to_static/test_convert_operators.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_convert_operators.py rename to test/dygraph_to_static/test_convert_operators.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cpu_cuda_to_tensor.py b/test/dygraph_to_static/test_cpu_cuda_to_tensor.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_cpu_cuda_to_tensor.py rename to test/dygraph_to_static/test_cpu_cuda_to_tensor.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cycle_gan.py b/test/dygraph_to_static/test_cycle_gan.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_cycle_gan.py rename to test/dygraph_to_static/test_cycle_gan.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_declarative.py b/test/dygraph_to_static/test_declarative.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_declarative.py rename to test/dygraph_to_static/test_declarative.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_decorator_transform.py b/test/dygraph_to_static/test_decorator_transform.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_decorator_transform.py rename to test/dygraph_to_static/test_decorator_transform.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_deepcopy.py b/test/dygraph_to_static/test_deepcopy.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_deepcopy.py rename to test/dygraph_to_static/test_deepcopy.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_dict.py b/test/dygraph_to_static/test_dict.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_dict.py rename to test/dygraph_to_static/test_dict.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_drop_path.py b/test/dygraph_to_static/test_drop_path.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_drop_path.py rename to test/dygraph_to_static/test_drop_path.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_duplicate_output.py b/test/dygraph_to_static/test_duplicate_output.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_duplicate_output.py rename to test/dygraph_to_static/test_duplicate_output.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_error.py b/test/dygraph_to_static/test_error.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_error.py rename to test/dygraph_to_static/test_error.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_fallback.py b/test/dygraph_to_static/test_fallback.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_fallback.py rename to test/dygraph_to_static/test_fallback.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_fetch_feed.py b/test/dygraph_to_static/test_fetch_feed.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_fetch_feed.py rename to test/dygraph_to_static/test_fetch_feed.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_for_enumerate.py b/test/dygraph_to_static/test_for_enumerate.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_for_enumerate.py rename to test/dygraph_to_static/test_for_enumerate.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_full_name_usage.py b/test/dygraph_to_static/test_full_name_usage.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_full_name_usage.py rename to test/dygraph_to_static/test_full_name_usage.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_function_spec.py b/test/dygraph_to_static/test_function_spec.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_function_spec.py rename to test/dygraph_to_static/test_function_spec.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_grad.py b/test/dygraph_to_static/test_grad.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_grad.py rename to test/dygraph_to_static/test_grad.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_gradient_aggregation.py b/test/dygraph_to_static/test_gradient_aggregation.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_gradient_aggregation.py rename to test/dygraph_to_static/test_gradient_aggregation.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_grid_generator.py b/test/dygraph_to_static/test_grid_generator.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_grid_generator.py rename to test/dygraph_to_static/test_grid_generator.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ifelse.py b/test/dygraph_to_static/test_ifelse.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_ifelse.py rename to test/dygraph_to_static/test_ifelse.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ifelse_basic.py b/test/dygraph_to_static/test_ifelse_basic.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_ifelse_basic.py rename to test/dygraph_to_static/test_ifelse_basic.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ignore_module.py b/test/dygraph_to_static/test_ignore_module.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_ignore_module.py rename to test/dygraph_to_static/test_ignore_module.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_isinstance.py b/test/dygraph_to_static/test_isinstance.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_isinstance.py rename to test/dygraph_to_static/test_isinstance.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_jit_property_save.py b/test/dygraph_to_static/test_jit_property_save.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_jit_property_save.py rename to test/dygraph_to_static/test_jit_property_save.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py b/test/dygraph_to_static/test_lac.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py rename to test/dygraph_to_static/test_lac.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lambda.py b/test/dygraph_to_static/test_lambda.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_lambda.py rename to test/dygraph_to_static/test_lambda.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_layer_hook.py b/test/dygraph_to_static/test_layer_hook.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_layer_hook.py rename to test/dygraph_to_static/test_layer_hook.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_len.py b/test/dygraph_to_static/test_len.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_len.py rename to test/dygraph_to_static/test_len.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_list.py b/test/dygraph_to_static/test_list.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_list.py rename to test/dygraph_to_static/test_list.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_load_transformer.py b/test/dygraph_to_static/test_load_transformer.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_load_transformer.py rename to test/dygraph_to_static/test_load_transformer.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_logging_utils.py b/test/dygraph_to_static/test_logging_utils.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_logging_utils.py rename to test/dygraph_to_static/test_logging_utils.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_logical.py b/test/dygraph_to_static/test_logical.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_logical.py rename to test/dygraph_to_static/test_logical.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_loop.py b/test/dygraph_to_static/test_loop.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_loop.py rename to test/dygraph_to_static/test_loop.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lstm.py b/test/dygraph_to_static/test_lstm.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_lstm.py rename to test/dygraph_to_static/test_lstm.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_mnist.py b/test/dygraph_to_static/test_mnist.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_mnist.py rename to test/dygraph_to_static/test_mnist.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_mnist_amp.py b/test/dygraph_to_static/test_mnist_amp.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_mnist_amp.py rename to test/dygraph_to_static/test_mnist_amp.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_mnist_pure_fp16.py b/test/dygraph_to_static/test_mnist_pure_fp16.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_mnist_pure_fp16.py rename to test/dygraph_to_static/test_mnist_pure_fp16.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_mobile_net.py b/test/dygraph_to_static/test_mobile_net.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_mobile_net.py rename to test/dygraph_to_static/test_mobile_net.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_multi_forward.py b/test/dygraph_to_static/test_multi_forward.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_multi_forward.py rename to test/dygraph_to_static/test_multi_forward.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_op_attr.py b/test/dygraph_to_static/test_op_attr.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_op_attr.py rename to test/dygraph_to_static/test_op_attr.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_origin_info.py b/test/dygraph_to_static/test_origin_info.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_origin_info.py rename to test/dygraph_to_static/test_origin_info.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_param_guard.py b/test/dygraph_to_static/test_param_guard.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_param_guard.py rename to test/dygraph_to_static/test_param_guard.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_params_no_grad.py b/test/dygraph_to_static/test_params_no_grad.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_params_no_grad.py rename to test/dygraph_to_static/test_params_no_grad.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_partial_program.py b/test/dygraph_to_static/test_partial_program.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_partial_program.py rename to test/dygraph_to_static/test_partial_program.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_partial_program_hook.py b/test/dygraph_to_static/test_partial_program_hook.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_partial_program_hook.py rename to test/dygraph_to_static/test_partial_program_hook.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_place.py b/test/dygraph_to_static/test_place.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_place.py rename to test/dygraph_to_static/test_place.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_print.py b/test/dygraph_to_static/test_print.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_print.py rename to test/dygraph_to_static/test_print.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_program_translator.py b/test/dygraph_to_static/test_program_translator.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_program_translator.py rename to test/dygraph_to_static/test_program_translator.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ptb_lm.py b/test/dygraph_to_static/test_ptb_lm.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_ptb_lm.py rename to test/dygraph_to_static/test_ptb_lm.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ptb_lm_v2.py b/test/dygraph_to_static/test_ptb_lm_v2.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_ptb_lm_v2.py rename to test/dygraph_to_static/test_ptb_lm_v2.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_reinforcement_learning.py b/test/dygraph_to_static/test_reinforcement_learning.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_reinforcement_learning.py rename to test/dygraph_to_static/test_reinforcement_learning.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_resnet.py b/test/dygraph_to_static/test_resnet.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_resnet.py rename to test/dygraph_to_static/test_resnet.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_resnet_amp.py b/test/dygraph_to_static/test_resnet_amp.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_resnet_amp.py rename to test/dygraph_to_static/test_resnet_amp.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_resnet_pure_fp16.py b/test/dygraph_to_static/test_resnet_pure_fp16.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_resnet_pure_fp16.py rename to test/dygraph_to_static/test_resnet_pure_fp16.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_resnet_v2.py b/test/dygraph_to_static/test_resnet_v2.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_resnet_v2.py rename to test/dygraph_to_static/test_resnet_v2.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_return.py b/test/dygraph_to_static/test_return.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_return.py rename to test/dygraph_to_static/test_return.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_rollback.py b/test/dygraph_to_static/test_rollback.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_rollback.py rename to test/dygraph_to_static/test_rollback.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_save_inference_model.py b/test/dygraph_to_static/test_save_inference_model.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_save_inference_model.py rename to test/dygraph_to_static/test_save_inference_model.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_save_load.py b/test/dygraph_to_static/test_save_load.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_save_load.py rename to test/dygraph_to_static/test_save_load.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_se_resnet.py b/test/dygraph_to_static/test_se_resnet.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_se_resnet.py rename to test/dygraph_to_static/test_se_resnet.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_sentiment.py b/test/dygraph_to_static/test_sentiment.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_sentiment.py rename to test/dygraph_to_static/test_sentiment.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_seq2seq.py b/test/dygraph_to_static/test_seq2seq.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_seq2seq.py rename to test/dygraph_to_static/test_seq2seq.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_setter_helper.py b/test/dygraph_to_static/test_setter_helper.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_setter_helper.py rename to test/dygraph_to_static/test_setter_helper.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_simnet.py b/test/dygraph_to_static/test_simnet.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_simnet.py rename to test/dygraph_to_static/test_simnet.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_simnet_v2.py b/test/dygraph_to_static/test_simnet_v2.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_simnet_v2.py rename to test/dygraph_to_static/test_simnet_v2.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_slice.py b/test/dygraph_to_static/test_slice.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_slice.py rename to test/dygraph_to_static/test_slice.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_spec_names.py b/test/dygraph_to_static/test_spec_names.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_spec_names.py rename to test/dygraph_to_static/test_spec_names.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_static_analysis.py b/test/dygraph_to_static/test_static_analysis.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_static_analysis.py rename to test/dygraph_to_static/test_static_analysis.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_tensor_methods.py b/test/dygraph_to_static/test_tensor_methods.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_tensor_methods.py rename to test/dygraph_to_static/test_tensor_methods.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_tensor_shape.py b/test/dygraph_to_static/test_tensor_shape.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_tensor_shape.py rename to test/dygraph_to_static/test_tensor_shape.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_to_tensor.py b/test/dygraph_to_static/test_to_tensor.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_to_tensor.py rename to test/dygraph_to_static/test_to_tensor.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_transformer.py b/test/dygraph_to_static/test_transformer.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_transformer.py rename to test/dygraph_to_static/test_transformer.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_tsm.py b/test/dygraph_to_static/test_tsm.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_tsm.py rename to test/dygraph_to_static/test_tsm.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_typehint.py b/test/dygraph_to_static/test_typehint.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_typehint.py rename to test/dygraph_to_static/test_typehint.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_typing.py b/test/dygraph_to_static/test_typing.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_typing.py rename to test/dygraph_to_static/test_typing.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_unuseful_inputs.py b/test/dygraph_to_static/test_unuseful_inputs.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_unuseful_inputs.py rename to test/dygraph_to_static/test_unuseful_inputs.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_utils.py b/test/dygraph_to_static/test_utils.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_utils.py rename to test/dygraph_to_static/test_utils.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_variable_trans_func.py b/test/dygraph_to_static/test_variable_trans_func.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_variable_trans_func.py rename to test/dygraph_to_static/test_variable_trans_func.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_warning.py b/test/dygraph_to_static/test_warning.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_warning.py rename to test/dygraph_to_static/test_warning.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_word2vec.py b/test/dygraph_to_static/test_word2vec.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_word2vec.py rename to test/dygraph_to_static/test_word2vec.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_write_python_container.py b/test/dygraph_to_static/test_write_python_container.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_write_python_container.py rename to test/dygraph_to_static/test_write_python_container.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_yolov3.py b/test/dygraph_to_static/test_yolov3.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/test_yolov3.py rename to test/dygraph_to_static/test_yolov3.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/transformer_dygraph_model.py b/test/dygraph_to_static/transformer_dygraph_model.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/transformer_dygraph_model.py rename to test/dygraph_to_static/transformer_dygraph_model.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/transformer_util.py b/test/dygraph_to_static/transformer_util.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/transformer_util.py rename to test/dygraph_to_static/transformer_util.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/tsm.yaml b/test/dygraph_to_static/tsm.yaml similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/tsm.yaml rename to test/dygraph_to_static/tsm.yaml diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/tsm_config_utils.py b/test/dygraph_to_static/tsm_config_utils.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/tsm_config_utils.py rename to test/dygraph_to_static/tsm_config_utils.py diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/yolov3.py b/test/dygraph_to_static/yolov3.py similarity index 100% rename from python/paddle/fluid/tests/unittests/dygraph_to_static/yolov3.py rename to test/dygraph_to_static/yolov3.py -- GitLab