From cf3802a0ac3e7bec98e03ba4e1dc01f3482c7c95 Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Mon, 28 Oct 2024 13:45:21 +0100 Subject: [PATCH] fix(test_apps): do not check line endings in dut.expect The default newlib read/write syscalls automatically convert newline endings from LF to CRLF on stdout. Therefore, the test should not specifically check for LF in the expected output, as the standard conversion for stdout is CRLF. While it is possible to change the expected line ending in the test from LF to CRLF, it seems more dependable to just avoid verifying line endings entirely. Signed-off-by: Frantisek Hrbata --- tools/test_apps/system/mmu_page_size/pytest_mmu_page_size.py | 4 ++-- .../system/unicore_bootloader/pytest_unicore_bootloader.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/test_apps/system/mmu_page_size/pytest_mmu_page_size.py b/tools/test_apps/system/mmu_page_size/pytest_mmu_page_size.py index cd9eb47db2..d4cb1104af 100644 --- a/tools/test_apps/system/mmu_page_size/pytest_mmu_page_size.py +++ b/tools/test_apps/system/mmu_page_size/pytest_mmu_page_size.py @@ -27,7 +27,7 @@ def test_app_mmu_page_size_32k_and_bootloader_mmu_page_size_64k(dut: Dut, app_do dut.serial.bootloader_flash(path_to_mmu_page_size_64k_build) dut.expect('MMU page size mismatch') dut.expect('App is running') - dut.expect('Partition test done\n') + dut.expect('Partition test done') @pytest.mark.esp32c6 @@ -49,4 +49,4 @@ def test_app_mmu_page_size_64k_and_bootloader_mmu_page_size_32k(dut: Dut, app_do dut.serial.bootloader_flash(path_to_mmu_page_size_32k_build) dut.expect('MMU page size mismatch') dut.expect('App is running') - dut.expect('Partition test done\n') + dut.expect('Partition test done') diff --git a/tools/test_apps/system/unicore_bootloader/pytest_unicore_bootloader.py b/tools/test_apps/system/unicore_bootloader/pytest_unicore_bootloader.py index da16ff07db..3e6ba5b11a 100644 --- a/tools/test_apps/system/unicore_bootloader/pytest_unicore_bootloader.py +++ b/tools/test_apps/system/unicore_bootloader/pytest_unicore_bootloader.py @@ -34,7 +34,7 @@ def test_multicore_app_and_unicore_bootloader(dut: Dut, app_downloader, config) if 'psram' in config: dut.expect(re.compile(r'Adding pool of \d+K of PSRAM memory to heap allocator')) dut.expect('App is running') - dut.expect('NVS test done\n') + dut.expect('NVS test done') @pytest.mark.esp32 @@ -62,4 +62,4 @@ def test_unicore_app_and_multicore_bootloader(dut: Dut, app_downloader, config) if 'psram' in config: dut.expect(re.compile(r'Adding pool of \d+K of PSRAM memory to heap allocator')) dut.expect('App is running') - dut.expect('NVS test done\n') + dut.expect('NVS test done')