summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c6f9644)
raw | patch | inline | side by side (parent: c6f9644)
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | |
Mon, 2 Jan 2017 14:42:08 +0000 (16:42 +0200) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Tue, 3 Jan 2017 08:46:42 +0000 (10:46 +0200) |
Separate the Python bindings sources from the test scripts. While at it,
remove the unneeded run.sh script.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
remove the unneeded run.sh script.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
19 files changed:
diff --git a/py/CMakeLists.txt b/py/CMakeLists.txt
index 69bb845aa3023c6ebc5b8335c9138bf695bd42cc..77f19b4b85bac84206d0a920ac4bfa7f5ff519a7 100644 (file)
--- a/py/CMakeLists.txt
+++ b/py/CMakeLists.txt
-include_directories(${LIBDRM_INCLUDE_DIRS})
-link_directories(${LIBDRM_LIBRARY_DIRS})
-
-pkg_check_modules(PYTHON python3 REQUIRED)
-include_directories(${PYTHON_INCLUDE_DIRS})
-
-if (NOT ${U_CMAKE_BUILD_TYPE} MATCHES DEBUG)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
-endif()
-
-include_directories(${PROJECT_SOURCE_DIR}/ext/pybind11/include)
-
-set(SRCS pykms.cpp pykmsbase.cpp pykmsutil.cpp pyvid.cpp)
-
-if(LIBDRM_OMAP_FOUND)
- set(SRCS ${SRCS} pykmsomap.cpp)
-endif()
-
-add_library(pykms SHARED ${SRCS})
-target_link_libraries(pykms kms++ kms++util ${LIBDRM_LIBRARIES})
-
-# Don't add a 'lib' prefix to the shared library
-set_target_properties(pykms PROPERTIES PREFIX "")
-
-file(GLOB PY_SRCS "*.py")
-add_custom_target(pyextras SOURCES ${PY_SRCS})
-
-add_test(NAME pytest COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/functest.py")
-set_property(TEST pytest PROPERTY
- ENVIRONMENT "PYTHONPATH=." "LD_LIBRARY_PATH=."
-)
-
-# XXX Where should pykms.so be installed?
-#install(TARGETS pykms DESTINATION lib)
+add_subdirectory(pykms)
+add_subdirectory(tests)
diff --git a/py/pykms/CMakeLists.txt b/py/pykms/CMakeLists.txt
--- /dev/null
+++ b/py/pykms/CMakeLists.txt
@@ -0,0 +1,26 @@
+include_directories(${LIBDRM_INCLUDE_DIRS})
+link_directories(${LIBDRM_LIBRARY_DIRS})
+
+pkg_check_modules(PYTHON python3 REQUIRED)
+include_directories(${PYTHON_INCLUDE_DIRS})
+
+if (NOT ${U_CMAKE_BUILD_TYPE} MATCHES DEBUG)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
+endif()
+
+include_directories(${PROJECT_SOURCE_DIR}/ext/pybind11/include)
+
+set(SRCS pykms.cpp pykmsbase.cpp pykmsutil.cpp pyvid.cpp)
+
+if(LIBDRM_OMAP_FOUND)
+ set(SRCS ${SRCS} pykmsomap.cpp)
+endif()
+
+add_library(pykms SHARED ${SRCS})
+target_link_libraries(pykms kms++ kms++util ${LIBDRM_LIBRARIES})
+
+# Don't add a 'lib' prefix to the shared library
+set_target_properties(pykms PROPERTIES PREFIX "")
+
+# XXX Where should pykms.so be installed?
+#install(TARGETS pykms DESTINATION lib)
diff --git a/py/pykms.cpp b/py/pykms/pykms.cpp
diff --git a/py/pykmsbase.cpp b/py/pykms/pykmsbase.cpp
diff --git a/py/pykmsomap.cpp b/py/pykms/pykmsomap.cpp
diff --git a/py/pykmsutil.cpp b/py/pykms/pykmsutil.cpp
diff --git a/py/pyvid.cpp b/py/pykms/pyvid.cpp
diff --git a/py/run.sh b/py/run.sh
--- a/py/run.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-PYTHONPATH=build/py/ python3 $*
-
diff --git a/py/tests/CMakeLists.txt b/py/tests/CMakeLists.txt
--- /dev/null
+++ b/py/tests/CMakeLists.txt
@@ -0,0 +1,7 @@
+file(GLOB PY_SRCS "*.py")
+add_custom_target(pyextras SOURCES ${PY_SRCS})
+
+add_test(NAME pytest COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/functest.py")
+set_property(TEST pytest PROPERTY
+ ENVIRONMENT "PYTHONPATH=." "LD_LIBRARY_PATH=."
+)
diff --git a/py/alpha-test.py b/py/tests/alpha-test.py
diff --git a/py/cam.py b/py/tests/cam.py
diff --git a/py/db.py b/py/tests/db.py
diff --git a/py/functest.py b/py/tests/functest.py
diff --git a/py/gamma.py b/py/tests/gamma.py
diff --git a/py/helpers.py b/py/tests/helpers.py
diff --git a/py/iact.py b/py/tests/iact.py
diff --git a/py/kmsmodeview.py b/py/tests/kmsmodeview.py
diff --git a/py/test.py b/py/tests/test.py
diff --git a/py/trans-test.py b/py/tests/trans-test.py