Merge branch 'feat/monitor_auto_color' into 'master'

feat(tools): Add auto color to monitor and disable colors from chip logs

Closes IDF-362 and DOC-9110

See merge request espressif/esp-idf!33623
This commit is contained in:
Martin Vychodil
2024-10-11 01:04:26 +08:00
7 changed files with 19 additions and 7 deletions

View File

@@ -97,7 +97,7 @@ There are two outputs produced by example:
```
W (274) example: Switch to semihosted stdout
W (274) example: Switched back to UART stdout
I (274) example: Wrote 2798 bytes
I (274) example: Wrote 2776 bytes
====================== HOST DATA START =========================
The following are the graphical (non-control) characters defined by
ISO 8859-1 (1987). Descriptions in words aren't all that helpful,
@@ -115,4 +115,3 @@ There are two outputs produced by example:
====================== HOST DATA END =========================
I (694) example: Read 6121 bytes
```

View File

@@ -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: Unlicense OR CC0-1.0
import os
import shutil
import tempfile
@@ -42,7 +41,10 @@ def prepare() -> t.Generator[None, None, None]:
def test_semihost_vfs(dut: IdfDut) -> None:
dut.expect_exact('example: Switch to semihosted stdout')
dut.expect_exact('example: Switched back to UART stdout')
dut.expect_exact('example: Wrote 2798 bytes')
if dut.app.sdkconfig.get('LOG_COLORS') is True:
dut.expect_exact('example: Wrote 2798 bytes')
else:
dut.expect_exact('example: Wrote 2776 bytes')
dut.expect_exact('====================== HOST DATA START =========================')
with open(HOST_FILE_PATH) as f: