Testing with ESP-IDF is so difficult...
I am getting the same output as of 2025:
Code: Select all
$ idf.py -T all build
Usage: idf.py [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
Try 'idf.py --help' for help.
Error: No such option: -T
So, what is the deal with this? Has the -T flag deprecated or it is something has to do with a possible misconfiguration?
I already have the pytest installed in my system as well as other python requirements. Also checking the idf.py documentation, I can't see any -T option around:
https://docs.espressif.com/projects/esp ... df-py.html.
But the following instructions are given in the latest documenteation:
https://documentation.espressif.com/pro ... t-test-app
Building Unit Test App
Follow the setup instructions in the top-level esp-idf README. Make sure that IDF_PATH environment variable is set to point to the path of esp-idf top-level directory.
Change into tools/unit-test-app directory to configure and build it:
idf.py menuconfig - configure unit test app.
idf.py -T all build - build unit test app with tests for each component having tests in the test subdirectory.
idf.py -T "xxx yyy" build - build unit test app with tests for some space-separated specific components (For instance: idf.py -T heap build - build unit tests only for heap component directory).
idf.py -T all -E "xxx yyy" build - build unit test app with all unit tests, except for unit tests of some components (For instance: idf.py -T all -E "ulp mbedtls" build - build all unit tests excludes ulp and mbedtls components).