File tree Expand file tree Collapse file tree 3 files changed +46
-1
lines changed
tools/cmake/tests/mbed_test_mode Expand file tree Collapse file tree 3 files changed +46
-1
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,15 @@ matrix:
109
109
':!*tests/*' ':!*targets/*' ':!*TARGET_*' ':!*unsupported/*' \
110
110
':!*events/tests/*' ':!*drivers/tests/*'
111
111
112
- # ## Docs Tests ###
112
+ - << : *basic-vm
113
+ name : " CMake MBED_TEST_MODE check"
114
+ env : NAME=mbed_test_mode_check
115
+ script :
116
+ - mbedtools configure -p tools/cmake/tests/mbed_test_mode -t GCC_ARM -m K64F --mbed-os-path .
117
+ - cmake -S tools/cmake/tests/mbed_test_mode -B tools/cmake/tests/mbed_test_mode/cmake_build/K64F/develop/GCC_ARM/ -GNinja -DCMAKE_BUILD_TYPE=develop
118
+ - cmake --build tools/cmake/tests/mbed_test_mode/cmake_build/K64F/develop/GCC_ARM/
119
+
120
+ # ## Docs Tests ###
113
121
- &docs-vm
114
122
stage : " Docs"
115
123
name : " astyle"
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2020 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 (MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE STATIC "" )
8
+
9
+ include (${MBED_PATH} /tools/cmake/app.cmake )
10
+
11
+ add_executable (mbed-test-mode-check )
12
+ project (mbed-test-mode-check )
13
+
14
+ set (PROJECT_NAME ${CMAKE_PROJECT_NAME} CACHE INTERNAL "" )
15
+ include (CTest )
16
+
17
+ target_sources (mbed-test-mode-check
18
+ PRIVATE
19
+ main.cpp
20
+ )
21
+
22
+ add_subdirectory (
23
+ ${MBED_PATH} build
24
+ )
Original file line number Diff line number Diff line change
1
+ /* mbed Microcontroller Library
2
+ * Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ #if BUILD_TESTING && !defined(MBED_TEST_MODE)
8
+ #error "MBED_TEST_MODE not defined with BUILD_TESTING on"
9
+ #else
10
+ int main (){
11
+ return 1 ;
12
+ }
13
+ #endif
You can’t perform that action at this time.
0 commit comments