Skip to content
Snippets Groups Projects
Unverified Commit 542cd7f2 authored by Daniel Agar's avatar Daniel Agar Committed by GitHub
Browse files

Jenkins move hardware testing to JLink debugger setup

parent 8ae3f500
No related branches found
No related tags found
No related merge requests found
...@@ -6,10 +6,10 @@ pipeline { ...@@ -6,10 +6,10 @@ pipeline {
parallel { parallel {
stage('px4_fmu-v2') { stage('px4_fmu-v4_default') {
agent { agent {
docker { docker {
image 'px4io/px4-dev-nuttx:2018-11-22' image 'px4io/px4-dev-nuttx:2019-01-01'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw' args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
} }
} }
...@@ -18,11 +18,11 @@ pipeline { ...@@ -18,11 +18,11 @@ pipeline {
sh 'make distclean' sh 'make distclean'
sh 'ccache -z' sh 'ccache -z'
sh 'git fetch --tags' sh 'git fetch --tags'
sh 'make px4_fmu-v2_test' sh 'make px4_fmu-v4_default'
sh 'make sizes' sh 'make sizes'
sh 'ccache -s' sh 'ccache -s'
stash includes: 'build/px4_fmu-v2_test/px4_fmu-v2_test.elf', name: 'px4_fmu-v2_test' 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-v2' stash includes: 'Tools/HIL/monitor_firmware_upload.py, Tools/HIL/run_tests.py', name: 'scripts-px4_fmu-v4_default'
} }
post { post {
always { always {
...@@ -31,10 +31,10 @@ pipeline { ...@@ -31,10 +31,10 @@ pipeline {
} }
} }
stage('px4_fmu-v4 (stackcheck)') { stage('px4_fmu-v4_stackcheck') {
agent { agent {
docker { docker {
image 'px4io/px4-dev-nuttx:2018-11-22' image 'px4io/px4-dev-nuttx:2019-01-01'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw' args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
} }
} }
...@@ -47,7 +47,7 @@ pipeline { ...@@ -47,7 +47,7 @@ pipeline {
sh 'make sizes' sh 'make sizes'
sh 'ccache -s' sh 'ccache -s'
stash includes: 'build/px4_fmu-v4_stackcheck/px4_fmu-v4_stackcheck.elf', name: 'px4_fmu-v4_stackcheck' stash includes: 'build/px4_fmu-v4_stackcheck/px4_fmu-v4_stackcheck.elf', name: 'px4_fmu-v4_stackcheck'
stash includes: 'Tools/HIL/monitor_firmware_upload.py, Tools/HIL/run_tests.py', name: 'scripts-px4_fmu-v4' stash includes: 'Tools/HIL/monitor_firmware_upload.py, Tools/HIL/run_tests.py', name: 'scripts-px4_fmu-v4_stackcheck'
} }
post { post {
always { always {
...@@ -63,29 +63,31 @@ pipeline { ...@@ -63,29 +63,31 @@ pipeline {
parallel { parallel {
stage('px4_fmu-v2') { stage('px4fmu-v4_default') {
agent { agent {
label 'px4fmu-v2' label 'px4fmu-v4'
} }
steps { steps {
script { script {
try { try {
sh 'export' sh 'export'
sh 'find /dev/serial' sh 'find /dev/serial'
unstash 'scripts-px4_fmu-v2' unstash 'scripts-px4_fmu-v4_default'
unstash 'px4_fmu-v2_test' unstash 'px4_fmu-v4_default'
sh ''' gdb -nx --batch \ sh ''' JLinkGDBServerCLExe -device STM32F427VI -endian little -if SWD -speed auto -noir -LocalhostOnly -silent & \
-ex "target extended-remote `find /dev/serial -name *Black_Magic_Probe_*-if00`" \ gdb-multiarch -nx --batch \
-ex "monitor version" \ -ex "target remote localhost:2331" \
-ex "monitor connect_srst enable" \ -ex "monitor reset 0" \
-ex "monitor swdp_scan" \
-ex "attach 1" \
-ex "load" \ -ex "load" \
-ex "monitor compare-sections" \
-ex "monitor reset 0" \
-ex "monitor sleep 1000" \
-ex "monitor go" \
-ex "kill" \ -ex "kill" \
build/px4_fmu-v2_test/px4_fmu-v2_test.elf build/px4_fmu-v4_default/px4_fmu-v4_default.elf
''' '''
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *Black_Magic_Probe_*-if02` --baudrate 57600' 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 *Black_Magic_Probe_*-if02`' sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_TTL232R-3V3_*`'
} catch (Exception err) { } catch (Exception err) {
// always report passed for now // always report passed for now
currentBuild.result = 'SUCCESS' currentBuild.result = 'SUCCESS'
...@@ -97,7 +99,7 @@ pipeline { ...@@ -97,7 +99,7 @@ pipeline {
} }
} }
stage('px4_fmu-v4') { stage('px4fmu-v4_stackcheck') {
agent { agent {
label 'px4fmu-v4' label 'px4fmu-v4'
} }
...@@ -106,20 +108,22 @@ pipeline { ...@@ -106,20 +108,22 @@ pipeline {
try { try {
sh 'export' sh 'export'
sh 'find /dev/serial' sh 'find /dev/serial'
unstash 'scripts-px4_fmu-v4' unstash 'scripts-px4_fmu-v4_stackcheck'
unstash 'px4_fmu-v4_stackcheck' unstash 'px4_fmu-v4_stackcheck'
sh ''' gdb -nx --batch \ sh ''' JLinkGDBServerCLExe -device STM32F427VI -endian little -if SWD -speed auto -noir -LocalhostOnly -silent & \
-ex "target extended-remote `find /dev/serial -name *Black_Magic_Probe_*-if00`" \ gdb-multiarch -nx --batch \
-ex "monitor version" \ -ex "target remote localhost:2331" \
-ex "monitor connect_srst enable" \ -ex "monitor reset 0" \
-ex "monitor swdp_scan" \
-ex "attach 1" \
-ex "load" \ -ex "load" \
-ex "monitor compare-sections" \
-ex "monitor reset 0" \
-ex "monitor sleep 1000" \
-ex "monitor go" \
-ex "kill" \ -ex "kill" \
build/px4_fmu-v4_stackcheck/px4_fmu-v4_stackcheck.elf build/px4_fmu-v4_stackcheck/px4_fmu-v4_stackcheck.elf
''' '''
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *Black_Magic_Probe_*-if02` --baudrate 57600' 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 *Black_Magic_Probe_*-if02`' sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_TTL232R-3V3_*`'
} catch (Exception err) { } catch (Exception err) {
// always report passed for now // always report passed for now
currentBuild.result = 'SUCCESS' currentBuild.result = 'SUCCESS'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment