Skip to content

Commit

Permalink
tests: on_target: test logs to artifacts
Browse files Browse the repository at this point in the history
Add test logs to artifacts.

Signed-off-by: Giacomo Dematteis <giacomo.dematteis@nordicsemi.no>
  • Loading branch information
DematteisGiacomo committed Oct 15, 2024
1 parent 162c5c0 commit 8af6f3e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/on_target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ jobs:
tests
env:
SEGGER: ${{ secrets.SEGGER_DUT_1 }}
LOG_FILENAME: oob_uart_test_log

- name: Run FOTA tests (standard)
if: ${{ inputs.run_fota_tests }}
Expand All @@ -145,6 +146,7 @@ jobs:
SEGGER: ${{ secrets.SEGGER_DUT_1 }}
IMEI: ${{ secrets.IMEI_DUT_1 }}
FINGERPRINT: ${{ secrets.FINGERPRINT_DUT_1 }}
LOG_FILENAME: oob_fota_test_log

- name: Run FOTA tests (FULLMFW)
if: ${{ inputs.run_fullmfwfota_test }}
Expand All @@ -157,6 +159,7 @@ jobs:
SEGGER: ${{ secrets.SEGGER_DUT_1 }}
IMEI: ${{ secrets.IMEI_DUT_1 }}
FINGERPRINT: ${{ secrets.FINGERPRINT_DUT_1 }}
LOG_FILENAME: oob_fullmfw_fota_test_log

- name: Run DFU tests
if: ${{ inputs.run_dfu_tests }}
Expand All @@ -174,6 +177,7 @@ jobs:
NRF91_HEX_FILE: artifacts/hello.nrfcloud.com-${{ inputs.artifact_fw_version }}-thingy91x-nrf91-bootloader.hex
NRF91_APP_UPDATE_ZIP: artifacts/hello.nrfcloud.com-${{ inputs.artifact_fw_version }}-thingy91x-nrf91-dfu.zip
NRF91_BL_UPDATE_ZIP: artifacts/hello.nrfcloud.com-${{ inputs.artifact_fw_version }}-thingy91x-nrf91-bootloader.zip
LOG_FILENAME: oob_dfu_test_log

# - name: Check nRF53 connectivity bridge version
# if: ${{ inputs.run_connectivity_bridge_tests }}
Expand All @@ -189,3 +193,11 @@ jobs:
summary: true
fail-on-empty: true
title: OOB FW Test Results

- name: Push log files to artifacts
uses: actions/upload-artifact@v4
id: artifact-upload-test-logs
with:
name: test-logs
path: |
thingy91x-oob/tests/on_target/outcomes/logs/*.txt
2 changes: 1 addition & 1 deletion tests/on_target/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_logger(log_level = LOG_LEVEL):

if LOG_FILENAME:
os.makedirs(LOG_DIR, exist_ok=True)
for level in ["debug", "info"]:
for level in ["debug"]:
file_handler = logging.FileHandler(f"{LOG_DIR}/{LOG_FILENAME}_{level}.txt")
file_handler.setLevel(level.upper())
logger.addHandler(file_handler)
Expand Down

0 comments on commit 8af6f3e

Please sign in to comment.