mirror of https://github.com/ARMmbed/mbed-os.git
Incorporating the review comments
parent
bcbd243b1b
commit
634d3be5f0
|
@ -76,3 +76,20 @@ If you're running CMake directly, you may need to pass it in yourself as follows
|
||||||
```
|
```
|
||||||
cmake -S <source-dir> -B <build-dir> -DCMAKE_BUILD_TYPE=debug
|
cmake -S <source-dir> -B <build-dir> -DCMAKE_BUILD_TYPE=debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## How to build a greentea test
|
||||||
|
|
||||||
|
Install prerequisites suggested in the previous section and follow the below steps to build:
|
||||||
|
* Generate .mbed_build configuration for DISCO_L475VG_IOT01A target from blinky example and copied into the test_suite directory.
|
||||||
|
* Change directory into the test suite directory
|
||||||
|
* run below command to build full profile green tea
|
||||||
|
|
||||||
|
```
|
||||||
|
touch mbed-os.lib;mkdir build;cd build;cmake .. -GNinja;cmake --build .
|
||||||
|
```
|
||||||
|
* run below command to build baremetal profile green tea
|
||||||
|
```
|
||||||
|
touch mbed-os.lib;mkdir build;cd build;cmake .. -GNinja -DMBED_BAREMETAL_GREENTEA_TEST=ON;cmake --build .
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: This steps will get evolve once mbedtools have a proper way of invoking greentea test using mbedtools command
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
# Copyright (c) 2020 ARM Limited. All rights reserved.
|
||||||
# SPDX-License-Identifier: Apache-2.0# the macro
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
set(MBED_CONFIG_PATH ${CMAKE_CURRENT_SOURCE_DIR}/.mbedbuild CACHE INTERNAL "")
|
set(MBED_CONFIG_PATH ${CMAKE_CURRENT_SOURCE_DIR}/.mbedbuild CACHE INTERNAL "")
|
||||||
|
|
||||||
|
@ -13,14 +13,27 @@ include(${MBED_PATH}/tools/cmake/app.cmake)
|
||||||
# TEST_REQUIRED_LIBS - Test suite required libraries
|
# TEST_REQUIRED_LIBS - Test suite required libraries
|
||||||
#
|
#
|
||||||
# calling the macro:
|
# calling the macro:
|
||||||
# mbed_greentea_cmake_macro(TEST_NAME mbed-platform-system-reset TEST_INCLUDE_DIRS mbed_store TEST_SOURCES foo.cpp bar.cpp TEST_REQUIRED_LIBS mbed-kvstore mbed-xyz)
|
# mbed_greentea_cmake_macro(
|
||||||
|
# TEST_NAME mbed-platform-system-reset
|
||||||
|
# TEST_INCLUDE_DIRS mbed_store
|
||||||
|
# TEST_SOURCES foo.cpp bar.cpp
|
||||||
|
# TEST_REQUIRED_LIBS mbed-kvstore mbed-xyz
|
||||||
|
# )
|
||||||
|
|
||||||
macro(mbed_greentea_cmake_macro)
|
macro(mbed_greentea_cmake_macro)
|
||||||
set(options)
|
set(options)
|
||||||
set(singleValueArgs TEST_NAME)
|
set(singleValueArgs TEST_NAME)
|
||||||
set(multipleValueArgs TEST_INCLUDE_DIRS TEST_SOURCES TEST_REQUIRED_LIBS)
|
set(multipleValueArgs
|
||||||
cmake_parse_arguments(MBED_GREENTEA "${options}" "${singleValueArgs}"
|
TEST_INCLUDE_DIRS
|
||||||
"${multipleValueArgs}" ${ARGN} )
|
TEST_SOURCES
|
||||||
|
TEST_REQUIRED_LIBS
|
||||||
|
)
|
||||||
|
cmake_parse_arguments(MBED_GREENTEA
|
||||||
|
"${options}"
|
||||||
|
"${singleValueArgs}"
|
||||||
|
"${multipleValueArgs}"
|
||||||
|
${ARGN}
|
||||||
|
)
|
||||||
|
|
||||||
set(TEST_NAME ${MBED_GREENTEA_TEST_NAME})
|
set(TEST_NAME ${MBED_GREENTEA_TEST_NAME})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue