Skip to content

Commit

Permalink
tests: on_target: adjust fullmfw fota workflow
Browse files Browse the repository at this point in the history
Full mfw fota is only run on cron and on selection.

Signed-off-by: Giacomo Dematteis <[email protected]>
  • Loading branch information
DematteisGiacomo committed Aug 30, 2024
1 parent 3e5d63e commit 91e52ff
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 3 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/on_target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
type: boolean
required: false
default: true
run_fullmfwfota_test:
type: boolean
required: true
default: false
run_dfu_tests:
type: boolean
required: false
Expand All @@ -35,6 +39,10 @@ on:
type: boolean
required: true
default: false
run_fullmfwfota_test:
type: boolean
required: true
default: false
run_dfu_tests:
type: boolean
required: true
Expand Down Expand Up @@ -91,7 +99,7 @@ jobs:
env:
SEGGER: ${{ secrets.SEGGER_DUT_1 }}

- name: Run FOTA tests
- name: Run FOTA tests (standard)
if: ${{ inputs.run_fota_tests }}
working-directory: thingy91x-oob/tests/on_target
run: |
Expand All @@ -104,6 +112,19 @@ jobs:
IMEI: ${{ secrets.IMEI_DUT_1 }}
FINGERPRINT: ${{ secrets.FINGERPRINT_DUT_1 }}

- name: Run FOTA tests (FULLMFW)
if: ${{ inputs.run_fullmfwfota_test }}
working-directory: thingy91x-oob/tests/on_target
run: |
pytest -s -v -m "dut1 and fullmfw_fota" \
--junit-xml=results/test-results-fullmfw-fota.xml \
--firmware-hex artifacts/hello.nrfcloud.com-${{ inputs.artifact_fw_version }}-thingy91x-debug-app.hex \
tests
env:
SEGGER: ${{ secrets.SEGGER_DUT_1 }}
IMEI: ${{ secrets.IMEI_DUT_1 }}
FINGERPRINT: ${{ secrets.FINGERPRINT_DUT_1 }}

- name: Run DFU tests
if: ${{ inputs.run_dfu_tests }}
working-directory: thingy91x-oob/tests/on_target
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@ name: Build and Test on Target

on:
workflow_dispatch:
inputs:
run_fota_tests:
type: boolean
required: true
default: true
run_fullmfwfota_test:
type: boolean
required: true
default: false
run_dfu_tests:
type: boolean
required: true
default: true
run_connectivity_bridge_tests:
type: boolean
required: true
default: true
schedule:
- cron: "0 0 * * *"
push:
Expand All @@ -20,3 +37,11 @@ jobs:
with:
artifact_fw_version: ${{ needs.build.outputs.version }}
artifact_run_id: ${{ needs.build.outputs.run_id }}
run_fota_tests: ${{ github.event.inputs.run_fota_tests == 'true' }}
run_fullmfwfota_test: >-
${{
github.event_name == 'schedule' ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.run_fullmfwfota_test == 'true')
}}
run_dfu_tests: ${{ github.event.inputs.run_dfu_tests == 'true' }}
run_connectivity_bridge_tests: ${{ github.event.inputs.run_connectivity_bridge_tests == 'true' }}
3 changes: 2 additions & 1 deletion tests/on_target/tests/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ markers =
dut1: device used for uart and fota tests
dut2: device used for dfu tests
uart: uart tests
fota: fota tests
fota: standard fota tests
fullmfw_fota: fullmfw fota tests
2 changes: 1 addition & 1 deletion tests/on_target/tests/test_fota.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,6 @@ def test_delta_mfw_fota(t91x_board, hex_file, run_fota_fixture):


@pytest.mark.dut1
@pytest.mark.fota
@pytest.mark.fullmfw_fota
def test_full_mfw_fota(t91x_board, hex_file, run_fota_fixture):
run_fota_fixture(FULL_MFW_BUNDLEID, "full", FULL_MFW_FOTA_TIMEOUT)

0 comments on commit 91e52ff

Please sign in to comment.