File tree Expand file tree Collapse file tree 4 files changed +20
-24
lines changed
Expand file tree Collapse file tree 4 files changed +20
-24
lines changed Original file line number Diff line number Diff line change 3232
3333 - run : node .github/workflows/fetch-release-assets.mjs ${{ inputs.version }}
3434
35- - name : Publish symbol files
36- run : |
37- source venv/bin/activate
38- memfault \
39- --org-token ${{ secrets.MEMFAULT_ORGANIZATION_TOKEN }} \
40- --org ${{ vars.MEMFAULT_ORGANIZATION_SLUG }} \
41- --project ${{ vars.MEMFAULT_PROJECT_SLUG }} \
42- upload-mcu-symbols \
43- --check-uploaded \
44- asset-tracker-template-${{ inputs.version }}-thingy91x-nrf91.elf
45-
46- memfault \
47- --org-token ${{ secrets.MEMFAULT_ORGANIZATION_TOKEN }} \
48- --org ${{ vars.MEMFAULT_ORGANIZATION_SLUG }} \
49- --project ${{ vars.MEMFAULT_PROJECT_SLUG }} \
50- upload-mcu-symbols \
51- --check-uploaded \
52- asset-tracker-template-${{ inputs.version }}-nrf9151dk-nrf91.elf
53-
54- - name : Publish debug symbol files
35+ - name : Publish Memfault debug symbols
5536 run : |
5637 source venv/bin/activate
5738 memfault \
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ jobs:
128128 nrfutil install trace
129129
130130 - name : Upload symbol file to Memfault
131- if : ${{ matrix.device != 'ppk_thingy91x ' }}
131+ if : ${{ matrix.device == 'thingy91x ' }}
132132 working-directory : asset-tracker-template/tests/on_target/artifacts
133133 run : |
134134 memfault \
@@ -137,7 +137,7 @@ jobs:
137137 --project ${{ vars.MEMFAULT_PROJECT_SLUG }} \
138138 upload-mcu-symbols \
139139 --check-uploaded \
140- asset-tracker-template-${{ inputs.artifact_fw_version }}-${{ vars.DUT_DEVICE_TYPE }}-nrf91.elf
140+ asset-tracker-template-${{ inputs.artifact_fw_version }}-debug- ${{ vars.DUT_DEVICE_TYPE }}-nrf91.elf
141141
142142 - name : Generate and Push RAM and FLASH Badges
143143 if : ${{ matrix.device == 'thingy91x' && inputs.is_scheduled }}
Original file line number Diff line number Diff line change @@ -140,6 +140,18 @@ def hex_file():
140140
141141 pytest .fail ("No matching firmware .hex file found in the artifacts directory" )
142142
143+ @pytest .fixture (scope = "session" )
144+ def debug_hex_file ():
145+ # Search for the debug firmware hex file in the artifacts folder
146+ artifacts_dir = "artifacts/"
147+ hex_pattern = f"asset-tracker-template-{ r'[0-9a-z\.]+' } -debug-{ DUT_DEVICE_TYPE } -nrf91.hex"
148+
149+ for file in os .listdir (artifacts_dir ):
150+ if re .match (hex_pattern , file ):
151+ return os .path .join (artifacts_dir , file )
152+
153+ pytest .fail ("No matching debug firmware .hex file found in the artifacts directory" )
154+
143155@pytest .fixture (scope = "session" )
144156def bin_file ():
145157 # Search for the firmware bin file in the artifacts folder
Original file line number Diff line number Diff line change @@ -89,14 +89,17 @@ def timestamp(event):
8989 event ["captured_date" ], "%Y-%m-%dT%H:%M:%S.%f%z"
9090 )
9191
92- def test_memfault (dut_board , hex_file ):
92+ def test_memfault (dut_board , debug_hex_file ):
93+ if dut_board .device_type != 'thingy91x' :
94+ pytest .skip ("Memfault testing requires debug build which is only available for thingy91x" )
95+
9396 # Save timestamp of latest coredump
9497 coredumps = get_latest_coredump_traces (IMEI )
9598 logger .debug (f"Found coredumps: { coredumps } " )
9699 timestamp_old_coredump = timestamp (coredumps [0 ]) if coredumps else None
97100 logger .debug (f"Timestamp old coredump: { timestamp_old_coredump } " )
98101
99- flash_device (os .path .abspath (hex_file ))
102+ flash_device (os .path .abspath (debug_hex_file ))
100103 dut_board .uart .xfactoryreset ()
101104 dut_board .uart .flush ()
102105 reset_device ()
You can’t perform that action at this time.
0 commit comments