mirror of
https://github.com/greatscottgadgets/hackrf.git
synced 2026-03-11 09:54:43 +01:00
160
Jenkinsfile
vendored
160
Jenkinsfile
vendored
@@ -6,33 +6,167 @@ pipeline {
|
||||
sh 'docker build -t hackrf https://github.com/greatscottgadgets/hackrf.git'
|
||||
}
|
||||
}
|
||||
stage('Test Suite') {
|
||||
stage('Test HackRF One') {
|
||||
agent {
|
||||
docker {
|
||||
image 'hackrf'
|
||||
reuseNode true
|
||||
args '--group-add=20 --group-add=46 --device-cgroup-rule="c 189:* rmw" --device-cgroup-rule="c 166:* rmw" -v /dev/bus/usb:/dev/bus/usb -e TESTER=0000000000000000325866e629a25623 -e EUT=RunningFromRAM -v /tmp/req_pipe:/tmp/req_pipe -v /tmp/res_pipe:/tmp/res_pipe'
|
||||
args '''--group-add=20 --group-add=46 --device-cgroup-rule="c 189:* rmw" \
|
||||
--device-cgroup-rule="c 166:* rmw" -v /dev/bus/usb:/dev/bus/usb \
|
||||
-e TESTER=0000000000000000325866e629a25623 -e EUT=RunningFromRAM \
|
||||
-v /tmp/req_pipe:/tmp/req_pipe -v /tmp/res_pipe:/tmp/res_pipe'''
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh './ci-scripts/install-host.sh'
|
||||
sh './ci-scripts/install-firmware.sh'
|
||||
sh 'hubs all off'
|
||||
retry(3) {
|
||||
sh 'hubs h1_eut reset'
|
||||
sh 'sleep 1s'
|
||||
sh './ci-scripts/test-host.sh'
|
||||
sh './ci-scripts/install_host.sh'
|
||||
sh './ci-scripts/build_h1_firmware.sh'
|
||||
script {
|
||||
try {
|
||||
// Allow 10 seconds for the USB hub port power server to respond
|
||||
timeout(time: 10, unit: 'SECONDS') {
|
||||
sh 'hubs all off'
|
||||
}
|
||||
} catch (err) {
|
||||
echo "USB hub port power server command timeout reached."
|
||||
throw err
|
||||
}
|
||||
}
|
||||
retry(3) {
|
||||
sh 'hubs h1_tester h1_eut reset'
|
||||
script {
|
||||
try {
|
||||
// Allow 10 seconds for the USB hub port power server to respond
|
||||
timeout(time: 10, unit: 'SECONDS') {
|
||||
sh 'hubs h1_eut reset'
|
||||
}
|
||||
} catch (err) {
|
||||
echo "USB hub port power server command timeout reached."
|
||||
throw err
|
||||
}
|
||||
}
|
||||
sh 'sleep 1s'
|
||||
sh 'python3 ci-scripts/hackrf_test.py --unattended --ci --log log --rev r4 --manufacturer --hostdir host/build/hackrf-tools/src/ --fwupdate firmware/hackrf_usb/build/ --tester 0000000000000000325866e629a25623 --eut RunningFromRAM'
|
||||
sh './ci-scripts/test_host.sh'
|
||||
}
|
||||
retry(3) {
|
||||
script {
|
||||
try {
|
||||
// Allow 10 seconds for the USB hub port power server to respond
|
||||
timeout(time: 10, unit: 'SECONDS') {
|
||||
sh 'hubs h1_tester h1_eut reset'
|
||||
}
|
||||
} catch (err) {
|
||||
echo "USB hub port power server command timeout reached."
|
||||
throw err
|
||||
}
|
||||
}
|
||||
sh 'sleep 1s'
|
||||
sh '''python3 ci-scripts/hackrf_test.py --ci --log log \
|
||||
--hostdir host/build/hackrf-tools/src/ \
|
||||
--fwupdate firmware/hackrf_usb/build/ \
|
||||
--tester 0000000000000000325866e629a25623 \
|
||||
--eut RunningFromRAM --unattended --rev r4'''
|
||||
sh 'hubs all off'
|
||||
}
|
||||
retry(3) {
|
||||
sh 'hubs h1_eut reset'
|
||||
script {
|
||||
try {
|
||||
// Allow 10 seconds for the USB hub port power server to respond
|
||||
timeout(time: 10, unit: 'SECONDS') {
|
||||
sh 'hubs h1_eut reset'
|
||||
}
|
||||
} catch (err) {
|
||||
echo "USB hub port power server command timeout reached."
|
||||
throw err
|
||||
}
|
||||
}
|
||||
sh 'sleep 1s'
|
||||
sh 'python3 ci-scripts/test-sgpio-debug.py'
|
||||
sh 'python3 ci-scripts/test_sgpio_debug.py'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Test HackRF Pro') {
|
||||
agent {
|
||||
docker {
|
||||
image 'hackrf'
|
||||
reuseNode true
|
||||
args '''--group-add=20 --group-add=46 --device-cgroup-rule="c 189:* rmw" \
|
||||
--device-cgroup-rule="c 166:* rmw" -v /dev/bus/usb:/dev/bus/usb \
|
||||
-e TESTER=0000000000000000325866e629a25623 -e EUT=RunningFromRAM \
|
||||
-v /tmp/req_pipe:/tmp/req_pipe -v /tmp/res_pipe:/tmp/res_pipe'''
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh './ci-scripts/install_host.sh'
|
||||
sh './ci-scripts/build_hpro_firmware.sh'
|
||||
script {
|
||||
try {
|
||||
// Allow 10 seconds for the USB hub port power server to respond
|
||||
timeout(time: 10, unit: 'SECONDS') {
|
||||
sh 'hubs all off'
|
||||
}
|
||||
} catch (err) {
|
||||
echo "USB hub port power server command timeout reached."
|
||||
throw err
|
||||
}
|
||||
}
|
||||
retry(3) {
|
||||
script {
|
||||
try {
|
||||
// Allow 10 seconds for the USB hub port power server to respond
|
||||
timeout(time: 10, unit: 'SECONDS') {
|
||||
sh 'hubs hpro_eut reset'
|
||||
}
|
||||
} catch (err) {
|
||||
echo "USB hub port power server command timeout reached."
|
||||
throw err
|
||||
}
|
||||
}
|
||||
sh 'sleep 1s'
|
||||
sh './ci-scripts/test_host.sh'
|
||||
}
|
||||
retry(3) {
|
||||
script {
|
||||
try {
|
||||
// Allow 10 seconds for the USB hub port power server to respond
|
||||
timeout(time: 10, unit: 'SECONDS') {
|
||||
sh 'hubs hpro_tester hpro_eut reset'
|
||||
}
|
||||
} catch (err) {
|
||||
echo "USB hub port power server command timeout reached."
|
||||
throw err
|
||||
}
|
||||
}
|
||||
sh 'sleep 1s'
|
||||
sh '''python3 ci-scripts/hackrf_pro_test.py --ci --log log \
|
||||
--hostdir host/build/hackrf-tools/src \
|
||||
--fwupdate firmware/hackrf_usb/build \
|
||||
--tester 0000000000000000a06063c82338145f \
|
||||
--eut RunningFromRAM -p --rev r1.2'''
|
||||
script {
|
||||
try {
|
||||
// Allow 10 seconds for the USB hub port power server to respond
|
||||
timeout(time: 10, unit: 'SECONDS') {
|
||||
sh 'hubs all off'
|
||||
}
|
||||
} catch (err) {
|
||||
echo "USB hub port power server command timeout reached."
|
||||
throw err
|
||||
}
|
||||
}
|
||||
}
|
||||
retry(3) {
|
||||
script {
|
||||
try {
|
||||
// Allow 10 seconds for the USB hub port power server to respond
|
||||
timeout(time: 10, unit: 'SECONDS') {
|
||||
sh 'hubs hpro_eut reset'
|
||||
}
|
||||
} catch (err) {
|
||||
echo "USB hub port power server command timeout reached."
|
||||
throw err
|
||||
}
|
||||
}
|
||||
sh 'sleep 1s'
|
||||
sh 'python3 ci-scripts/test_sgpio_debug.py'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
8
ci-scripts/build_hpro_firmware.sh
Executable file
8
ci-scripts/build_hpro_firmware.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
git submodule init
|
||||
git submodule update
|
||||
cd firmware/hackrf_usb
|
||||
cmake -DBOARD=PRALINE -B build
|
||||
cmake --build build
|
||||
cd ../..
|
||||
1680
ci-scripts/hackrf_pro_test.py
Normal file
1680
ci-scripts/hackrf_pro_test.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1045,7 +1045,7 @@ class HackRF:
|
||||
|
||||
tx_out, tx_err = transmit.communicate(timeout=TIMEOUT)
|
||||
if transmit.returncode != 0:
|
||||
log(tx_out + tx_err)
|
||||
out(tx_out + tx_err)
|
||||
out(f"Warning: {transmitter.name} transmit failed")
|
||||
return rssi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user