Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2016-04-29 12:32:33 +0300
committerJaime van Kessel <nallath@gmail.com>2016-04-29 12:32:33 +0300
commit46ff3f44089ea30c759133c4b563e5864c34241c (patch)
treee419bbc9fccf5f66e31c8ce8d54e5a59d8672d12
parentae0e05182b3eea4271c1127962fff5925e83f545 (diff)
Added unit test stub
-rw-r--r--CMakeLists.txt6
-rw-r--r--pytest.ini4
-rw-r--r--tests/TestMachineAction.py1
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