summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/CMakeLists.txt36
-rw-r--r--py/pykms/CMakeLists.txt26
-rw-r--r--py/pykms/pykms.cpp (renamed from py/pykms.cpp)0
-rw-r--r--py/pykms/pykmsbase.cpp (renamed from py/pykmsbase.cpp)0
-rw-r--r--py/pykms/pykmsomap.cpp (renamed from py/pykmsomap.cpp)0
-rw-r--r--py/pykms/pykmsutil.cpp (renamed from py/pykmsutil.cpp)0
-rw-r--r--py/pykms/pyvid.cpp (renamed from py/pyvid.cpp)0
-rwxr-xr-xpy/run.sh3
-rw-r--r--py/tests/CMakeLists.txt7
-rwxr-xr-xpy/tests/alpha-test.py (renamed from py/alpha-test.py)0
-rwxr-xr-xpy/tests/cam.py (renamed from py/cam.py)0
-rwxr-xr-xpy/tests/db.py (renamed from py/db.py)0
-rwxr-xr-xpy/tests/functest.py (renamed from py/functest.py)0
-rwxr-xr-xpy/tests/gamma.py (renamed from py/gamma.py)0
-rw-r--r--py/tests/helpers.py (renamed from py/helpers.py)0
-rwxr-xr-xpy/tests/iact.py (renamed from py/iact.py)0
-rwxr-xr-xpy/tests/kmsmodeview.py (renamed from py/kmsmodeview.py)0
-rwxr-xr-xpy/tests/test.py (renamed from py/test.py)0
-rwxr-xr-xpy/tests/trans-test.py (renamed from py/trans-test.py)0
19 files changed, 35 insertions, 37 deletions
diff --git a/py/CMakeLists.txt b/py/CMakeLists.txt
index 69bb845..77f19b4 100644
--- a/py/CMakeLists.txt
+++ b/py/CMakeLists.txt
@@ -1,34 +1,2 @@
-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
new file mode 100644
index 0000000..3e6e0e1
--- /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
index 2199039..2199039 100644
--- a/py/pykms.cpp
+++ b/py/pykms/pykms.cpp
diff --git a/py/pykmsbase.cpp b/py/pykms/pykmsbase.cpp
index 5247158..5247158 100644
--- a/py/pykmsbase.cpp
+++ b/py/pykms/pykmsbase.cpp
diff --git a/py/pykmsomap.cpp b/py/pykms/pykmsomap.cpp
index 525834b..525834b 100644
--- a/py/pykmsomap.cpp
+++ b/py/pykms/pykmsomap.cpp
diff --git a/py/pykmsutil.cpp b/py/pykms/pykmsutil.cpp
index b3b7594..b3b7594 100644
--- a/py/pykmsutil.cpp
+++ b/py/pykms/pykmsutil.cpp
diff --git a/py/pyvid.cpp b/py/pykms/pyvid.cpp
index 01177d5..01177d5 100644
--- a/py/pyvid.cpp
+++ b/py/pykms/pyvid.cpp
diff --git a/py/run.sh b/py/run.sh
deleted file mode 100755
index f0ead78..0000000
--- 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
new file mode 100644
index 0000000..a670ed9
--- /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
index c6ec8ee..c6ec8ee 100755
--- a/py/alpha-test.py
+++ b/py/tests/alpha-test.py
diff --git a/py/cam.py b/py/tests/cam.py
index b44f8f9..b44f8f9 100755
--- a/py/cam.py
+++ b/py/tests/cam.py
diff --git a/py/db.py b/py/tests/db.py
index 3ffb716..3ffb716 100755
--- a/py/db.py
+++ b/py/tests/db.py
diff --git a/py/functest.py b/py/tests/functest.py
index 44c29fb..44c29fb 100755
--- a/py/functest.py
+++ b/py/tests/functest.py
diff --git a/py/gamma.py b/py/tests/gamma.py
index a6b68cc..a6b68cc 100755
--- a/py/gamma.py
+++ b/py/tests/gamma.py
diff --git a/py/helpers.py b/py/tests/helpers.py
index fd67d41..fd67d41 100644
--- a/py/helpers.py
+++ b/py/tests/helpers.py
diff --git a/py/iact.py b/py/tests/iact.py
index fecd899..fecd899 100755
--- a/py/iact.py
+++ b/py/tests/iact.py
diff --git a/py/kmsmodeview.py b/py/tests/kmsmodeview.py
index 355db02..355db02 100755
--- a/py/kmsmodeview.py
+++ b/py/tests/kmsmodeview.py
diff --git a/py/test.py b/py/tests/test.py
index 9c23b5b..9c23b5b 100755
--- a/py/test.py
+++ b/py/tests/test.py
diff --git a/py/trans-test.py b/py/tests/trans-test.py
index 8c1f964..8c1f964 100755
--- a/py/trans-test.py
+++ b/py/tests/trans-test.py