esp-idf.py -T results in "Error: No such option: -T"

leo876
Posts: 5
Joined: Mon Feb 01, 2021 2:50 pm

esp-idf.py -T results in "Error: No such option: -T"

Postby leo876 » Mon Jun 24, 2024 5:27 pm

Hello all,

Perhaps, and probably, I'm missing something obvious, regarding running unit tests using esp-idf.py.

I'm running the ESP-IDF plugin in VSC on a Linux machine. My idf.py version:

Code: Select all

idf.py --version
ESP-IDF v5.3-beta2
Running unit tests according to the documentation https://docs.espressif.com/projects/esp ... t-test-app results in

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

Anyone any pointers? Thanks

User avatar
kozmotronik
Posts: 23
Joined: Wed Jan 29, 2025 8:28 am

Re: esp-idf.py -T results in "Error: No such option: -T"

Postby kozmotronik » Fri Jul 18, 2025 1:01 pm

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).

Who is online

Users browsing this forum: Amazon [Bot], Qwantbot, Semrush [Bot] and 19 guests