-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: application_development: Add spdx SBOM test
Add a test where the software bill of materials is generated using the west spdx extension. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
- Loading branch information
Showing
4 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
tests/application_development/software_bill_of_materials/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copyright (c) 2024 Basalte bv | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
|
||
project(sbom_spdx) | ||
target_sources(app PRIVATE ${ZEPHYR_BASE}/misc/empty_file.c) | ||
|
||
enable_testing() | ||
include(CTest) | ||
|
||
add_test(NAME spdx_gen COMMAND west spdx -d ${CMAKE_BINARY_DIR}) |
10 changes: 10 additions & 0 deletions
10
tests/application_development/software_bill_of_materials/PreLoad.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) 2024 Basalte bv | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# WARNING: the PreLoad.cmake is an undocumented feature | ||
# We need to create the CMake file API query before the configure step | ||
|
||
execute_process( | ||
COMMAND west spdx --init -d ${CMAKE_BINARY_DIR} | ||
COMMAND_ERROR_IS_FATAL ANY | ||
) |
1 change: 1 addition & 0 deletions
1
tests/application_development/software_bill_of_materials/prj.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_BUILD_OUTPUT_META=y |
8 changes: 8 additions & 0 deletions
8
tests/application_development/software_bill_of_materials/testcase.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
common: | ||
tags: | ||
- spdx | ||
integration_platforms: | ||
- native_sim | ||
harness: ctest | ||
tests: | ||
sbom.spdx: {} |