Files
esp-idf/components/log/host_test/log_test
Fu Hanxi b47f9850c7 ci: apply common-scripts CI refactor
Squashes these original commits for release/v5.4 backport traceability:
- 9b289dc5ad6 ci: apply idf-ci 1.x
- 381df980d57 ci: remove pip-cache and other unused jobs
- 32375a0a15e ci: apply common-scripts CI refactor
2026-08-17 14:13:15 +02:00
..

Supported Targets Linux

Simple log test on Linux target

This unit test tests basic functionality of the log component. The test does not use mocks. Instead, it runs the whole implementation of the component on the Linux host. The test framework is CATCH. For early log, we only perform a compile time test since there's nothing to test on Linux except for the log macros themselves (all the implementation will be in chip ROM).

Requirements

  • A Linux system
  • The usual IDF requirements for Linux system, as described in the Getting Started Guides.
  • The host's gcc/g++

This application has been tested on Ubuntu 20.04 with gcc version 9.3.0.

Build

First, make sure that the target is set to Linux. Run idf.py --preview set-target linux if you are not sure. Then do a normal IDF build: idf.py build.

Run

idf.py monitor

Example Output

Ideally, all tests pass, which is indicated by "All tests passed" in the last line:

$ idf.py monitor
===============================================================================
All tests passed (8 assertions in 6 test cases)