Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: on_target: test logs to artifacts #407

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading