mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
ci: add qemu example
This commit is contained in:
22
examples/get-started/hello_world/pytest_hello_world.py
Normal file
22
examples/get-started/hello_world/pytest_hello_world.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
from typing import Callable
|
||||
|
||||
import pytest
|
||||
from pytest_embedded_idf.dut import IdfDut
|
||||
from pytest_embedded_qemu.dut import QemuDut
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
def test_hello_world(dut: IdfDut, log_minimum_free_heap_size: Callable[..., None]) -> None:
|
||||
dut.expect('Hello world!')
|
||||
log_minimum_free_heap_size()
|
||||
|
||||
|
||||
@pytest.mark.esp32 # we only support qemu on esp32 for now
|
||||
@pytest.mark.host_test
|
||||
@pytest.mark.qemu
|
||||
def test_hello_world_host(dut: QemuDut) -> None:
|
||||
dut.expect('Hello world!')
|
Reference in New Issue
Block a user