mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 02:36:37 +08:00
Jenkins SITL tests add cmake build type choice
This commit is contained in:
Vendored
-106
@@ -160,115 +160,9 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('code coverage (mission test)') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-ros:2018-07-19'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean; rm -rf .ros; rm -rf .gazebo'
|
||||
sh 'ulimit -c unlimited; make tests_mission_coverage'
|
||||
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
||||
sh 'curl -s https://codecov.io/bash | bash -s - -F mission'
|
||||
}
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
stage('code coverage (unit tests)') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base:2018-07-19'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ulimit -c unlimited; make tests_coverage || true' // always pass for now
|
||||
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
||||
sh 'curl -s https://codecov.io/bash | bash -s - -F unittests'
|
||||
}
|
||||
sh 'make distclean'
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
sh('ls -a')
|
||||
sh('find . -name core')
|
||||
sh('gdb --batch --quiet -ex "thread apply all bt full" -ex "quit" build/posix_sitl_default/px4 core || true') // always pass for now
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('code coverage (python)') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base:2018-08-04'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'make python_coverage'
|
||||
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
|
||||
sh 'curl -s https://codecov.io/bash | bash -s - -F python'
|
||||
}
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
} // parallel
|
||||
} // stage Analysis
|
||||
|
||||
stage('Test') {
|
||||
parallel {
|
||||
|
||||
stage('unit tests') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base:2018-07-19'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'make posix_sitl_default test_results_junit'
|
||||
sh 'ccache -s'
|
||||
junit 'build/posix_sitl_default/JUnitTestResults.xml'
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
stage('unit tests (address sanitizer)') {
|
||||
agent {
|
||||
docker {
|
||||
image 'px4io/px4-dev-base:2018-07-19'
|
||||
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
||||
}
|
||||
}
|
||||
environment {
|
||||
PX4_ASAN = 1
|
||||
ASAN_OPTIONS = "color=always:check_initialization_order=1:detect_stack_use_after_return=1"
|
||||
}
|
||||
steps {
|
||||
sh 'export'
|
||||
sh 'make distclean'
|
||||
sh 'ccache -z'
|
||||
sh 'make tests || true' // always pass for now, TODO: PX4 sitl clean shutdown
|
||||
sh 'ccache -s'
|
||||
sh 'make distclean'
|
||||
}
|
||||
}
|
||||
|
||||
} // parallel
|
||||
} // stage Test
|
||||
|
||||
stage('Generate Metadata') {
|
||||
|
||||
parallel {
|
||||
|
||||
Reference in New Issue
Block a user