Skip to content

Commit df362e9

Browse files
committed
fixup
1 parent a8b49f4 commit df362e9

File tree

5 files changed

+19
-18
lines changed

5 files changed

+19
-18
lines changed

.github/workflows/build-and-target-test.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ name: Build and Test
33
on:
44
workflow_dispatch:
55
inputs:
6-
pytest_marker:
7-
description: Pytest marker selection
8-
type: string
9-
required: false
10-
default: '-m "not slow"'
116
build_all:
127
description: Build all configurations
138
type: boolean
@@ -27,7 +22,7 @@ jobs:
2722
uses: ./.github/workflows/build.yml
2823
secrets: inherit
2924
with:
30-
build_all: ${{ inputs.build_all }}
25+
build_all: ${{ inputs.build_all || false }}
3126
test:
3227
permissions:
3328
actions: read
@@ -39,4 +34,4 @@ jobs:
3934
with:
4035
artifact_fw_version: ${{ needs.build.outputs.version }}
4136
artifact_run_id: ${{ needs.build.outputs.run_id }}
42-
pytest_marker: ${{ inputs.pytest_marker }}
37+
test_all: ${{ inputs.build-all || false }}

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ jobs:
169169

170170
# Asset Tracker Template debug firmware build
171171
- name: Build thingy91x debug firmware
172+
if: ${{ inputs.build_all }}
172173
uses: ./asset-tracker-template/.github/actions/build-step
173174
with:
174175
memfault_project_key: ${{ secrets.MEMFAULT_PROJECT_KEY }}

.github/workflows/target-test.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ on:
99
artifact_fw_version:
1010
type: string
1111
required: true
12-
pytest_marker:
13-
type: string
12+
test_all:
13+
type: boolean
1414
required: false
15-
default: -m "not slow"
15+
default: false
1616
pytest_path:
1717
type: string
1818
required: false
@@ -33,10 +33,11 @@ on:
3333
description: The run ID of the workflow to fetch artifacts from
3434
type: string
3535
required: true
36-
pytest_marker:
37-
description: The pytest marker to run
38-
type: string
36+
test_all:
37+
description: Run all tests
38+
type: boolean
3939
required: false
40+
default: false
4041
pytest_path:
4142
description: Select test execution path
4243
type: string
@@ -60,12 +61,15 @@ jobs:
6061
if [[ ${{ github.event_name == 'schedule' }} == true ]]; then
6162
marker=''
6263
matrix='["thingy91x","nrf9151dk","ppk_thingy91x"]'
64+
elif [[ ${{ inputs.test_all }} == true ]]; then
65+
marker=''
66+
matrix='["thingy91x","nrf9151dk","ppk_thingy91x"]'
6367
elif [[ ${{ github.event_name == 'push' }} == true ]]; then
6468
marker='-m "not slow"'
6569
matrix='["thingy91x"]'
6670
else
67-
marker='${{ inputs.pytest_marker }}'
68-
matrix=${{ inputs.devices }}
71+
marker='-m "not slow"'
72+
matrix='["thingy91x"]'
6973
fi
7074
7175
echo Matrix as string: $matrix
@@ -128,7 +132,7 @@ jobs:
128132
nrfutil install trace
129133
130134
- name: Upload symbol file to Memfault
131-
if: ${{ matrix.device == 'thingy91x' }}
135+
if: ${{ inputs.test_all }}
132136
working-directory: asset-tracker-template/tests/on_target/artifacts
133137
run: |
134138
memfault \

tests/on_target/tests/test_functional/test_memfault.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def timestamp(event):
8888
event["captured_date"], "%Y-%m-%dT%H:%M:%S.%f%z"
8989
)
9090

91+
@pytest.mark.slow
9192
def test_memfault(dut_board, debug_hex_file):
9293
# Save timestamp of latest coredump
9394
coredumps = get_latest_coredump_traces(IMEI)

tests/on_target/tests/test_functional/test_patched.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
##########################################################################################
55

66
import os
7-
from utils.flash_tools import flash_device, reset_device
8-
import sys
97
import pytest
108
from utils.flash_tools import flash_device, reset_device
9+
import sys
1110

1211
sys.path.append(os.getcwd())
1312
from utils.logger import get_logger
1413

1514
logger = get_logger()
1615

16+
@pytest.mark.slow
1717
def test_patched_firmware(dut_board, hex_file_patched):
1818
"""Test the patched firmware with magnetometer functionality."""
1919
# Only run this test for thingy91x devices

0 commit comments

Comments
 (0)