From b0191ef292dcf18dbdc4131031f524082bc54042 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Wed, 29 Jun 2022 21:51:03 +0200 Subject: [PATCH] examples: import_lib: add example test --- .../cmake/import_lib/pytest_import_lib.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 examples/build_system/cmake/import_lib/pytest_import_lib.py diff --git a/examples/build_system/cmake/import_lib/pytest_import_lib.py b/examples/build_system/cmake/import_lib/pytest_import_lib.py new file mode 100644 index 0000000000..49a450a1db --- /dev/null +++ b/examples/build_system/cmake/import_lib/pytest_import_lib.py @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: CC0-1.0 + +import pytest +from pytest_embedded_qemu.dut import QemuDut + + +@pytest.mark.esp32 # we only support qemu on esp32 for now +@pytest.mark.host_test +@pytest.mark.qemu +def test_pytest_host(dut: QemuDut) -> None: + dut.expect_exact('Initializing the filesystem') + dut.expect_exact('Read XML data:') + dut.expect_exact('Parsed XML data:') + dut.expect_exact('To: Tove') + dut.expect_exact('From: Jani') + dut.expect_exact('Heading: Reminder') + dut.expect_exact('Body: Don\'t forget me this weekend!') + dut.expect_exact('Example end', timeout=20)