Skip to content

Commit 55acd18

Browse files
committed
test: fota: Remove upload
Use env vars instead of runner vars
1 parent 8464c18 commit 55acd18

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

.github/workflows/target-test.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
upload-mcu-symbols \
107107
--software-type asset-tracker-template-ci \
108108
--software-version ${{ inputs.artifact_fw_version }} \
109-
asset-tracker-template-${{ inputs.artifact_fw_version }}-${{ matrix.device }}-nrf91.elf
109+
asset-tracker-template-${{ inputs.artifact_fw_version }}-${{ vars.DUT_DEVICE_TYPE }}-nrf91.elf
110110
111111
- name: Target Tests
112112
working-directory: asset-tracker-template/tests/on_target
@@ -135,15 +135,16 @@ jobs:
135135
fi
136136
shell: bash
137137
env:
138-
SEGGER: ${{ env.RUNNER_SERIAL_NUMBER }}
138+
SEGGER: ${{ vars.SEGGER_ID }}
139139
DUT_DEVICE_TYPE: ${{ matrix.device }}
140-
UUID: ${{ env.UUID }}
140+
UUID: ${{ vars.UUID }}
141141
NRFCLOUD_API_KEY: ${{ secrets.NRF_CLOUD_API_KEY }}
142142
LOG_FILENAME: att_test_log
143143
TEST_REPORT_NAME: ATT Firwmare Test Report
144144
MEMFAULT_ORGANIZATION_TOKEN: ${{ secrets.MEMFAULT_ORGANIZATION_TOKEN }}
145145
MEMFAULT_ORGANIZATION_SLUG: ${{ vars.MEMFAULT_ORGANIZATION_SLUG }}
146146
MEMFAULT_PROJECT_SLUG: ${{ vars.MEMFAULT_PROJECT_SLUG }}
147+
APP_BUNDLEID: ${{ vars.APP_BUNDLEID }}
147148

148149
- name: Commit and Push Badge File to gh-pages Branch
149150
if: always()

tests/on_target/tests/test_functional/test_fota.py

+5-15
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import os
99
import functools
1010
from utils.flash_tools import flash_device, reset_device
11-
from utils.nrfcloud_fota import FWType, NRFCloudFOTAError
1211
import sys
1312
sys.path.append(os.getcwd())
1413
from utils.logger import get_logger
@@ -25,6 +24,8 @@
2524
NEW_MFW_DELTA_VERSION = "mfw_nrf91x1_2.0.2-FOTA-TEST"
2625
MFW_202_VERSION = "mfw_nrf91x1_2.0.2"
2726

27+
APP_BUNDLEID = os.getenv("APP_BUNDLEID")
28+
2829
TEST_APP_BIN = {
2930
"thingy91x": "artifacts/stable_version_jan_2025-update-signed.bin",
3031
"nrf9151dk": "artifacts/nrf9151dk_mar_2025_update_signed.bin"
@@ -119,19 +120,6 @@ def _run_fota(bundle_id="", fota_type="app", fotatimeout=APP_FOTA_TIMEOUT, new_v
119120
dut_fota.uart.flush()
120121
reset_device()
121122
dut_fota.uart.wait_for_str("Connected to Cloud")
122-
123-
time.sleep(60)
124-
app_bin = TEST_APP_BIN[dut_fota.device_type]
125-
if fota_type == "app":
126-
bundle_id = dut_fota.fota.upload_firmware(
127-
"nightly_test_app",
128-
app_bin,
129-
TEST_APP_VERSION,
130-
"Bundle used for nightly test",
131-
FWType.app,
132-
)
133-
logger.info(f"Uploaded file {app_bin}: bundleId: {bundle_id}")
134-
135123
try:
136124
dut_fota.data['job_id'] = dut_fota.fota.create_fota_job(dut_fota.device_id, bundle_id)
137125
dut_fota.data['bundle_id'] = bundle_id
@@ -195,7 +183,9 @@ def test_app_fota(run_fota_fixture):
195183
'''
196184
Test application FOTA from nightly version to stable version
197185
'''
198-
run_fota_fixture() # Uses default parameters for app FOTA
186+
run_fota_fixture(
187+
bundle_id=APP_BUNDLEID,
188+
)
199189

200190
def test_delta_mfw_fota(run_fota_fixture):
201191
'''

0 commit comments

Comments
 (0)