Merge branch 'tests-for-um3networkplugin' into cloud-output-device

* tests-for-um3networkplugin:
  Fix the title's top margin size in the add machine dialog.
  Use generated Makefiles to run tests
  Add option test-verbose build option to CuraTests
This commit is contained in:
ChrisTerBeke 2018-11-20 18:59:53 +01:00
commit 07c9980d91
No known key found for this signature in database
GPG Key ID: A49F1AB9D7E0C263
3 changed files with 5 additions and 42 deletions

43
Jenkinsfile vendored
View File

@ -38,20 +38,9 @@ parallel_nodes(['linux && cura', 'windows && cura'])
{ {
if (isUnix()) if (isUnix())
{ {
// For Linux to show everything // For Linux
def branch = env.BRANCH_NAME
if(!fileExists("${env.CURA_ENVIRONMENT_PATH}/${branch}"))
{
branch = "master"
}
def uranium_dir = get_workspace_dir("Ultimaker/Uranium/${branch}")
try { try {
sh """ sh 'make CTEST_OUTPUT_ON_FAILURE=TRUE test'
cd ..
export PYTHONPATH=.:"${uranium_dir}"
${env.CURA_ENVIRONMENT_PATH}/${branch}/bin/pytest -x --verbose --full-trace --capture=no ./tests
"""
} catch(e) } catch(e)
{ {
currentBuild.result = "UNSTABLE" currentBuild.result = "UNSTABLE"
@ -70,34 +59,6 @@ parallel_nodes(['linux && cura', 'windows && cura'])
} }
} }
} }
stage('Code Style')
{
if (isUnix())
{
// For Linux to show everything.
// CMake also runs this test, but if it fails then the test just shows "failed" without details of what exactly failed.
def branch = env.BRANCH_NAME
if(!fileExists("${env.CURA_ENVIRONMENT_PATH}/${branch}"))
{
branch = "master"
}
def uranium_dir = get_workspace_dir("Ultimaker/Uranium/${branch}")
try
{
sh """
cd ..
export PYTHONPATH=.:"${uranium_dir}"
${env.CURA_ENVIRONMENT_PATH}/${branch}/bin/python3 run_mypy.py
"""
}
catch(e)
{
currentBuild.result = "UNSTABLE"
}
}
}
} }
} }

View File

@ -6,6 +6,8 @@ include(CMakeParseArguments)
find_package(PythonInterp 3.5.0 REQUIRED) find_package(PythonInterp 3.5.0 REQUIRED)
add_custom_target(test-verbose COMMAND ${CMAKE_CTEST_COMMAND} --verbose)
function(cura_add_test) function(cura_add_test)
set(_single_args NAME DIRECTORY PYTHONPATH) set(_single_args NAME DIRECTORY PYTHONPATH)
cmake_parse_arguments("" "" "${_single_args}" "" ${ARGN}) cmake_parse_arguments("" "" "${_single_args}" "" ${ARGN})

View File

@ -73,7 +73,7 @@ UM.Dialog
{ {
top: parent.top top: parent.top
left: parent.left left: parent.left
topMargin: UM.Theme.getSize("default_margin") topMargin: UM.Theme.getSize("default_margin").height
} }
text: catalog.i18nc("@title:tab", "Add a printer to Cura") text: catalog.i18nc("@title:tab", "Add a printer to Cura")