mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-05 14:17:20 +08:00
Jenkins SITL tests restore try to always analyze
This commit is contained in:
@@ -206,6 +206,7 @@ def createTestNode(Map test_def) {
|
|||||||
docker.image("px4io/px4-dev-ros:2018-08-23").inside('-e HOME=${WORKSPACE}') {
|
docker.image("px4io/px4-dev-ros:2018-08-23").inside('-e HOME=${WORKSPACE}') {
|
||||||
stage(test_def.name) {
|
stage(test_def.name) {
|
||||||
|
|
||||||
|
try {
|
||||||
sh('export')
|
sh('export')
|
||||||
|
|
||||||
if (env.PX4_CMAKE_BUILD_TYPE == 'Coverage') {
|
if (env.PX4_CMAKE_BUILD_TYPE == 'Coverage') {
|
||||||
@@ -217,6 +218,13 @@ def createTestNode(Map test_def) {
|
|||||||
sh('tar -xjpvf build/posix_sitl_default/px4-posix_sitl_default*.bz2')
|
sh('tar -xjpvf build/posix_sitl_default/px4-posix_sitl_default*.bz2')
|
||||||
sh('px4-posix_sitl_default*/px4/test/rostest_px4_run.sh ' + test_def.test + ' mission:=' + test_def.mission + ' vehicle:=' + test_def.vehicle)
|
sh('px4-posix_sitl_default*/px4/test/rostest_px4_run.sh ' + test_def.test + ' mission:=' + test_def.mission + ' vehicle:=' + test_def.vehicle)
|
||||||
|
|
||||||
|
} catch (exc) {
|
||||||
|
// save all test artifacts for debugging
|
||||||
|
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.ulg, .ros/**/rosunit-*.xml, .ros/**/rostest-*.log')
|
||||||
|
throw (exc)
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
|
||||||
if (env.PX4_CMAKE_BUILD_TYPE == 'Coverage') {
|
if (env.PX4_CMAKE_BUILD_TYPE == 'Coverage') {
|
||||||
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
||||||
sh 'curl -s https://codecov.io/bash | bash -s - -F sitl_mission_${STAGE_NAME}'
|
sh 'curl -s https://codecov.io/bash | bash -s - -F sitl_mission_${STAGE_NAME}'
|
||||||
@@ -240,9 +248,9 @@ def createTestNode(Map test_def) {
|
|||||||
sh('px4-posix_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
|
sh('px4-posix_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
|
||||||
}
|
}
|
||||||
|
|
||||||
// save all test artifacts for debugging
|
// save test artifacts for debugging
|
||||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.ulg, .ros/**/rosunit-*.xml, .ros/**/rostest-*.log')
|
|
||||||
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.pdf, .ros/**/*.csv')
|
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.pdf, .ros/**/*.csv')
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user