diff options
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | pytest.ini | 4 | ||||
-rw-r--r-- | tests/TestMachineAction.py | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dc9f37c76e..ad2315070c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,12 @@ include(GNUInstallDirs) set(URANIUM_SCRIPTS_DIR "${CMAKE_SOURCE_DIR}/../uranium/scripts" CACHE DIRECTORY "The location of the scripts directory of the Uranium repository") +# Tests +# Note that we use exit 0 here to not mark the build as a failure on test failure +add_custom_target(tests) +add_custom_command(TARGET tests POST_BUILD COMMAND "PYTHONPATH=${CMAKE_SOURCE_DIR}" ${PYTHON_EXECUTABLE} -m pytest -r a --junitxml=${CMAKE_BINARY_DIR}/junit.xml ${CMAKE_SOURCE_DIR} || exit 0) + + set(CURA_VERSION "master" CACHE STRING "Version name of Cura") configure_file(cura/CuraVersion.py.in CuraVersion.py @ONLY) diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000000..de6e8797fb --- /dev/null +++ b/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +testpaths = tests +python_files = Test*.py +python_classes = Test diff --git a/tests/TestMachineAction.py b/tests/TestMachineAction.py new file mode 100644 index 0000000000..fe9b676d23 --- /dev/null +++ b/tests/TestMachineAction.py @@ -0,0 +1 @@ +#Todo: Write tests
\ No newline at end of file |