From f5a1146517052975f1718a85b4f2a3185c00e8cb Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Tue, 26 Feb 2019 19:22:16 -0500 Subject: [PATCH] Jenkins hardware test add px4_fmu-v3 and px4_fmu-v4pro --- .ci/Jenkinsfile-hardware | 154 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 152 insertions(+), 2 deletions(-) diff --git a/.ci/Jenkinsfile-hardware b/.ci/Jenkinsfile-hardware index 237f9547ee..1f2c2cc03d 100644 --- a/.ci/Jenkinsfile-hardware +++ b/.ci/Jenkinsfile-hardware @@ -1,3 +1,5 @@ +#!/usr/bin/env groovy + pipeline { agent none stages { @@ -6,6 +8,30 @@ pipeline { 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') { agent { docker { @@ -22,7 +48,30 @@ pipeline { sh 'make sizes' sh 'ccache -s' 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 { always { @@ -38,6 +87,74 @@ pipeline { 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') { agent { label 'px4_fmu-v4' @@ -47,7 +164,6 @@ pipeline { try { sh 'export' sh 'find /dev/serial' - unstash 'scripts-px4_fmu-v4_default' unstash 'px4_fmu-v4_default' sh ''' gdb-multiarch -nx --batch \ -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 } // stage Flash