Jenkins hardware test add px4_fmu-v3 and px4_fmu-v4pro

This commit is contained in:
Daniel Agar 2019-02-26 19:22:16 -05:00 committed by GitHub
parent aec3ad5417
commit f5a1146517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 152 additions and 2 deletions

View File

@ -1,3 +1,5 @@
#!/usr/bin/env groovy
pipeline { pipeline {
agent none agent none
stages { stages {
@ -6,6 +8,30 @@ pipeline {
parallel { parallel {
stage('px4_fmu-v3_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-02-09'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v3_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v3_default/px4_fmu-v3_default.elf', name: 'px4_fmu-v3_default'
}
post {
always {
sh 'make distclean'
}
}
}
stage('px4_fmu-v4_default') { stage('px4_fmu-v4_default') {
agent { agent {
docker { docker {
@ -22,7 +48,30 @@ pipeline {
sh 'make sizes' sh 'make sizes'
sh 'ccache -s' sh 'ccache -s'
stash includes: 'build/px4_fmu-v4_default/px4_fmu-v4_default.elf', name: 'px4_fmu-v4_default' stash includes: 'build/px4_fmu-v4_default/px4_fmu-v4_default.elf', name: 'px4_fmu-v4_default'
stash includes: 'Tools/HIL/monitor_firmware_upload.py, Tools/HIL/run_tests.py', name: 'scripts-px4_fmu-v4_default' }
post {
always {
sh 'make distclean'
}
}
}
stage('px4_fmu-v4pro_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-02-09'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v4pro_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v4pro_default/px4_fmu-v4pro_default.elf', name: 'px4_fmu-v4pro_default'
} }
post { post {
always { always {
@ -38,6 +87,74 @@ pipeline {
parallel { parallel {
stage('px4fmu-v3_default') {
agent {
label 'px4_fmu-v3'
}
steps {
script {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v3_default'
sh '''gdb-multiarch -nx --batch \
-ex "target remote localhost:2331" \
-ex "monitor reset 0" \
-ex "load" \
-ex "compare-sections" \
-ex "monitor reset 0" \
-ex "monitor sleep 1000" \
-ex "monitor go" \
-ex "kill" \
build/px4_fmu-v3_default/px4_fmu-v3_default.elf
'''
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_TTL232R-3V3_*` --baudrate 57600'
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_TTL232R-3V3_*`'
} catch (Exception err) {
// always report passed for now
currentBuild.result = 'SUCCESS'
}
} // script
}
options {
timeout(time: 600, unit: 'SECONDS')
}
}
stage('px4fmu-v3_default (pixhack-v3)') {
agent {
label 'pixhack-v3'
}
steps {
script {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v3_default'
sh '''gdb-multiarch -nx --batch \
-ex "target remote localhost:2331" \
-ex "monitor reset 0" \
-ex "load" \
-ex "compare-sections" \
-ex "monitor reset 0" \
-ex "monitor sleep 1000" \
-ex "monitor go" \
-ex "kill" \
build/px4_fmu-v3_default/px4_fmu-v3_default.elf
'''
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_TTL232R-3V3_*` --baudrate 57600'
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_TTL232R-3V3_*`'
} catch (Exception err) {
// always report passed for now
currentBuild.result = 'SUCCESS'
}
} // script
}
options {
timeout(time: 600, unit: 'SECONDS')
}
}
stage('px4fmu-v4_default') { stage('px4fmu-v4_default') {
agent { agent {
label 'px4_fmu-v4' label 'px4_fmu-v4'
@ -47,7 +164,6 @@ pipeline {
try { try {
sh 'export' sh 'export'
sh 'find /dev/serial' sh 'find /dev/serial'
unstash 'scripts-px4_fmu-v4_default'
unstash 'px4_fmu-v4_default' unstash 'px4_fmu-v4_default'
sh ''' gdb-multiarch -nx --batch \ sh ''' gdb-multiarch -nx --batch \
-ex "target remote localhost:2331" \ -ex "target remote localhost:2331" \
@ -73,6 +189,40 @@ pipeline {
} }
} }
stage('px4fmu-v4pro_default') {
agent {
label 'px4_fmu-v4pro'
}
steps {
script {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v4pro_default'
sh '''gdb-multiarch -nx --batch \
-ex "target remote localhost:2331" \
-ex "monitor reset 0" \
-ex "load" \
-ex "compare-sections" \
-ex "monitor reset 0" \
-ex "monitor sleep 1000" \
-ex "monitor go" \
-ex "kill" \
build/px4_fmu-v4pro_default/px4_fmu-v4pro_default.elf
'''
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_TTL232R-3V3_*` --baudrate 57600'
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_TTL232R-3V3_*`'
} catch (Exception err) {
// always report passed for now
currentBuild.result = 'SUCCESS'
}
} // script
}
options {
timeout(time: 600, unit: 'SECONDS')
}
}
} // parallel } // parallel
} // stage Flash } // stage Flash