feat(tools): esp-idf-sbom integration into idf.py

While the `esp-idf-sbom` `idf.py` extension is implemented within the
`esp-idf-sbom` python package, a few minor changes are also required on
the `idf.py` side.

1. Add `esp-idf-sbom` as a core requirement so it is automatically
   installed by the installation scripts.
2. Add the `sbom-create` action to the list of actions for which the
   flashing-related closing message is displayed.
3. Update the documentation in the api-guides for tools.

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
Frantisek Hrbata
2026-02-16 09:03:17 +01:00
parent 4577b3c854
commit b90098a9f2
4 changed files with 47 additions and 31 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import json
import logging
@@ -383,3 +383,9 @@ def test_hints_components_loading(idf_copy: Path, test_app_copy: Path, idf_py: I
assert 'HINT FROM PROJECT COMPONENT' in ret.stderr, (
'Hint from project component should be displayed in build output'
)
def test_sbom_create_cmd(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
logging.info('Test if sbom-create command works correctly')
idf_py('sbom-create', '--spdx-file', 'test_app.spdx')
assert (test_app_copy / 'test_app.spdx').is_file()