aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/.gitignore2
-rw-r--r--test/CMakeLists.txt10
-rw-r--r--test/lib/__init__.py0
-rw-r--r--test/py/conftest.py (renamed from test/conftest.py)4
-rw-r--r--test/py/lib/__init__.py (renamed from test/__init__.py)0
-rw-r--r--test/py/lib/process.py (renamed from test/lib/process.py)0
-rw-r--r--test/py/lib/test_repo.py (renamed from test/lib/test_repo.py)0
-rwxr-xr-xtest/py/lib/test_repo/ci.sh (renamed from test/lib/test_repo/ci.sh)0
-rw-r--r--test/py/test_basic.py (renamed from test/test_basic.py)2
9 files changed, 8 insertions, 10 deletions
diff --git a/test/.gitignore b/test/.gitignore
deleted file mode 100644
index e6af855..0000000
--- a/test/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.pytest_cache/
-__pycache__/
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 326a50b..18b49be 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -2,23 +2,23 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter)
set(python_test_args
--no-header -v
- "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/py"
--server-binary "$<TARGET_FILE:server>"
--worker-binary "$<TARGET_FILE:worker>"
--client-binary "$<TARGET_FILE:client>"
--project-version "${PROJECT_VERSION}")
-function(add_my_test name)
+function(add_python_tests name)
list(POP_FRONT ARGV)
add_test(NAME "${name}"
- WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/py"
COMMAND ${ARGV})
set_tests_properties("${name}" PROPERTIES TIMEOUT 60)
endfunction()
-add_my_test(python_tests
+add_python_tests(python_tests
Python3::Interpreter -m pytest ${python_test_args})
-add_my_test(python_tests_valgrind
+add_python_tests(python_tests_valgrind
Python3::Interpreter -m pytest ${python_test_args}
--valgrind-binary "${CMAKE_CURRENT_SOURCE_DIR}/../src/valgrind.sh")
diff --git a/test/lib/__init__.py b/test/lib/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/test/lib/__init__.py
+++ /dev/null
diff --git a/test/conftest.py b/test/py/conftest.py
index 9e81afd..355bd83 100644
--- a/test/conftest.py
+++ b/test/py/conftest.py
@@ -9,8 +9,8 @@ import random
from pytest import fixture
-from .lib.process import CmdLine
-from .lib.test_repo import TestRepo
+from lib.process import CmdLine
+from lib.test_repo import TestRepo
class Param:
diff --git a/test/__init__.py b/test/py/lib/__init__.py
index e69de29..e69de29 100644
--- a/test/__init__.py
+++ b/test/py/lib/__init__.py
diff --git a/test/lib/process.py b/test/py/lib/process.py
index 3436280..3436280 100644
--- a/test/lib/process.py
+++ b/test/py/lib/process.py
diff --git a/test/lib/test_repo.py b/test/py/lib/test_repo.py
index 1922245..1922245 100644
--- a/test/lib/test_repo.py
+++ b/test/py/lib/test_repo.py
diff --git a/test/lib/test_repo/ci.sh b/test/py/lib/test_repo/ci.sh
index 804cdb3..804cdb3 100755
--- a/test/lib/test_repo/ci.sh
+++ b/test/py/lib/test_repo/ci.sh
diff --git a/test/test_basic.py b/test/py/test_basic.py
index 3544a11..e8a00e1 100644
--- a/test/test_basic.py
+++ b/test/py/test_basic.py
@@ -5,7 +5,7 @@
import pytest
-from .lib.process import LoggingEvent
+from lib.process import LoggingEvent
def test_server_and_workers_run(server_and_workers):