• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

main/11-Mar-2024-276204

CMakeLists.txtD11-Mar-2024204 75

README.mdD11-Mar-20241.3 KiB3723

sdkconfig.defaultsD11-Mar-2024257 98

README.md

1| Supported Targets | Linux |
2| ----------------- | ----- |
3
4# Simple log test on Linux target
5
6This 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).
7
8## Requirements
9
10* A Linux system
11* The usual IDF requirements for Linux system, as described in the [Getting Started Guides](../../../../docs/en/get-started/index.rst).
12* The host's gcc/g++
13
14This application has been tested on Ubuntu 20.04 with `gcc` version *9.3.0*.
15
16## Build
17
18First, 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`.
19
20## Run
21
22IDF monitor doesn't work yet for Linux. You have to run the app manually:
23
24```bash
25./build/test_log_host.elf
26```
27
28## Example Output
29
30Ideally, all tests pass, which is indicated by "All tests passed" in the last line:
31
32```bash
33$ ./build/test_log_host.elf
34===============================================================================
35All tests passed (8 assertions in 6 test cases)
36```
37