Skip to content

Commit 276e835

Browse files
authored
Merge pull request #14181 from hugueskamba/hk_cmake_greentea_mbedtls
CMake: Add support for Mbed TLS Greentea tests
2 parents ba6f566 + 9a1c24e commit 276e835

File tree

4 files changed

+54
-1
lines changed

4 files changed

+54
-1
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2021 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
5+
6+
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.. CACHE INTERNAL "")
7+
set(TEST_TARGET mbed-connectivity-mbedtls-multi)
8+
9+
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
10+
11+
project(${TEST_TARGET})
12+
13+
mbed_greentea_cmake_macro(
14+
TEST_NAME ${TEST_TARGET}
15+
TEST_REQUIRED_LIBS
16+
mbed-mbedtls
17+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2021 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
5+
6+
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.. CACHE INTERNAL "")
7+
set(TEST_TARGET mbed-connectivity-mbedtls-sanity)
8+
9+
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
10+
11+
project(${TEST_TARGET})
12+
13+
mbed_greentea_cmake_macro(
14+
TEST_NAME ${TEST_TARGET}
15+
TEST_REQUIRED_LIBS
16+
mbed-mbedtls
17+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2021 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
5+
6+
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.. CACHE INTERNAL "")
7+
set(TEST_TARGET mbed-connectivity-mbedtls-selftest)
8+
9+
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
10+
11+
project(${TEST_TARGET})
12+
13+
mbed_greentea_cmake_macro(
14+
TEST_NAME ${TEST_TARGET}
15+
TEST_REQUIRED_LIBS
16+
mbed-mbedtls
17+
)

tools/cmake/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,6 @@ $ mbedtools configure -t <TOOLCHAIN> -m <MBED_TARGET>
9797
touch mbed-os.lib && mkdir cmake_build && cd cmake_build && cmake .. -G Ninja -DMBED_BAREMETAL_GREENTEA_TEST=ON && cmake --build .
9898
```
9999
100-
Note: These steps will change when `mbedtools` implements a sub-command to invoke Greentea tests
100+
Notes:
101+
* These steps will change when `mbedtools` implements a sub-command to invoke Greentea tests
102+
* Some Greentea tests require specific application configuration files in order to build and run successfully. For example, the `connectivity/mbedtls/tests/TESTS/mbedtls/sanity` test requires the configuration file found at `TESTs/configs/experimental.json`.

0 commit comments

Comments
 (0)