diff --git a/paddle/ir/CMakeLists.txt b/paddle/ir/CMakeLists.txt index 5e6af70335a1077b296bd81066923734c20b57e2..084ee7e52cada2eef2f8fd11133f64dfe970c302 100644 --- a/paddle/ir/CMakeLists.txt +++ b/paddle/ir/CMakeLists.txt @@ -5,9 +5,6 @@ endif() set(NEWIR_SOURCE_DIR "${PADDLE_SOURCE_DIR}/paddle/ir") set(NEWIR_BINARY_DIR "${PADDLE_BINARY_DIR}/paddle/ir") -# ir tests -add_subdirectory(tests) - file(GLOB IR_SRCS "*.cc") cc_library(new_ir SRCS ${IR_SRCS}) diff --git a/paddle/ir/tests/CMakeLists.txt b/paddle/ir/tests/CMakeLists.txt deleted file mode 100644 index e012ec5bd264d1208921cb5882d959df11ab3a34..0000000000000000000000000000000000000000 --- a/paddle/ir/tests/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -cc_test_old(type_test SRCS type_test.cc DEPS new_ir gtest) -cc_test_old(ir_attribute_test SRCS ir_attribute_test.cc DEPS new_ir gtest) -cc_test_old(ir_value_test SRCS ir_value_test.cc DEPS new_ir gtest) diff --git a/test/cpp/CMakeLists.txt b/test/cpp/CMakeLists.txt index 752fa86168ab8a837bd827beb81a41372fa21286..3b896f38c5cc28c324d0ac89cc2e628de496cf66 100644 --- a/test/cpp/CMakeLists.txt +++ b/test/cpp/CMakeLists.txt @@ -3,3 +3,4 @@ add_subdirectory(jit) add_subdirectory(new_executor) add_subdirectory(prim) add_subdirectory(imperative) +add_subdirectory(ir) diff --git a/test/cpp/ir/CMakeLists.txt b/test/cpp/ir/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..48feb56c2e270d5ecee6f2550443c43937f0a420 --- /dev/null +++ b/test/cpp/ir/CMakeLists.txt @@ -0,0 +1,5 @@ +if(WITH_NEWIR) + cc_test_old(type_test SRCS type_test.cc DEPS new_ir gtest) + cc_test_old(ir_attribute_test SRCS ir_attribute_test.cc DEPS new_ir gtest) + cc_test_old(ir_value_test SRCS ir_value_test.cc DEPS new_ir gtest) +endif() diff --git a/paddle/ir/tests/ir_attribute_test.cc b/test/cpp/ir/ir_attribute_test.cc similarity index 100% rename from paddle/ir/tests/ir_attribute_test.cc rename to test/cpp/ir/ir_attribute_test.cc diff --git a/paddle/ir/tests/ir_value_test.cc b/test/cpp/ir/ir_value_test.cc similarity index 100% rename from paddle/ir/tests/ir_value_test.cc rename to test/cpp/ir/ir_value_test.cc diff --git a/paddle/ir/tests/type_test.cc b/test/cpp/ir/type_test.cc similarity index 100% rename from paddle/ir/tests/type_test.cc rename to test/cpp/ir/type_test.cc