]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: move tests to where they are implemented
authorKefu Chai <kchai@redhat.com>
Sun, 4 Aug 2019 06:52:50 +0000 (14:52 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 5 Aug 2019 11:11:51 +0000 (19:11 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/CMakeLists.txt
src/pybind/mgr/ansible/CMakeLists.txt [new file with mode: 0644]
src/pybind/mgr/dashboard/CMakeLists.txt
src/pybind/mgr/insights/CMakeLists.txt [new file with mode: 0644]
src/pybind/mgr/orchestrator_cli/CMakeLists.txt [new file with mode: 0644]
src/python-common/CMakeLists.txt
src/test/CMakeLists.txt
src/tools/cephfs/CMakeLists.txt

index e7a373e0c8262380964e243e853cb1712e12bc44..2b5f4a7d4ad73dfcfac618d2c033e7592bd8c9ff 100644 (file)
@@ -1,4 +1,7 @@
 add_subdirectory(dashboard)
+add_subdirectory(insights)
+add_subdirectory(ansible)
+add_subdirectory(orchestrator_cli)
 
 # Location needs to match default setting for mgr_module_path, currently:
 # OPTION(mgr_module_path, OPT_STR, CEPH_PKGLIBDIR "/mgr")
diff --git a/src/pybind/mgr/ansible/CMakeLists.txt b/src/pybind/mgr/ansible/CMakeLists.txt
new file mode 100644 (file)
index 0000000..4ef1846
--- /dev/null
@@ -0,0 +1,4 @@
+if(WITH_TESTS)
+  include(AddCephTest)
+  add_tox_test(mgr-ansible ${CMAKE_CURRENT_SOURCE_DIR})
+endif()
index 29ee2c8da6bd4aa09c78e75df6c4a41d1523f4d5..29ea53db0920d25f5230111d83ecb6571081cb15 100644 (file)
@@ -95,3 +95,8 @@ add_custom_target(mgr-dashboard-frontend-build
   WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/frontend)
 add_dependencies(tests mgr-dashboard-frontend-build)
 endif(WITH_MGR_DASHBOARD_FRONTEND AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64|arm|ARM")
+
+if(WITH_TESTS)
+  include(AddCephTest)
+  add_tox_test(mgr-dashboard ${CMAKE_CURRENT_SOURCE_DIR})
+endif()
diff --git a/src/pybind/mgr/insights/CMakeLists.txt b/src/pybind/mgr/insights/CMakeLists.txt
new file mode 100644 (file)
index 0000000..6137c32
--- /dev/null
@@ -0,0 +1,4 @@
+if(WITH_TESTS)
+  include(AddCephTest)
+  add_tox_test(mgr-insights ${CMAKE_CURRENT_SOURCE_DIR})
+endif()
diff --git a/src/pybind/mgr/orchestrator_cli/CMakeLists.txt b/src/pybind/mgr/orchestrator_cli/CMakeLists.txt
new file mode 100644 (file)
index 0000000..f2e2fef
--- /dev/null
@@ -0,0 +1,4 @@
+if(WITH_TESTS)
+  include(AddCephTest)
+  add_tox_test(mgr-orchestrator_cli ${CMAKE_CURRENT_SOURCE_DIR})
+endif()
index 90d9eb4bad5f09ac9c2c3bf2e4253e46e8157eb5..08729d520a2ef006a7d2f11ea65d0432f00346a6 100644 (file)
@@ -10,3 +10,8 @@ foreach(python_version ${py_vers})
   distutils_install_module(ceph
     PYTHON_VERSION ${python_version})
 endforeach()
+
+if(WITH_TESTS)
+  include(AddCephTest)
+  add_tox_test(python-common ${CMAKE_CURRENT_SOURCE_DIR})
+endif()
index d9649f86fd80af1b52c81e16f288d39976d74c41..08e8166325b95d675482e0c9e8c95bb75ee96263 100644 (file)
@@ -540,24 +540,6 @@ add_ceph_test(test_objectstore_memstore.sh ${CMAKE_CURRENT_SOURCE_DIR}/test_obje
 
 add_ceph_test(smoke.sh ${CMAKE_CURRENT_SOURCE_DIR}/smoke.sh)
 
-if(WITH_MGR)
-  add_tox_test(mgr-dashboard
-    ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard)
-  add_tox_test(mgr-insights
-    ${CMAKE_SOURCE_DIR}/src/pybind/mgr/insights)
-  add_tox_test(mgr-ansible
-    ${CMAKE_SOURCE_DIR}/src/pybind/mgr/ansible)
-  add_tox_test(mgr-orchestrator_cli
-    ${CMAKE_SOURCE_DIR}/src/pybind/mgr/orchestrator_cli)
-  add_tox_test(python-common
-    ${CMAKE_SOURCE_DIR}/src/python-common)
-endif()
-
-if(WITH_CEPHFS_SHELL)
-  add_tox_test(cephfs-shell
-    ${CMAKE_SOURCE_DIR}/src/tools/cephfs)
-endif()
-
 set_property(
   TEST ${tox_tests}
   PROPERTY ENVIRONMENT ${env_vars_for_tox_tests})
index de23878b1814812bc1d6e08c82504db0b354c844..41da8e3a7ac4030a3c87f4b13d4ee64dac72d6b1 100644 (file)
@@ -47,4 +47,8 @@ if(WITH_CEPHFS_SHELL)
     distutils_install_module(cephfs-shell
       PYTHON_VERSION 3)
   endif()
+  if(WITH_TESTS)
+    include(AddCephTest)
+    add_tox_test(cephfs-shell ${CMAKE_CURRENT_SOURCE_DIR})
+  endif()
 endif()