mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 13:14:32 +02:00
feat(ci): Added CI host test for the linux target on MacOS runners
This commit adds a CI host test for the linux target to build and run MacOS runners. Additionally, it adds a MacOS test for the hellow_world app.
This commit is contained in:
@@ -352,6 +352,36 @@ test_pytest_linux:
|
|||||||
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
|
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
|
||||||
--app-info-filepattern \"list_job_*.txt\"
|
--app-info-filepattern \"list_job_*.txt\"
|
||||||
|
|
||||||
|
test_pytest_macos:
|
||||||
|
extends:
|
||||||
|
- .host_test_template
|
||||||
|
- .before_script:build:macos
|
||||||
|
tags:
|
||||||
|
- macos_shell
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- XUNIT_RESULT.xml
|
||||||
|
- pytest-embedded/
|
||||||
|
- "**/build*/build_log.txt"
|
||||||
|
reports:
|
||||||
|
junit: XUNIT_RESULT.xml
|
||||||
|
script:
|
||||||
|
- run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -vv
|
||||||
|
--target linux
|
||||||
|
--pytest-apps
|
||||||
|
-m \"host_test and macos_shell\"
|
||||||
|
--collect-app-info "list_job_${CI_JOB_NAME_SLUG}.txt"
|
||||||
|
--modified-components ${MR_MODIFIED_COMPONENTS}
|
||||||
|
--modified-files ${MR_MODIFIED_FILES}
|
||||||
|
- python tools/ci/get_known_failure_cases_file.py
|
||||||
|
- run_cmd pytest
|
||||||
|
--target linux
|
||||||
|
-m \"host_test and macos_shell\"
|
||||||
|
--junitxml=XUNIT_RESULT.xml
|
||||||
|
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
|
||||||
|
--app-info-filepattern \"list_job_*.txt\"
|
||||||
|
|
||||||
|
|
||||||
test_idf_pytest_plugin:
|
test_idf_pytest_plugin:
|
||||||
extends:
|
extends:
|
||||||
- .host_test_template
|
- .host_test_template
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import logging
|
import logging
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
@@ -27,6 +26,13 @@ def test_hello_world_linux(dut: IdfDut) -> None:
|
|||||||
dut.expect('Hello world!')
|
dut.expect('Hello world!')
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.linux
|
||||||
|
@pytest.mark.host_test
|
||||||
|
@pytest.mark.macos_shell
|
||||||
|
def test_hello_world_macos(dut: IdfDut) -> None:
|
||||||
|
dut.expect('Hello world!')
|
||||||
|
|
||||||
|
|
||||||
def verify_elf_sha256_embedding(app: QemuApp, sha256_reported: str) -> None:
|
def verify_elf_sha256_embedding(app: QemuApp, sha256_reported: str) -> None:
|
||||||
sha256 = hashlib.sha256()
|
sha256 = hashlib.sha256()
|
||||||
with open(app.elf_file, 'rb') as f:
|
with open(app.elf_file, 'rb') as f:
|
||||||
|
@@ -46,6 +46,7 @@ SPECIAL_MARKERS = {
|
|||||||
ENV_MARKERS = {
|
ENV_MARKERS = {
|
||||||
# special markers
|
# special markers
|
||||||
'qemu': 'build and test using qemu, not real target',
|
'qemu': 'build and test using qemu, not real target',
|
||||||
|
'macos_shell': 'tests should be run on macos hosts',
|
||||||
# single-dut markers
|
# single-dut markers
|
||||||
'generic': 'tests should be run on generic runners',
|
'generic': 'tests should be run on generic runners',
|
||||||
'flash_suspend': 'support flash suspend feature',
|
'flash_suspend': 'support flash suspend feature',
|
||||||
|
Reference in New Issue
Block a user