File tree Expand file tree Collapse file tree 3 files changed +53
-1
lines changed
tools/cmake/tests/mbed_test_mode Expand file tree Collapse file tree 3 files changed +53
-1
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ matrix:
109
109
':!*tests/*' ':!*targets/*' ':!*TARGET_*' ':!*unsupported/*' \
110
110
':!*events/tests/*' ':!*drivers/tests/*'
111
111
112
- # ## Docs Tests ###
112
+ # ## Docs Tests ###
113
113
- &docs-vm
114
114
stage : " Docs"
115
115
name : " astyle"
@@ -342,4 +342,19 @@ matrix:
342
342
| ( grep '.*[\\|\/]PinNames.h$' || true ) \
343
343
| while read file; do python ./hal/tests/pinvalidate/pinvalidate.py -vfp "${file}"; done
344
344
- git diff --exit-code --diff-filter=d --color
345
+ - << : extended-cmakecheck
346
+ stage : " Extended"
347
+ name : " cmakecheck"
348
+ env : NAME=cmakecheck
349
+ install :
350
+ # Install python modules
351
+ - python -m pip install --upgrade pip==18.1
352
+ - python -m pip install --upgrade setuptools==40.4.3
353
+ - pip install mbed-tools
354
+ - pip list --verbose
355
+ script :
356
+ # Validate MBED_TEST_MODE backward compatibility
357
+ - mbedtools configure -p tools/cmake/tests/mbed_test_mode -t GCC_ARM -m K64F --mbed-os-path .
358
+ - 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
359
+ - cmake --build tools/cmake/tests/mbed_test_mode/cmake_build/K64F/develop/GCC_ARM/
345
360
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