]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: moved tests into test/pybind dir
authorAli Maredia <amaredia@redhat.com>
Thu, 28 Jan 2016 21:50:53 +0000 (16:50 -0500)
committerAli Maredia <amaredia@redhat.com>
Fri, 15 Apr 2016 00:48:20 +0000 (20:48 -0400)
Added a CMakeLists.txt into test/pybind. Added
CEPH_BIN in front of relative path in
test_ceph_argparse.py.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
src/test/CMakeLists.txt
src/test/pybind/CMakeLists.txt [new file with mode: 0644]
src/test/pybind/test_ceph_argparse.py

index f43d020547527da7516e3f6667ab8a6dbbdf0f7b..ac2ac68569474292b7d91193efb27e1356a712a7 100644 (file)
@@ -959,10 +959,7 @@ add_ceph_unittest(unittest_lfnindex ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_l
 target_link_libraries(unittest_lfnindex os global)
 
 add_subdirectory(osd)
-
-#pybind
-add_ceph_test(test_ceph_daemon.py ${CMAKE_SOURCE_DIR}/src/test/pybind/test_ceph_daemon.py)
-add_ceph_test(test_ceph_argparse.py ${CMAKE_SOURCE_DIR}/src/test/pybind/test_ceph_argparse.py)
+add_subdirectory(pybind)
 
 # unittest_admin_socket
 add_executable(unittest_admin_socket EXCLUDE_FROM_ALL
diff --git a/src/test/pybind/CMakeLists.txt b/src/test/pybind/CMakeLists.txt
new file mode 100644 (file)
index 0000000..bc91bce
--- /dev/null
@@ -0,0 +1,2 @@
+add_ceph_test(test_ceph_daemon.py ${CMAKE_CURRENT_SOURCE_DIR}/test_ceph_daemon.py)
+add_ceph_test(test_ceph_argparse.py ${CMAKE_CURRENT_SOURCE_DIR}/test_ceph_argparse.py)
index 4bf6c27f9bb708e997a4402e5edd403a305615ca..4c325f278e52411068e831a3e1e22d1c1ea9592e 100755 (executable)
@@ -25,7 +25,8 @@ import re
 import json
 
 def get_command_descriptions(what):
-    return os.popen("./get_command_descriptions " + "--" + what).read()
+    CEPH_BIN = os.environ['CEPH_BIN']
+    return os.popen(CEPH_BIN + "/get_command_descriptions " + "--" + what).read()
 
 def test_parse_json_funcsigs():
     commands = get_command_descriptions("all")