Skip to content

Commit eb9bb7b

Browse files
rajkan01hugueskamba
andcommitted
Apply suggestions from code review
Co-authored-by: Hugues Kamba <[email protected]>
1 parent 634d3be commit eb9bb7b

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

tools/cmake/README.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,20 @@ cmake -S <source-dir> -B <build-dir> -DCMAKE_BUILD_TYPE=debug
8080
## How to build a greentea test
8181
8282
Install prerequisites suggested in the previous section and follow the below steps to build:
83-
* Generate .mbed_build configuration for DISCO_L475VG_IOT01A target from blinky example and copied into the test_suite directory.
84-
* Change directory into the test suite directory
85-
* run below command to build full profile green tea
83+
* Generate the `.mbedbuild/` configuration directory for the Mbed target you want to run the test on using [mbed-os-example-blinky](https://github.com/ARMmbed/mbed-os-example-blinky)
84+
```
85+
$ mbedtools configure -t <TOOLCHAIN> -m <MBED_TARGET>
86+
```
87+
* Copy `.mbedbuild/` into the test suite directory.
88+
* Set your current directory to the test suite directory
89+
* Run the following command to build the test binary with the full profile
8690
8791
```
88-
touch mbed-os.lib;mkdir build;cd build;cmake .. -GNinja;cmake --build .
92+
touch mbed-os.lib && mkdir cmake_build && cd cmake_build && cmake .. -G Ninja && cmake --build .
8993
```
90-
* run below command to build baremetal profile green tea
94+
* Run the following command to build the test binary with the baremetal profile
9195
```
92-
touch mbed-os.lib;mkdir build;cd build;cmake .. -GNinja -DMBED_BAREMETAL_GREENTEA_TEST=ON;cmake --build .
96+
touch mbed-os.lib && mkdir cmake_build && cd cmake_build && cmake .. -G Ninja -DMBED_BAREMETAL_GREENTEA_TEST=ON && cmake --build .
9397
```
9498
95-
Note: This steps will get evolve once mbedtools have a proper way of invoking greentea test using mbedtools command
99+
Note: These steps will change when `mbedtools` implements a sub-command to invoke Greentea tests

tools/cmake/mbed_greentea.cmake

+9-9
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ include(${MBED_PATH}/tools/cmake/app.cmake)
2323
macro(mbed_greentea_cmake_macro)
2424
set(options)
2525
set(singleValueArgs TEST_NAME)
26-
set(multipleValueArgs
27-
TEST_INCLUDE_DIRS
28-
TEST_SOURCES
29-
TEST_REQUIRED_LIBS
26+
set(multipleValueArgs
27+
TEST_INCLUDE_DIRS
28+
TEST_SOURCES
29+
TEST_REQUIRED_LIBS
3030
)
31-
cmake_parse_arguments(MBED_GREENTEA
32-
"${options}"
33-
"${singleValueArgs}"
34-
"${multipleValueArgs}"
35-
${ARGN}
31+
cmake_parse_arguments(MBED_GREENTEA
32+
"${options}"
33+
"${singleValueArgs}"
34+
"${multipleValueArgs}"
35+
${ARGN}
3636
)
3737

3838
set(TEST_NAME ${MBED_GREENTEA_TEST_NAME})

0 commit comments

Comments
 (0)