mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 07:29:00 +08:00
Verbose output for Linux CI
This commit is contained in:
parent
f585afe77b
commit
dc2c074bc0
44
Jenkinsfile
vendored
44
Jenkinsfile
vendored
@ -52,10 +52,48 @@ parallel_nodes(['linux && cura', 'windows && cura']) {
|
|||||||
|
|
||||||
// Try and run the unit tests. If this stage fails, we consider the build to be "unstable".
|
// Try and run the unit tests. If this stage fails, we consider the build to be "unstable".
|
||||||
stage('Unit Test') {
|
stage('Unit Test') {
|
||||||
try {
|
if (isUnix()) {
|
||||||
|
// For Linux to show everything
|
||||||
|
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/pytest -x --verbose --full-trace --capture=no ./tests
|
||||||
|
"""
|
||||||
|
} catch(e) {
|
||||||
|
currentBuild.result = "UNSTABLE"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// For Windows
|
||||||
make('test')
|
make('test')
|
||||||
} catch(e) {
|
}
|
||||||
currentBuild.result = "UNSTABLE"
|
}
|
||||||
|
|
||||||
|
stage('Code Style') {
|
||||||
|
if (isUnix()) {
|
||||||
|
// For Linux to show everything
|
||||||
|
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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ function(cura_add_test)
|
|||||||
if (NOT ${test_exists})
|
if (NOT ${test_exists})
|
||||||
add_test(
|
add_test(
|
||||||
NAME ${_NAME}
|
NAME ${_NAME}
|
||||||
COMMAND ${PYTHON_EXECUTABLE} -m pytest --junitxml=${CMAKE_BINARY_DIR}/junit-${_NAME}.xml ${_DIRECTORY}
|
COMMAND ${PYTHON_EXECUTABLE} -m pytest --verbose --full-trace --capture=no --no-print-log --junitxml=${CMAKE_BINARY_DIR}/junit-${_NAME}.xml ${_DIRECTORY}
|
||||||
)
|
)
|
||||||
set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT LANG=C)
|
set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT LANG=C)
|
||||||
set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT "PYTHONPATH=${_PYTHONPATH}")
|
set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT "PYTHONPATH=${_PYTHONPATH}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user