ble - fixing dict in summarize test run

This commit is contained in:
matt committed 2026-10-20 23:53:56 -07:00
1 parent 90cb977b35
commit 1dff4d71b6
2 files changed
+5 -3

No files matched your search

+2 -1
View File
@@ -75,8 +75,9 @@ pipeline {
sshagent([env.SSH_CREDENTIALS_ID]) { sshagent([env.SSH_CREDENTIALS_ID]) {
sh """ sh """
ssh -q -o StrictHostKeyChecking=no root@${params.host_ip} -o ServerAliveInterval=60 -o ServerAliveCountMax=120 << EOF ssh -q -o StrictHostKeyChecking=no root@${params.host_ip} -o ServerAliveInterval=60 -o ServerAliveCountMax=120 << EOF
echo Starting BLE test echo Initiating BLE test in Screen session ble_test_${env.TEST_HASH}
sleep 5 sleep 5
echo Pulling code changes from Gitea...
cd /opt/ble-test/ble_api cd /opt/ble-test/ble_api
git pull git pull
cd /opt/ble-test/ble_api/api cd /opt/ble-test/ble_api/api
+3 -2
View File
@@ -337,7 +337,8 @@ def test_driver(test_count = 0, bt_usb_id = None):
# helper function for summarizing test run results # helper function for summarizing test run results
def summarize_test_run(sensors): def summarize_test_run(sensors):
log.info(f" {sensors['name']} - Temp: {temp_ctof(sensors['name'])} | Humidity: {sensors['humidity']}") for sensor in sensors:
log.info(f" {sensor['name']} - Temp: {temp_ctof(sensor['temp'])} | Humidity: {sensor['humidity']}")
result = { result = {
"found_macs": found_macs, "found_macs": found_macs,
"sensor_results": sensors "sensor_results": sensors
@@ -362,7 +363,7 @@ def print_sensor_data(sensors):
# yes i am an insufferable american that doesn't think in celcius, sue me # yes i am an insufferable american that doesn't think in celcius, sue me
def temp_ctof(c_temp): def temp_ctof(c_temp):
f_temp = (c_temp * 1.80) + 32.0 f_temp = (c_temp * 1.80) + 32.0
return f_temp return round(f_temp, 1)
# This resets the BT adapter when things go caca # This resets the BT adapter when things go caca
def reset_adapter(): def reset_adapter():