From 4e54f13145746e75f2133617eda7a6b188677cb1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 18 Oct 2018 17:22:57 +0200 Subject: [PATCH] Move shortcut keys test to CMake So that when you run tests locally, you also test this one. --- Jenkinsfile | 14 -------------- cmake/CuraTests.cmake | 10 +++++++++- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 1cb2eea877..3ca803d338 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,20 +12,6 @@ parallel_nodes(['linux && cura', 'windows && cura']) { // If any error occurs during building, we want to catch it and continue with the "finale" stage. catchError { - stage('Pre Checks') { - if (isUnix()) { - // Check shortcut keys - try { - sh """ - echo 'Check for duplicate shortcut keys in all translation files.' - ${env.CURA_ENVIRONMENT_PATH}/master/bin/python3 scripts/check_shortcut_keys.py - """ - } catch(e) { - currentBuild.result = "UNSTABLE" - } - } - } - // Building and testing should happen in a subdirectory. dir('build') { // Perform the "build". Since Uranium is Python code, this basically only ensures CMake is setup. diff --git a/cmake/CuraTests.cmake b/cmake/CuraTests.cmake index 30794ed608..f2ee92d65b 100644 --- a/cmake/CuraTests.cmake +++ b/cmake/CuraTests.cmake @@ -57,5 +57,13 @@ endforeach() #Add code style test. add_test( NAME "code-style" - COMMAND ${PYTHON_EXECUTABLE} run_mypy.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + COMMAND ${PYTHON_EXECUTABLE} run_mypy.py + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} +) + +#Add test for whether the shortcut alt-keys are unique in every translation. +add_test( + NAME "shortcut-keys" + COMMAND ${PYTHON_EXECUTABLE} scripts/check_shortcut_keys.py + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) \ No newline at end of file